/* AI 不是魔法 · 互动班会
   所有尺寸以 rem 为单位，根字号随屏幕等比缩放（见 html），
   因此 1080p、2K、4K 和投影仪上的版面比例一致。 */

:root {
  --ink: #111311;
  --ink-2: #171a17;
  --panel: #20251f;
  --paper: #f6f3e9;
  --muted: #aaa99f;
  --soft: #d5d2c8;
  --lime: #c8f169;
  --lime-deep: #81b447;
  --coral: #ff735d;
  --cyan: #7fe8e0;
  --yellow: #ffd66b;
  --line: rgba(246, 243, 233, 0.16);
  --line-strong: rgba(246, 243, 233, 0.34);
  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.72, 0.25, 1);

  --bar-h: max(3rem, 56px);
  --foot-h: max(3.2rem, 64px);
  --pad-x: 4.6rem;
  /* 内容两侧留白；超宽屏幕时限制内容宽度 */
  --gutter: max(var(--pad-x), calc((100% - 84rem) / 2));
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html {
  height: 100%;
  background: var(--ink);
  font-size: clamp(12px, min(1.35vw, 2.4vh), 56px);
}
body {
  height: 100%;
  min-width: 320px;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui,
    sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}
::selection {
  background: var(--lime);
  color: var(--ink);
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  min-height: max(2.2rem, 44px);
  padding: 0.5rem 1rem;
  border: 0;
  color: inherit;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
code {
  color: var(--lime);
  font-family: Consolas, "Cascadia Mono", monospace;
  white-space: nowrap;
}
.ico {
  flex: none;
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ───────── 外壳：顶栏 / 舞台 / 底栏，三行固定 ───────── */
.app {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: var(--bar-h) minmax(0, 1fr) var(--foot-h);
  overflow: hidden;
  background: radial-gradient(
    circle at 82% 4%,
    #2d3629 0,
    #171a17 34%,
    #111311 78%
  );
}
.topbar,
.footer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  padding: 0 var(--gutter);
  background: rgba(15, 17, 15, 0.72);
  z-index: 2;
}
.topbar {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  white-space: nowrap;
}
.brand i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--lime);
  animation: pulse 2.6s ease-in-out infinite;
}
.head-tools {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.meta {
  margin-right: 0.4rem;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.tool {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: max(1.9rem, 44px);
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--lime);
  font-size: 0.7rem;
  white-space: nowrap;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.tool:hover {
  border-color: var(--lime);
  background: rgba(200, 241, 105, 0.1);
}

.footer {
  border-top: 1px solid var(--line);
}
.progress {
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 3px;
  background: rgba(246, 243, 233, 0.08);
}
.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--lime);
  transition: width 0.45s var(--ease);
}
.counter {
  flex: none;
  width: 4.6em;
  color: var(--muted);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.current-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--soft);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.help-button {
  flex: none;
  width: max(2.1rem, 44px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-weight: 700;
  color: var(--paper);
}
.nav {
  flex: none;
  display: flex;
  gap: 0.5rem;
}
.nav button {
  display: grid;
  place-items: center;
  width: max(2.4rem, 52px);
  height: max(2.4rem, 52px);
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(20, 20, 20, 0.6);
  font-size: 1.1rem;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.nav button:hover:not(:disabled) {
  border-color: var(--lime);
  color: var(--lime);
}

/* ───────── 舞台与页面 ───────── */
.deck {
  min-height: 0;
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--lime-deep) transparent;
  touch-action: pan-y pinch-zoom;
}
.deck:focus {
  outline: none;
}
.slide {
  display: none;
  position: relative;
  min-height: 100%;
  align-content: center;
  padding: 1.1rem var(--gutter);
  overflow: hidden;
}
.slide.active {
  display: grid;
}
.slide.active > * {
  animation: rise 0.55s var(--ease) both;
}
.slide.active > :nth-child(2) {
  animation-delay: 0.07s;
}
.slide.active > :nth-child(3) {
  animation-delay: 0.14s;
}
.slide.active > :nth-child(n + 4) {
  animation-delay: 0.21s;
}
.two-col,
.cover {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  column-gap: 3.4rem;
  align-items: center;
}
.two-col > *,
.cover > * {
  min-width: 0;
}

/* ───────── 文字 ───────── */
.eyebrow {
  margin-bottom: 0.9rem;
  color: var(--lime);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}
.eyebrow span {
  margin-left: 0.5rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.04em;
}
h1 {
  font-size: 4.4rem;
  line-height: 1;
  letter-spacing: -0.04em;
}
h2 {
  font-size: 2.45rem;
  line-height: 1.14;
  letter-spacing: -0.03em;
}
h3 {
  font-size: 1.15rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.lead {
  max-width: 30rem;
  margin-top: 1rem;
  color: var(--soft);
  font-size: 1.05rem;
  line-height: 1.55;
}
.small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.55;
}
.lesson-hint {
  margin-top: 1rem;
}
.accent {
  color: var(--lime);
}
.coral {
  color: var(--coral);
}
.cyan {
  color: var(--cyan);
}
.yellow {
  color: var(--yellow);
}
.label {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.callout {
  margin-top: 1.2rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ───────── 按钮 ───────── */
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: max(2.3rem, 48px);
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  font-weight: 800;
  transition:
    transform 0.16s,
    filter 0.16s,
    border-color 0.18s,
    background 0.18s;
}
.primary {
  background: var(--lime);
  color: var(--ink);
  box-shadow: 0 0.35rem 1rem rgba(200, 241, 105, 0.16);
}
.primary:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.primary:active:not(:disabled) {
  transform: translateY(1px);
}
.secondary {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--paper);
  font-weight: 600;
}
.secondary:hover:not(:disabled) {
  border-color: var(--cyan);
  background: rgba(127, 232, 224, 0.1);
}
.text-button {
  min-height: max(2rem, 44px);
  padding: 0.3rem 0.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.text-button:hover {
  color: var(--paper);
}
.start-button {
  margin-top: 1.5rem;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

/* ───────── 面板 ───────── */
.panel {
  padding: 1.3rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.025)
  );
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.2);
}
.panel-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.7rem;
}
.experiment-note {
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.65;
}
.definition-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.4rem;
}
.definition-list p {
  padding-left: 0.9rem;
  border-left: 1px solid var(--line-strong);
}
.definition-list b {
  display: block;
  font-size: 0.9rem;
}
.definition-list span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.6;
}

