:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #667085;
  --line: #d9e1e8;
  --paper: #fffaf3;
  --surface: #ffffff;
  --green: #1f8a70;
  --amber: #d97706;
  --blue: #2563eb;
  --red: #dc2626;
  --purple: #7c3aed;
  --teal: #0f766e;
  --shadow: 0 18px 42px rgba(31, 41, 51, .12);
  --text-scale: 1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(120deg, rgba(31, 138, 112, .13), transparent 36%),
    linear-gradient(240deg, rgba(217, 119, 6, .13), transparent 38%),
    var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: calc(16px * var(--text-scale));
  line-height: 1.72;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(255, 250, 243, .88);
  border-bottom: 1px solid rgba(217, 225, 232, .9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: .78rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

nav a,
.tool-button,
.timer-buttons button,
.source-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

nav a {
  padding: 8px 12px;
  font-size: .92rem;
}

nav a:hover,
.tool-button:hover,
.timer-buttons button:hover,
.source-link:hover {
  transform: translateY(-1px);
  border-color: #98a2b3;
  box-shadow: 0 10px 20px rgba(31, 41, 51, .08);
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px clamp(18px, 4vw, 56px) 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  min-height: 520px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: .88rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.7rem);
  line-height: 1.03;
}

h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3.4vw, 2.8rem);
  line-height: 1.18;
}

h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  line-height: 1.5;
}

.lead {
  max-width: 720px;
  color: #43515f;
  font-size: 1.12rem;
}

.hero-actions,
.timer-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-button,
.timer-buttons button,
.source-link {
  padding: 10px 14px;
}

.hero-board {
  position: relative;
  min-height: 430px;
  border: 1px solid rgba(31, 41, 51, .14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.93), rgba(255,255,255,.58)),
    repeating-linear-gradient(0deg, rgba(31,41,51,.06), rgba(31,41,51,.06) 1px, transparent 1px, transparent 34px),
    repeating-linear-gradient(90deg, rgba(31,41,51,.05), rgba(31,41,51,.05) 1px, transparent 1px, transparent 34px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.orbit {
  position: absolute;
  border: 2px dashed rgba(31, 41, 51, .18);
  border-radius: 50%;
}

.orbit-one {
  inset: 58px 46px;
  animation: spin 24s linear infinite;
}

.orbit-two {
  inset: 108px 86px;
  animation: spin 32s linear reverse infinite;
}

.topic-token {
  position: absolute;
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-weight: 800;
  box-shadow: 0 18px 28px rgba(31, 41, 51, .16);
}

.token-a {
  top: 38px;
  left: 54px;
  background: var(--green);
}

.token-b {
  right: 42px;
  top: 80px;
  background: var(--amber);
}

.token-c {
  left: 54px;
  bottom: 48px;
  background: var(--blue);
}

.token-d {
  right: 62px;
  bottom: 46px;
  background: var(--red);
}

.phone-visual {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 128px;
  height: 230px;
  padding: 22px 18px;
  transform: translate(-50%, -50%) rotate(-6deg);
  border: 10px solid #26323d;
  border-radius: 24px;
  background: #f8fafc;
  box-shadow: 0 24px 35px rgba(31, 41, 51, .22);
}

.phone-visual span {
  display: block;
  height: 24px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: #c7d2fe;
}

.phone-visual span:nth-child(2) {
  width: 66%;
  background: #99f6e4;
}

.phone-visual span:nth-child(3) {
  width: 82%;
  background: #fed7aa;
}

.exam-strip,
.study-tools,
.source-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 10px 0 32px;
}

.exam-strip div,
.study-tools,
.source-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 10px 28px rgba(31, 41, 51, .07);
}

.exam-strip div {
  padding: 16px;
}

.exam-strip strong,
.exam-strip span {
  display: block;
}

.exam-strip span {
  color: var(--muted);
  font-size: .94rem;
}

