:root {
  --ink: #17324d;
  --paper: #fffdf7;
  --yellow: #ffd84d;
  --coral: #ff6b5f;
  --mint: #7de2c3;
  --blue: #dceaff;
  --muted: #526a81;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
h1, h2, p { margin: 0; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 3px solid #397eea; outline-offset: 4px; }
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(16px, 3vh, 36px);
  overflow: auto;
  padding: 56px 7vw 83px;
  background: var(--paper);
}
.slide[hidden] { display: none; }
.section { position: absolute; top: 22px; right: 3vw; font-weight: 750; font-size: 14px; letter-spacing: .12em; }
h1, h2 { letter-spacing: -.045em; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(52px, min(9vw, 14vh), 126px); }
h2 { font-size: clamp(32px, min(6.3vw, 10vh), 91px); }
.subtitle { font-size: clamp(19px, min(3vw, 5vh), 42px); line-height: 1.45; color: var(--muted); }
.kicker { font-weight: 850; letter-spacing: .15em; font-size: clamp(16px, 2vw, 27px); }
.center { align-items: center; text-align: center; }
.yellow { background: var(--yellow); }
.mint { background: var(--mint); }
.blue { background: var(--blue); }
.coral { background: #ffe1de; }
.dark { background: #15283b; color: white; }
.dark .subtitle { color: #cfdeec; }
.split { display: grid; grid-template-columns: 1fr 1.08fr; align-items: center; gap: 5vw; }
.stack { display: grid; justify-items: start; gap: clamp(14px, 3vh, 30px); }
.cover-image, .lesson-image { display: block; width: 100%; max-height: 62vh; object-fit: contain; border-radius: 22px; }
.cover-image { box-shadow: 0 18px 55px #030a1780; }
.flow, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.flow { font-size: clamp(18px, min(2.7vw, 4.5vh), 38px); font-weight: 800; }
.flow span, .tile { color: var(--ink); background: var(--paper); border-radius: 17px; padding: .55em .82em; }
.flow b { color: #b93c32; }
.video-workflow { gap: clamp(12px, 2.5vh, 26px); }
.video-workflow h2 { font-size: clamp(30px, min(5vw, 8vh), 72px); }
.video-workflow .flow { font-size: clamp(16px, 1.7vw, 26px); gap: 8px; }
.video-examples { display: grid; width: 100%; grid-template-columns: 3fr 4fr; gap: 16px; }
.video-examples figure { margin: 0; text-align: center; }
.video-examples img { display: block; width: 100%; height: 43vh; object-fit: contain; }
.video-examples figcaption { margin-top: 8px; font-size: 16px; font-weight: 750; }
.action { display: inline-block; border: 0; border-radius: 14px; padding: .62em 1em; background: var(--ink); color: white; text-decoration: none; font-size: clamp(16px, 2vw, 28px); font-weight: 750; }
.action:hover { background: #275982; }
.dark .action { background: var(--yellow); color: var(--ink); }
.icon { font-size: clamp(72px, min(13vw, 24vh), 200px); line-height: 1; }
.questions { font-size: clamp(20px, min(3.2vw, 5vh), 45px); display: grid; gap: .42em; padding-left: 1.3em; margin: 0; font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; width: 100%; }
.recap .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { border: 1px solid #17324d30; font-size: clamp(18px, min(2.4vw, 4vh), 34px); font-weight: 800; }
.tile small { display: block; margin-top: .28em; color: var(--muted); font-size: .65em; font-weight: 650; }
.idea-summary h2 { font-size: clamp(30px, min(5.5vw, 8vh), 76px); }
.idea-summary .kicker, .idea-summary .subtitle { color: #a2ddff; }
.idea-summary .tile { background: #25354c; color: white; }
.idea-summary .tile + .tile { background: #214461; }
.idea-summary .tile small { color: #d9e6f3; line-height: 1.5; }
.idea-summary .tile span { color: #a2ddff; }
.idea-summary .tile strong { color: white; }
.cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; list-style: none; padding: 0; margin: 0; }
.cells .tile { font-size: clamp(16px, min(2.05vw, 3.3vh), 29px); }
.cells img { display: block; width: 100%; height: clamp(70px, 15vh, 155px); object-fit: contain; border-radius: 8px; margin-bottom: 6px; }
.cells .tile small { font-size: max(12px, .63em); }
.cells .tile span { color: #23568a; margin-right: .25em; }
.controls {
  position: fixed;
  z-index: 2;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 13px;
  padding: 5px;
  background: #15283b;
  color: white;
  white-space: nowrap;
  font-size: 13px;
  opacity: .8;
}
.controls:hover, .controls:focus-within { opacity: 1; }
.controls button, dialog header button { border: 0; border-radius: 8px; padding: 7px 8px; color: inherit; background: #ffffff22; }
#counter { padding: 0 4px; font-variant-numeric: tabular-nums; }
.notes { position: fixed; z-index: 1; bottom: 0; inset-inline: 0; max-height: 42vh; overflow: auto; padding: 18px 7vw 62px; background: #101c28f5; color: #fff; font-size: clamp(16px, 2vw, 23px); line-height: 1.5; }
dialog { width: min(780px, calc(100% - 24px)); max-height: 85vh; padding: 0; border: 0; border-radius: 20px; color: var(--ink); }
dialog::backdrop { background: #0d2034bd; }
dialog header { position: sticky; z-index: 1; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--blue); padding: 14px 20px; font-size: 20px; }
dialog header button { background: white; font-size: 15px; }
#tocList { columns: 2; padding: 0 28px 0 46px; }
#tocList li { break-inside: avoid; }
#tocList button { border: 0; background: transparent; color: inherit; padding: 7px; text-align: left; }
#tocList button[aria-current="page"] { color: #174f96; font-weight: 850; }
.dialog-body { padding: 18px; }
textarea { width: 100%; height: min(43vh, 360px); resize: vertical; margin-bottom: 12px; padding: 12px; color: var(--ink); font: 16px/1.55 system-ui, sans-serif; }
.notice:not(:empty) { position: fixed; z-index: 3; bottom: 65px; right: 3vw; background: var(--ink); color: white; padding: 10px 15px; border-radius: 12px; }
@media (max-width: 690px) {
  .slide { justify-content: safe center; padding-inline: 5vw; }
  .split { display: flex; }
  .recap .tiles, .idea-summary .tiles { grid-template-columns: 1fr; }
  .video-examples { grid-template-columns: 1fr; }
  .video-examples img { height: auto; max-height: 35vh; }
  .cover-image, .lesson-image { max-height: 35vh; }
  .cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #tocList { columns: 1; }
}
@media (max-height: 560px) {
  .slide { justify-content: safe center; padding-top: 40px; padding-bottom: 58px; gap: 12px; }
}
@media print {
  @page { size: 297mm 167mm; margin: 0; }
  * { print-color-adjust: exact; }
  .slide, .slide[hidden] { position: relative; display: flex; width: 297mm; height: 167mm; padding: 14mm 19mm; break-after: page; overflow: hidden; }
  .slide.split { display: grid; }
  .controls, .notes, dialog, .notice { display: none !important; }
}