/* ───────── 01 封面 ───────── */
.cover h1 {
  max-width: 28rem;
}
.cover .lead {
  max-width: 26rem;
}
.title-dot {
  color: var(--coral);
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.3rem;
}
.tag {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbc6bb;
  font-size: 0.7rem;
}
.tag.hot {
  border-color: var(--lime);
  color: var(--lime);
  background: rgba(200, 241, 105, 0.06);
}
.cover-art {
  position: relative;
  width: 100%;
  max-width: 25rem;
  aspect-ratio: 1;
  margin-inline: auto;
}
.orbit {
  position: absolute;
  inset: 7% 8%;
  border: 1px solid rgba(200, 241, 105, 0.46);
  border-radius: 50%;
  transform: rotate(-18deg);
  animation: spin 18s linear infinite;
}
.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(127, 232, 224, 0.3);
  border-radius: 50%;
}
.orbit::before {
  inset: 14% -9%;
  transform: rotate(55deg);
}
.orbit::after {
  inset: -9% 15%;
  transform: rotate(28deg);
}
.orbit-particle {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  animation: spin 12s linear infinite;
}
.orbit-particle::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--lime);
}
.core {
  position: absolute;
  left: 30%;
  top: 30%;
  width: 40%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 47% 53% 48% 52%;
  background: linear-gradient(140deg, var(--lime), #79c86f 55%, #ff9a6e);
  color: var(--ink);
  font-size: 2rem;
  font-weight: 900;
  transform: rotate(17deg);
  box-shadow: inset -1.1rem -0.8rem 1.6rem rgba(16, 16, 16, 0.18);
  animation: float 4s ease-in-out infinite;
}
.sat {
  position: absolute;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(20, 20, 20, 0.7);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  white-space: nowrap;
  animation: satPulse 3s ease-in-out infinite;
}
.sat.a {
  top: 8%;
  right: 0;
  color: var(--cyan);
}
.sat.b {
  bottom: 14%;
  left: 0;
  color: var(--yellow);
  animation-delay: 0.6s;
}
.sat.c {
  right: 10%;
  bottom: 0;
  color: var(--coral);
  animation-delay: 1.2s;
}
.art-coordinate {
  position: absolute;
  bottom: -1.7rem;
  left: 0;
  width: 100%;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-align: center;
}

/* ───────── 02 / 11 / 14 揭秘卡片 ───────── */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.4rem;
}
.info-card,
.principle {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  text-align: left;
}
.info-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  transition:
    border-color 0.2s,
    background 0.2s;
}
.info-card:hover,
.info-card[aria-expanded="true"] {
  border-color: var(--cyan);
  background: rgba(127, 232, 224, 0.06);
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.card-top b {
  color: var(--lime);
  font-size: 1.3rem;
}
.card-ico {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--cyan);
}
.card-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
}
.card-text {
  display: block;
  margin-top: 0.35rem;
  color: #cbc6bb;
  font-size: 0.78rem;
  line-height: 1.55;
}
/* 提示与答案共用同一格，展开时卡片高度不变 */
.reveal-slot {
  display: grid;
  margin-top: auto;
  padding-top: 0.8rem;
}
.reveal-slot::before {
  content: "";
  grid-area: 1 / 1;
  align-self: start;
  height: 1px;
  background: var(--line);
}
.reveal-answer,
.reveal-hint {
  grid-area: 1 / 1;
  display: block;
  margin-top: 0.8rem;
  font-size: 0.72rem;
  line-height: 1.6;
}
.reveal-hint {
  color: var(--lime);
  letter-spacing: 0.04em;
}
.reveal-answer {
  color: var(--cyan);
  visibility: hidden;
}
.reveal-answer::after {
  content: "　点击收起";
  color: var(--muted);
  font-size: 0.9em;
}
[aria-expanded="true"] > .reveal-slot .reveal-answer {
  visibility: visible;
  animation: fade 0.25s ease both;
}
[aria-expanded="true"] > .reveal-slot .reveal-hint {
  visibility: hidden;
}
.principle {
  position: relative;
  background: var(--paper);
  color: var(--ink);
}
.principle:nth-child(2) {
  background: var(--lime);
}
.principle:nth-child(3) {
  background: var(--cyan);
}
.principle .no {
  font-size: 0.7rem;
  font-weight: 900;
  opacity: 0.7;
}
.principle .card-title {
  margin-top: 1.4rem;
  font-size: 1.15rem;
}
.principle .card-text {
  color: rgba(17, 19, 17, 0.82);
  margin-bottom: 0.9rem;
}
.principle .reveal-slot::before {
  background: rgba(17, 19, 17, 0.22);
}
.principle .reveal-answer {
  color: #1d3a31;
}
.principle .reveal-hint {
  color: #2f3a27;
  font-weight: 700;
}
button.principle {
  transition: transform 0.2s;
}
button.principle:hover {
  transform: translateY(-3px);
}

