:root {
  color-scheme: light;
  --bg: #f3f8f5;
  --paper: #ffffff;
  --paper-soft: #eef8f2;
  --ink: #1f2d2b;
  --muted: #667975;
  --line: #d7e7df;
  --teal: #14746f;
  --teal-dark: #0d5d58;
  --mint: #dff3ea;
  --blue: #2f6f91;
  --blue-soft: #e8f2f8;
  --amber: #b87512;
  --amber-soft: #fff0d2;
  --red: #b84a3c;
  --red-soft: #ffe7e2;
  --shadow: 0 18px 44px rgba(31, 45, 43, 0.12);
  --shadow-soft: 0 12px 28px rgba(31, 45, 43, 0.08);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(20, 116, 111, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(20, 116, 111, 0.045) 1px, transparent 1px),
    var(--bg);
  background-size: 34px 34px;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(215, 231, 223, 0.9);
  background: rgba(243, 248, 245, 0.9);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  width: min(var(--max), calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 900;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.nav-links a.active,
.nav-links a:hover {
  background: var(--mint);
  color: var(--teal-dark);
}

.nav-cta {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #fff !important;
}

.page {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 54px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 22px;
  align-items: stretch;
  min-height: calc(100vh - 126px);
}

.hero-copy,
.hero-visual,
.panel,
.course-card,
.coach-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 46px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.18;
}

h1 {
  max-width: 760px;
  font-size: clamp(38px, 6vw, 68px);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(28px, 4vw, 42px);
}

h3 {
  font-size: 23px;
}

p {
  line-height: 1.75;
}

.lead {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.hero-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.btn.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.btn:hover,
.icon-btn:hover,
.course-card:hover,
.module-item:hover,
.prompt-chip:hover,
.option:hover {
  transform: translateY(-1px);
}

.btn,
.icon-btn,
.course-card,
.module-item,
.prompt-chip,
.option {
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 30px;
}

.stat {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.stat strong {
  display: block;
  color: var(--teal-dark);
  font-size: 26px;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.hero-visual {
  display: grid;
  align-content: space-between;
  gap: 16px;
  padding: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 18%, rgba(223, 243, 234, 0.95), transparent 34%),
    radial-gradient(circle at 82% 82%, rgba(255, 240, 210, 0.95), transparent 36%),
    #fff;
}

.risk-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.risk-node {
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.risk-node.main {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 124px;
  border-color: var(--teal);
  background: var(--mint);
}

.risk-node strong {
  display: block;
  font-size: 18px;
}

.risk-node span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.ring {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  border: 10px solid rgba(20, 116, 111, 0.18);
  border-top-color: var(--teal);
  border-radius: 50%;
  color: var(--teal-dark);
  font-weight: 900;
}

.coach-card {
  padding: 18px;
}

.coach-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.coach-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 900;
}

.coach-card p {
  margin: 12px 0 0;
  color: var(--muted);
}

.section {
  margin-top: 28px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 14px;
}

.section-head p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.course-card {
  min-height: 230px;
  padding: 18px;
}

.course-card .icon,
.module-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: var(--mint);
  color: var(--teal-dark);
  font-weight: 900;
}

.course-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 92px;
  padding: 14px;
}

.toc a,
.toc button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 800;
}

.toc a.active,
.toc button.active,
.toc a:hover,
.toc button:hover {
  background: var(--mint);
  color: var(--teal-dark);
}

.content-stack {
  display: grid;
  gap: 16px;
}

.panel {
  padding: 22px;
}

.module-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.module-item p {
  margin: 8px 0 0;
  color: var(--muted);
}

.module-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
}

.five-grid,
.evidence-grid,
.case-grid {
  display: grid;
  gap: 12px;
}

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

.mini-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.mini-card strong {
  display: block;
}

.mini-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

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

.evidence-card {
  min-height: 150px;
}

.case-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

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

.fact {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fcfa;
}

.fact span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.fact strong {
  display: block;
  margin-top: 4px;
}

.risk-options,
.prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.option,
.prompt-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.option.selected {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

.feedback {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fcfa;
}

.feedback p {
  margin: 8px 0 0;
  color: var(--muted);
}

.quiz-options {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.quiz-option {
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-weight: 800;
}

.quiz-option.correct {
  border-color: var(--teal);
  background: var(--mint);
  color: var(--teal-dark);
}

.quiz-option.wrong {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

.coach-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: 16px;
  align-items: start;
}

.guide-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.guide-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.guide-item strong {
  display: block;
}

.guide-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
}

.coach-sdk-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: stretch;
}