.study-tools {
  grid-template-columns: 1fr auto minmax(180px, 260px);
  align-items: center;
  padding: 14px;
}

.timer-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.timer-label {
  min-width: 86px;
  font-size: 1.6rem;
  font-weight: 900;
}

.switch,
.range-control {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #344054;
}

.range-control input {
  width: 130px;
}

.section-block {
  padding: 34px 0;
}

.section-heading {
  margin-bottom: 20px;
}

.section-intro {
  max-width: 760px;
  margin: 10px 0 0;
  color: #43515f;
}

.classroom-flow {
  scroll-margin-top: 90px;
}

.lesson-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 18px;
  align-items: stretch;
}

.prompt-stage {
  position: relative;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.prompt-stage img {
  display: block;
  width: 100%;
  border-radius: 8px;
}

.prompt-stage figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: .95rem;
}

.hotspot {
  position: absolute;
  display: inline-flex;
  max-width: 176px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(31, 41, 51, .88);
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.3;
  box-shadow: 0 10px 22px rgba(31, 41, 51, .18);
}

.hot-1 { left: 8%; top: 8%; }
.hot-2 { right: 7%; top: 33%; }
.hot-3 { left: 8%; bottom: 22%; }
.hot-4 { right: 5%; bottom: 18%; }

.teaching-steps {
  display: grid;
  gap: 12px;
}

.teaching-steps article,
.teacher-card,
.mind-map,
.framework-strip article,
.model-answer,
.vocab-panel,
.idiom-panel,
.pattern-panel,
.student-practice,
.practice-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 12px 30px rgba(31, 41, 51, .08);
}

.teaching-steps article {
  position: relative;
  padding: 18px 18px 18px 68px;
}

.step-num {
  position: absolute;
  left: 18px;
  top: 18px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}

.teaching-steps h3,
.teaching-steps p {
  margin: 0;
}

.teaching-steps p {
  margin-top: 6px;
  color: #43515f;
}

.observe-panel {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
  gap: 18px;
  margin-top: 18px;
}

.teacher-card {
  padding: 22px;
}

.teacher-card p {
  margin: 10px 0;
}

.teacher-card ol {
  margin: 10px 0 0;
  padding-left: 1.4em;
}

.mind-map {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  padding: 22px;
  overflow: hidden;
}

.map-center {
  align-self: center;
  display: grid;
  min-height: 150px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 1.25rem;
  font-weight: 900;
  text-align: center;
}

.map-branch {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-left: 5px solid var(--accent, var(--green));
  border-radius: 8px;
  background: #f8fafc;
}

.map-branch + .map-branch {
  margin-top: 10px;
}

.map-branch strong {
  color: var(--accent, var(--green));
}

.branch-a { --accent: var(--blue); }
.branch-b { --accent: var(--amber); }
.branch-c { --accent: var(--green); }
.branch-d { --accent: var(--red); }

.framework-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.framework-strip article {
  padding: 16px;
}

.framework-strip strong {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-size: 1.2rem;
}

.framework-strip span {
  display: block;
  margin-top: 10px;
  color: var(--green);
  font-weight: 900;
}

.framework-strip p {
  margin: 8px 0 0;
  color: #43515f;
  font-size: .95rem;
}

.model-answer,
.student-practice {
  margin-top: 18px;
  padding: 22px;
}

.compact-heading {
  margin-bottom: 14px;
}

.answer-flow,
.materials-grid,
.practice-grid {
  display: grid;
  gap: 14px;
}

.answer-flow {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.answer-flow article {
  padding: 16px;
  border-radius: 8px;
  background: #f8fafc;
}

.answer-flow span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-weight: 900;
}

.answer-flow h3 {
  margin-top: 10px;
}

.answer-flow p,
.pattern-list p,
.practice-grid p,
.practice-grid li {
  color: #43515f;
}

.materials-section {
  scroll-margin-top: 90px;
}