/* ───────── 03 概念图 ───────── */
.concept-figure {
  display: grid;
  justify-items: center;
  gap: 0.9rem;
}
.concept-svg {
  display: block;
  width: min(100%, 36rem);
  height: auto;
  max-height: 22rem;
}
.concept-figure figcaption {
  max-width: 34rem;
  text-align: center;
}
.ring {
  stroke-width: 1.5;
}
.ring-ai {
  fill: rgba(127, 232, 224, 0.08);
  stroke: rgba(127, 232, 224, 0.55);
}
.ring-ml {
  fill: rgba(200, 241, 105, 0.1);
  stroke: rgba(200, 241, 105, 0.6);
}
.ring-dl {
  fill: rgba(255, 115, 93, 0.16);
  stroke: rgba(255, 115, 93, 0.7);
}
.ring-text text {
  text-anchor: middle;
}
.ring-name {
  font-size: 30px;
  font-weight: 800;
}
.ring-code {
  font-size: 17px;
  letter-spacing: 0.18em;
  fill: var(--muted);
}
.ring-text-ai .ring-name {
  fill: var(--cyan);
}
.ring-text-ml .ring-name {
  fill: var(--lime);
}
.ring-text-dl .ring-name {
  fill: var(--coral);
}

/* ───────── 04 训练 / 推理 ───────── */
.process-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.process-grid h3 {
  margin: 0.9rem 0 0;
  font-size: 1.25rem;
}
.process-grid p {
  color: var(--soft);
  font-size: 0.82rem;
  line-height: 1.65;
}
.inference-panel {
  border-color: rgba(127, 232, 224, 0.45);
}
.mini-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
  font-size: 0.74rem;
}
.mini-flow span {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ink-2);
}
.mini-flow i {
  color: var(--lime);
  font-style: normal;
}