.coach-sdk-copy,
.sdk-entry-card,
.coach-prompt-section,
.scenario-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.coach-sdk-copy {
  padding: clamp(22px, 4vw, 42px);
}

.coach-sdk-copy h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(38px, 7vw, 82px);
  line-height: 0.98;
}

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

.sdk-entry-card {
  position: relative;
  display: flex;
  min-height: 420px;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: clamp(22px, 4vw, 36px);
  background:
    linear-gradient(135deg, rgba(20, 116, 111, 0.12), rgba(255, 255, 255, 0.96) 48%),
    #fff;
}

.sdk-entry-card::after {
  content: "";
  position: absolute;
  right: -74px;
  bottom: -84px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(20, 116, 111, 0.18);
  border-radius: 50%;
}

.sdk-orb {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin-bottom: 20px;
  border-radius: 18px;
  background: var(--teal);
  color: white;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(20, 116, 111, 0.24);
}

.sdk-entry-card h2 {
  max-width: 460px;
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
}

.sdk-entry-card p {
  max-width: 520px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.sdk-steps {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.sdk-steps span {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(20, 116, 111, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--teal-dark);
  font-weight: 900;
}

.sdk-pointer {
  position: absolute;
  right: 22px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--teal);
  font-weight: 900;
}

.sdk-pointer strong {
  font-size: 36px;
  line-height: 1;
}

.coach-prompt-section {
  margin-top: 18px;
  padding: clamp(18px, 3vw, 26px);
}

.section-note {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.prompt-row-large .prompt-chip {
  min-height: 52px;
  padding: 12px 16px;
  font-size: 16px;
}

.prompt-chip.copied {
  border-color: var(--teal);
  background: var(--mint);
  color: var(--teal-dark);
}

.coach-scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.scenario-card {
  padding: 18px;
}

.scenario-card span {
  color: var(--amber);
  font-weight: 900;
}

.scenario-card h3 {
  margin: 10px 0 8px;
  font-size: 22px;
}

.scenario-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.sdk-error-notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  max-width: 340px;
  padding: 14px 16px;
  border: 1px solid #e2a198;
  border-radius: var(--radius);
  background: #fff7f5;
  color: #8a2f24;
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.5;
}

.chat-panel {
  min-height: calc(100vh - 126px);
  display: flex;
  flex-direction: column;
}

.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
}

.dot.ready {
  background: var(--teal);
}

.chat-log {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 360px;
  max-height: 58vh;
  overflow: auto;
  padding: 14px 4px 14px 0;
}

.message {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: var(--radius);
  line-height: 1.68;
}

.message strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.message p {
  margin: 0;
}

.message.bot {
  align-self: flex-start;
  border: 1px solid var(--line);
  background: #f4fbf7;
}

.message.user {
  align-self: flex-end;
  background: var(--teal-dark);
  color: #fff;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.chat-form textarea {
  min-width: 0;
  min-height: 54px;
  max-height: 150px;
  padding: 12px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.icon-btn {
  display: grid;
  place-items: center;
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  background: var(--teal);
  color: #fff;
}

.error-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #edc7bf;
  border-radius: var(--radius);
  background: var(--red-soft);
  color: #8b2e24;
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero,
  .layout,
  .case-grid,
  .coach-layout,
  .coach-sdk-hero {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .toc {
    position: static;
  }

  .course-grid,
  .five-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .guide-list.compact,
  .coach-scenario-grid {
    grid-template-columns: 1fr;
  }

  .sdk-entry-card {
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .page,
  .nav {
    width: min(100% - 20px, var(--max));
  }

  .nav-links a {
    flex: 0 0 auto;
  }

  .hero-copy,
  .hero-visual,
  .panel,
  .course-card,
  .coach-card {
    padding: 16px;
  }

  .hero-stats,
  .course-grid,
  .five-grid,
  .evidence-grid,
  .facts,
  .risk-map,
  .guide-list.compact,
  .coach-scenario-grid {
    grid-template-columns: 1fr;
  }

  .coach-sdk-copy h1 {
    font-size: 38px;
  }

  .sdk-entry-card {
    min-height: 320px;
  }

  .sdk-pointer {
    position: static;
    margin-top: 18px;
  }

  .prompt-row-large .prompt-chip {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }

  .risk-node.main {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .module-item {
    grid-template-columns: 1fr;
  }

  .chat-log {
    max-height: 52vh;
  }
}