.materials-grid {
  grid-template-columns: minmax(260px, .95fr) minmax(240px, .75fr) minmax(300px, 1.3fr);
}

.vocab-panel,
.idiom-panel,
.pattern-panel {
  padding: 20px;
}

.vocab-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.vocab-list span {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.vocab-list b {
  color: var(--ink);
}

.vocab-list small {
  color: var(--muted);
}

.quote-stack {
  display: grid;
  gap: 12px;
}

.quote-stack blockquote {
  margin: 0;
  padding: 16px;
  border-left: 5px solid var(--amber);
  border-radius: 8px;
  background: #fff7ed;
}

.quote-stack strong,
.quote-stack span {
  display: block;
}

.quote-stack span {
  margin-top: 6px;
  color: #7c2d12;
}

.pattern-list {
  display: grid;
  gap: 12px;
}

.pattern-list article {
  padding: 14px;
  border-radius: 8px;
  background: #f8fafc;
}

.pattern-list strong,
.pattern-list span {
  display: block;
}

.pattern-list strong {
  color: var(--blue);
  font-size: 1.04rem;
}

.pattern-list span {
  color: var(--muted);
}

.student-practice {
  background:
    linear-gradient(135deg, rgba(31, 138, 112, .08), transparent),
    rgba(255, 255, 255, .9);
}

.practice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.practice-grid article {
  padding: 18px;
}

.practice-grid ul {
  margin: 10px 0 0;
  padding-left: 1.2em;
}

.qa-card,
.bank-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(31, 41, 51, .08);
}

.qa-card {
  position: relative;
  margin: 14px 0;
  overflow: hidden;
}

.qa-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--accent, var(--green));
}

.accent-green { --accent: var(--green); }
.accent-amber { --accent: var(--amber); }
.accent-blue { --accent: var(--blue); }
.accent-red { --accent: var(--red); }
.accent-purple { --accent: var(--purple); }
.accent-teal { --accent: var(--teal); }

.qa-question {
  display: block;
  width: 100%;
  padding: 18px 22px 18px 28px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.52;
  text-align: left;
  cursor: pointer;
}

.qa-question:focus-visible,
.tool-button:focus-visible,
nav a:focus-visible,
.source-link:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .28);
  outline-offset: 2px;
}

.qa-answer {
  padding: 0 24px 22px 28px;
}

.qa-answer p {
  margin: 12px 0 0;
}

body.practice-mode .qa-answer {
  display: none;
}

.qa-card.open .qa-answer {
  display: block;
}

.bank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.bank-card {
  padding: 20px;
}

.bank-card ol {
  margin: 0;
  padding-left: 1.4em;
}

.bank-card li + li {
  margin-top: 8px;
}

.source-panel {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 22px;
}

.source-panel p {
  margin-bottom: 0;
  color: #43515f;
}

.source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  white-space: nowrap;
}

footer {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 860px) {
  .topbar,
  .hero,
  .lesson-grid,
  .observe-panel,
  .framework-strip,
  .answer-flow,
  .materials-grid,
  .practice-grid,
  .exam-strip,
  .study-tools,
  .bank-grid,
  .source-panel {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
  }

  .hero-board {
    min-height: 360px;
  }

  .topic-token {
    width: 82px;
    height: 82px;
    font-size: .9rem;
  }

  .mind-map {
    grid-template-columns: 1fr;
  }

  .map-center {
    min-height: 84px;
    border-radius: 8px;
  }

  .vocab-list {
    grid-template-columns: 1fr;
  }

  .hotspot {
    position: static;
    display: flex;
    margin-top: 8px;
    max-width: none;
    border-radius: 8px;
  }
}

@media print {
  .topbar,
  .hero-board,
  .study-tools,
  .source-panel {
    display: none;
  }

  body {
    background: white;
  }

  main {
    max-width: none;
    padding: 0;
  }

  .qa-card,
  .bank-card,
  .exam-strip div {
    box-shadow: none;
    break-inside: avoid;
  }
}