/* ───────── 05 实验一 ───────── */
.data-editor {
  margin-top: 1.1rem;
  padding: 0.8rem 0.9rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.data-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--soft);
  font-size: 0.74rem;
}
.data-head b {
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}
.data-limit {
  color: var(--muted);
}
.data-actions {
  display: flex;
  gap: 0.2rem;
}
.point-chips {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)); /* 5 列 × 2 行，正好放下 10 个点 */
  grid-auto-rows: max(1.9rem, 44px);
  align-content: start;
  gap: 0.4rem;
  min-height: calc(2 * max(1.9rem, 44px) + 0.4rem);
  margin: 0.5rem 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 0;
  padding: 0 0.3rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(127, 232, 224, 0.06);
  color: var(--cyan);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.chip .ico {
  width: 0.8em;
  height: 0.8em;
  color: var(--muted);
}
.chip:hover,
.chip.is-hot {
  border-color: var(--coral);
  background: rgba(255, 115, 93, 0.1);
}
.chip:hover .ico {
  color: var(--coral);
}
.chip-empty {
  grid-column: 1 / -1;
  align-self: center;
  color: var(--muted);
  font-size: 0.72rem;
}
.status-line {
  min-height: 3.1em;
  margin-top: 0.4rem;
}
.training-panel {
  min-width: 0;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
}
.live-badge::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
}
.live-badge.is-running {
  color: var(--lime);
}
.live-badge.is-running::before {
  animation: pulse 1s ease-in-out infinite;
}
.training-chart {
  display: block;
  width: 100%;
  height: auto;
  max-height: 17rem;
  margin-inline: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}
.chart-grid {
  stroke: var(--line);
  stroke-width: 1;
}
.chart-axis {
  fill: none;
  stroke: #7d8576;
  stroke-width: 1.5;
}
.chart-tick {
  fill: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.chart-axis-name {
  fill: var(--muted);
  font-size: 13px;
  font-style: italic;
}
.fit-line {
  stroke: var(--lime);
  stroke-width: 3;
  stroke-linecap: round;
}
.residual {
  stroke: var(--coral);
  stroke-width: 1.5;
  stroke-dasharray: 3 4;
  opacity: 0.8;
}
.test-guide {
  stroke: var(--coral);
  stroke-width: 1;
  stroke-dasharray: 2 4;
  opacity: 0.6;
}
.test-point {
  fill: var(--coral);
  stroke: var(--paper);
  stroke-width: 2;
}
.data-point {
  cursor: grab;
  outline: none;
}
.data-point .hit {
  fill: transparent;
}
.data-point .dot {
  fill: var(--cyan);
  stroke: var(--ink);
  stroke-width: 3;
  transition:
    r 0.12s,
    fill 0.12s;
}
.data-point:hover .dot,
.data-point.is-selected .dot,
.data-point:focus-visible .dot {
  r: 10.5;
  fill: var(--paper);
  stroke: var(--lime);
}
.data-point.is-dragging {
  cursor: grabbing;
}
.point-tip {
  fill: var(--paper);
  font-size: 13px;
  font-weight: 700;
  paint-order: stroke;
  stroke: var(--panel);
  stroke-width: 4px;
  pointer-events: none;
  text-anchor: middle;
}
.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.7rem;
}
.metric {
  padding-top: 0.55rem;
  border-top: 2px solid var(--line-strong);
}
.metric strong {
  display: block;
  color: var(--lime);
  font-size: 1.45rem;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.metric span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.7rem;
}
.range-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}
.range-label output {
  min-width: 1.6em;
  color: var(--coral);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.range-label input {
  flex: 1;
  min-width: 4rem;
  height: max(1.6rem, 40px);
  accent-color: var(--lime);
  cursor: pointer;
}
.model-formula {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-variant-numeric: tabular-nums;
}

/* ───────── 06 神经网络 ───────── */
.network-panel {
  min-width: 0;
}
.network-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 17rem;
}
.network-line {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2;
  opacity: 0.15;
}
.network-line.signal-current {
  opacity: 0.9;
  stroke-dasharray: 8 12;
  animation: flow 1.6s linear infinite;
}
.network-node {
  fill: var(--lime);
  stroke: var(--ink);
  stroke-width: 5;
  opacity: 0.35;
  transition: opacity 0.3s;
}
.network-node.signal-current {
  opacity: 1;
}
.network-label {
  fill: var(--muted);
  font-size: 19px;
}
.network-status {
  min-height: 3.4em;
  margin-top: 0.4rem;
  color: var(--cyan);
  font-size: 0.82rem;
  line-height: 1.6;
}

/* ───────── 07 实验二 ───────── */
.token-demo {
  min-width: 0;
}
.generated-sentence {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem;
  min-height: 3.6rem;
  padding: 0.3rem 0 0.9rem;
  font-size: 1.7rem;
  line-height: 1.4;
}
.generated-token {
  padding: 0 0.25rem;
  border-radius: 4px;
  color: var(--lime);
  background: rgba(200, 241, 105, 0.12);
  animation: tokenIn 0.3s ease both;
}
.cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  margin-left: 4px;
  background: var(--lime);
  animation: blink 1s steps(2, end) infinite;
}
.probabilities {
  display: grid;
  gap: 0.5rem;
  min-height: 11rem; /* 三个候选项 */
  align-content: start;
}
.prob-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: max(2.5rem, 52px);
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(
    90deg,
    rgba(200, 241, 105, 0.28) calc(var(--prob) * 1%),
    rgba(255, 255, 255, 0.04) calc(var(--prob) * 1%)
  );
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.prob-button:hover {
  border-color: var(--lime);
  transform: translateX(3px);
}
.prob-button b {
  font-size: 1.1rem;
}
.prob-button span {
  color: var(--lime);
}

/* ───────── 08 历史 ───────── */
.history-tabs {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.history-tabs button {
  position: relative;
  min-width: 0;
  padding: 1rem 0.6rem 0.8rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  transition: background 0.2s;
}
.history-tabs button:first-child {
  border-left: 1px solid var(--line);
}
.history-tabs button::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0.8rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #697263;
}
.history-tabs b {
  display: block;
  color: var(--lime);
  font-size: 1.15rem;
}
.history-tabs span {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}
.history-tabs button:hover {
  background: rgba(255, 255, 255, 0.04);
}
.history-tabs [aria-pressed="true"] {
  background: rgba(200, 241, 105, 0.12);
}
.history-tabs [aria-pressed="true"]::before {
  background: var(--lime);
}
.history-tabs [aria-pressed="true"] span {
  color: var(--paper);
}
/* 八条详情叠在同一格里，容器高度取最高者，切换时不跳动 */
.history-detail {
  display: grid;
  margin-top: 1.1rem;
}
.history-item {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 0.5fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 1.6rem;
  visibility: hidden;
}
.history-item.is-current {
  visibility: visible;
}
.history-year {
  color: var(--coral);
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}
.history-item h3 {
  margin-bottom: 0.6rem;
}
.history-item p {
  color: var(--soft);
  font-size: 0.8rem;
  line-height: 1.7;
}
.history-item .history-meaning {
  margin-top: 0.6rem;
  color: var(--lime);
}

/* ───────── 09 / 12 网格 ───────── */
.application-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}
.responsibility-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.application h3,
.responsibility-grid h3 {
  margin: 0.8rem 0 0.5rem;
  font-size: 1.1rem;
}
.application p,
.responsibility-grid p {
  color: var(--soft);
  font-size: 0.76rem;
  line-height: 1.7;
}
.app-icon {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(200, 241, 105, 0.08);
  color: var(--lime);
  font-size: 1.1rem;
}
.application:nth-child(2) .app-icon {
  color: var(--cyan);
}
.application:nth-child(3) .app-icon {
  color: var(--coral);
}
.application:nth-child(4) .app-icon {
  color: var(--yellow);
}
.app-example {
  display: block;
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
}

/* ───────── 10 提示词 ───────── */
.scenario-label {
  display: block;
  margin-top: 1.2rem;
  color: var(--muted);
  font-size: 0.72rem;
}
.scenario-label select {
  display: block;
  width: 100%;
  min-height: max(2.2rem, 48px);
  margin-top: 0.4rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--paper);
}
.prompt-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.prompt-parts button {
  min-height: max(2rem, 44px);
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.prompt-parts button:hover {
  border-color: var(--line-strong);
}
.prompt-parts [aria-pressed="true"] {
  border-color: var(--yellow);
  color: var(--yellow);
  background: rgba(255, 214, 107, 0.09);
}
.prompt-box {
  min-width: 0;
}
.prompt-input {
  display: block;
  width: 100%;
  min-height: 7.2rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #52594a;
  border-radius: 8px;
  background: #171815;
  color: var(--paper);
  caret-color: var(--lime);
  font-size: 0.78rem;
  line-height: 1.6;
  resize: vertical;
}
.prompt-input:focus {
  border-color: var(--lime);
  outline: none;
}
.output {
  min-height: 6.6rem;
  margin-top: 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(127, 232, 224, 0.06);
  color: #d9d5cc;
  font-size: 0.76rem;
  line-height: 1.65;
}
.output.typing::after {
  content: "▍";
  color: var(--cyan);
  animation: blink 1s steps(2, end) infinite;
}

/* ───────── 13 测验 ───────── */
.quiz-progress {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 0.72rem;
}
.quiz-progress::before {
  content: "";
  height: 6px;
  flex: 1;
  max-width: 14rem;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    var(--coral) var(--quiz-progress, 0%),
    rgba(255, 255, 255, 0.12) 0
  );
}
.quiz-panel {
  min-width: 0;
  min-height: 25rem; /* 题目、解析长短不一，面板高度保持恒定 */
}
.quiz-question {
  min-height: 2.6em;
  font-size: 1.3rem;
  line-height: 1.3;
}
.options {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}
.option {
  min-height: max(2.4rem, 52px);
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #282b25;
  font-size: 0.78rem;
  text-align: left;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.option:hover:not(:disabled) {
  border-color: var(--lime);
  background: #30362b;
}
.option:disabled {
  opacity: 1;
  cursor: default;
  color: var(--muted);
}
.option.correct {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--ink);
  font-weight: 800;
}
.option.wrong {
  border-color: var(--coral);
  background: #63372f;
  color: var(--paper);
}
.quiz-result {
  min-height: 5.4em;
  margin-top: 0.8rem;
  color: var(--yellow);
  font-size: 0.76rem;
  line-height: 1.65;
}

/* ───────── 15 结尾 ───────── */
.quote {
  font-size: 3.2rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.quote mark {
  padding: 0 0.08em;
  background: var(--lime);
  color: var(--ink);
}
.takeaways {
  display: grid;
  gap: 0.8rem;
}
.takeaways > div {
  display: flex;
  gap: 0.9rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}
.takeaways b {
  color: var(--lime);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}
.homework {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.8;
}
.final-credits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  margin-top: 0.4rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}
.final-credits strong {
  color: var(--lime);
  font-weight: 700;
}

/* ───────── 弹窗 / 黑屏 / 提示 ───────── */
.modal {
  width: min(92vw, 52rem);
  max-height: 84vh;
  padding: 1.6rem 1.8rem;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #1c211c;
  color: var(--paper);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.5);
  font-size: 0.85rem;
}
.modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
}
.modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.modal-close {
  min-width: max(2.2rem, 48px);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--coral);
  font-size: 1.2rem;
}
.outline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1.1rem;
}
.outline-card {
  min-height: 5rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  transition: border-color 0.2s;
}
.outline-card:hover {
  border-color: var(--line-strong);
}
.outline-card b {
  display: block;
  color: var(--lime);
  font-size: 1.05rem;
}
.outline-card span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  line-height: 1.4;
}
.outline-card[aria-current="step"] {
  border-color: var(--lime);
  background: rgba(200, 241, 105, 0.09);
}
.shortcut-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}
.shortcut-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.7rem;
}
.shortcut-list kbd {
  padding: 0.12rem 0.4rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--paper);
  font-family: inherit;
  font-size: 0.7rem;
}
.dialog-note {
  margin-top: 1rem;
  color: var(--soft);
  font-size: 0.74rem;
  line-height: 1.65;
}
.references {
  margin-top: 1.2rem;
}
.references h4 {
  margin: 0 0 0.4rem;
  font-size: 0.74rem;
}
.references a {
  display: block;
  padding: 0.5rem 0;
  color: var(--cyan);
  font-size: 0.72rem;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
#blackout {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
  color: #444;
  z-index: 50;
}
#resumeScreen {
  color: #555;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--foot-h) + 1rem);
  z-index: 60;
  max-width: 90vw;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #252c24;
  color: var(--lime);
  font-size: 0.72rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 0.25s,
    transform 0.25s;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.no-script {
  position: fixed;
  inset: auto 0 0;
  z-index: 100;
  padding: 1.2rem;
  background: var(--coral);
  color: var(--ink);
  text-align: center;
}

/* ───────── 动效 ───────── */
.motion-paused *,
.motion-paused *::before,
.motion-paused *::after {
  animation: none !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}
@keyframes spin {
  to {
    transform: rotate(342deg);
  }
}
@keyframes float {
  50% {
    translate: 0 -0.5rem;
  }
}
@keyframes satPulse {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}
@keyframes flow {
  to {
    stroke-dashoffset: -80;
  }
}
@keyframes tokenIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
@keyframes blink {
  50% {
    opacity: 0.35;
  }
}

/* ───────── 响应式 ───────── */
@media (max-width: 1100px) {
  :root {
    --pad-x: 2rem;
  }
  .application-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .history-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .outline-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  html {
    font-size: 16px;
  }
  :root {
    --pad-x: 20px;
  }
  .meta,
  .tool span,
  .tool .ico + #fullscreenLabel {
    display: none;
  }
  .tool {
    padding: 0.3rem 0.6rem;
  }
  #motionBtn {
    font-size: 0.7rem;
  }
  .topbar,
  .footer {
    gap: 0.5rem;
  }
  .two-col,
  .cover {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.6rem;
    align-items: start;
  }
  .slide {
    align-content: start;
    padding-top: 1.4rem;
    padding-bottom: 2rem;
  }
  h1 {
    font-size: 3.4rem;
  }
  h2 {
    font-size: 2rem;
  }
  .cards,
  .cards-3,
  .process-grid,
  .application-grid,
  .responsibility-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .history-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
  }
  .history-year {
    font-size: 2.4rem;
  }
  .outline-grid,
  .shortcut-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shortcut-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .small,
  .text-button,
  .card-text,
  .reveal-answer,
  .reveal-hint {
    font-size: 0.85rem;
  }
  .quiz-panel {
    min-height: 0;
  }
  .training-chart {
    max-height: none;
  }
  .cover-art {
    max-width: 18rem;
  }
}
