:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-soft: #f1ede4;
  --ink: #20242c;
  --muted: #6a707c;
  --line: #e3ded2;
  --brand: #d9792b;
  --brand-soft: #fbe9d9;
  --green: #16856b;
  --green-soft: #e1f3ed;
  --red: #c84a4a;
  --red-soft: #fbe5e3;
  --blue: #3f6fb5;
  --blue-soft: #e6eef8;
  --teal: #1f8a8c;
  --shadow: 0 12px 30px rgba(43, 37, 28, 0.06);
  --radius: 8px;
  --sidebar-width: 238px;
  --topbar-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
}

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

button {
  font: inherit;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-copy strong {
  font-size: 15px;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
}

.top-progress {
  margin-left: auto;
  width: min(360px, 36vw);
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

.progress-copy span:last-child {
  color: var(--ink);
  font-weight: 700;
}

.progress-track {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #e5a14b);
  transition: width 0.35s ease;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.icon-button:hover {
  color: var(--ink);
  border-color: var(--brand);
  transform: translateY(-1px);
}

.ticker {
  position: relative;
  z-index: 20;
  overflow: hidden;
  height: 34px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 30px;
  min-width: max-content;
  padding-left: 20px;
  white-space: nowrap;
  animation: ticker 22s linear infinite;
}

.ticker-track span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.ticker-track .up {
  color: var(--green);
}

.ticker-track .down {
  color: var(--red);
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar-height) - 34px);
}

.sidebar {
  position: sticky;
  top: calc(var(--topbar-height) + 34px);
  align-self: start;
  height: calc(100vh - var(--topbar-height) - 34px);
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-item:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.nav-item.active {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  font-weight: 700;
}

.nav-item.active .icon {
  color: var(--brand);
}

.sidebar-note {
  margin-top: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.sidebar-note strong,
.sidebar-note span {
  display: block;
}

.sidebar-note strong {
  margin-bottom: 6px;
  font-size: 13px;
}

.sidebar-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.main {
  min-width: 0;
  padding: 48px clamp(20px, 5vw, 76px) 64px;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: page-in 0.32s ease;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.view.active .reveal {
  opacity: 1;
  transform: none;
}

.view.active .delay-1 {
  transition-delay: 0.08s;
}

.view.active .delay-2 {
  transition-delay: 0.16s;
}

.view.active .delay-3 {
  transition-delay: 0.24s;
}

.view.active .delay-4 {
  transition-delay: 0.32s;
}

.hero {
  max-width: 760px;
  padding: 26px 0 28px;
}

.kicker {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.lesson-head h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-subtitle {
  margin: 14px 0 0;
  color: var(--brand);
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 800;
}

.hero-copy {
  max-width: 560px;
  margin: 22px 0 28px;
  color: var(--muted);
  font-size: 17px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  border: 0;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.primary-button:hover {
  background: #333a45;
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.secondary-button:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.text-button {
  padding: 12px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.text-button:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.hero-spark {
  max-width: 860px;
  margin: -12px 0 36px;
}

.hero-spark svg {
  display: block;
  width: 100%;
  height: auto;
}

.spark-grid {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.spark-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 700;
  stroke-dashoffset: 700;
  animation: draw-line 2.2s ease forwards 0.2s;
}

.hero-candle {
  opacity: 0;
  animation: candle-in 0.7s ease forwards;
}

.hero-wick {
  stroke-width: 2;
  stroke-linecap: round;
}

.hero-body {
  stroke: none;
}

.candle-up .hero-wick {
  stroke: var(--green);
}

.candle-up .hero-body {
  fill: var(--green);
}

.candle-down .hero-wick {
  stroke: var(--red);
}

.candle-down .hero-body {
  fill: var(--red);
}

.hero-annotation line {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.hero-annotation circle {
  fill: var(--brand);
}

.hero-annotation-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.hero-chart-title {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

@keyframes candle-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes draw-line {
  to {
    stroke-dashoffset: 0;
  }
}

.section-block {
  margin-top: 8px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

.section-heading .kicker {
  margin-bottom: 7px;
}

.section-hint {
  color: var(--muted);
  font-size: 13px;
}

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

.course-card {
  position: relative;
  display: grid;
  grid-template-columns: 32px 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.course-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.course-card .icon {
  width: 24px;
  height: 24px;
  color: var(--blue);
}

.course-number {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.course-card h3 {
  margin: 0 0 3px;
  font-size: 15px;
  letter-spacing: 0;
}

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

.course-status {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.course-status.done {
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
}

.lesson {
  max-width: 980px;
}

.lesson-head {
  max-width: 760px;
  margin-bottom: 30px;
}

.lesson-head h1 {
  font-size: clamp(30px, 4vw, 46px);
}

.lesson-head > p:last-child {
  max-width: 650px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
}

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

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

.concept-tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.concept-tag.up {
  background: var(--green-soft);
  color: var(--green);
}

.concept-tag.down {
  background: var(--red-soft);
  color: var(--red);
}

.concept-tag.neutral {
  background: var(--blue-soft);
  color: var(--blue);
}

.concept-card h3 {
  margin: 14px 0 7px;
  font-size: 15px;
}

.concept-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.panel {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.panel-head .kicker {
  margin-bottom: 6px;
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.segment {
  padding: 8px 13px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.segment:hover {
  color: var(--ink);
}

.segment.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(43, 37, 28, 0.08);
}

.chart-wrap {
  width: 100%;
  overflow: hidden;
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.axis-label {
  fill: var(--muted);
  font-size: 11px;
}

.candle {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.candle:hover {
  opacity: 0.72;
}

.candle-body {
  stroke: none;
}

.candle-wick {
  stroke-width: 2;
  stroke-linecap: round;
}

.candle-up .candle-body {
  fill: var(--green);
}

.candle-up .candle-wick {
  stroke: var(--green);
}

.candle-down .candle-body {
  fill: var(--red);
}

.candle-down .candle-wick {
  stroke: var(--red);
}

.tech-bg-wick {
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.18;
}

.tech-bg-body {
  stroke: none;
  opacity: 0.18;
}

.tech-bg-candle.up .tech-bg-wick {
  stroke: var(--green);
}

.tech-bg-candle.up .tech-bg-body {
  fill: var(--green);
}

.tech-bg-candle.down .tech-bg-wick {
  stroke: var(--red);
}

.tech-bg-candle.down .tech-bg-body {
  fill: var(--red);
}

.chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  opacity: 0.12;
}

.chart-legend {
  fill: var(--muted);
  font-size: 11px;
}

.anatomy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.anatomy-panel {
  margin-top: 18px;
}

.anatomy-panel h2 {
  margin: 0 0 20px;
  font-size: 18px;
}

.candle-demo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 74px;
  margin: 0 auto 12px;
}

.anatomy-demo {
  position: relative;
  width: 100%;
  max-width: 260px;
  height: 240px;
  margin: 0 auto 12px;
}

.anatomy-demo .candle-demo {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  transform: translate(-50%, -50%);
}

.anatomy-arrows {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sketch-line {
  fill: none;
  stroke: #6a707c;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sketch-label {
  fill: #6a707c;
  font-size: 11px;
  font-weight: 700;
}

.candle-demo .wick {
  display: block;
  width: 2px;
  height: 54px;
  background: var(--ink);
}

.candle-demo .body {
  display: block;
  width: 46px;
  height: 90px;
  border-radius: 3px;
}

.candle-demo .body.up {
  background: var(--green);
}

.candle-demo .body.down {
  background: var(--red);
}

.anatomy-labels {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.anatomy-labels span {
  display: flex;
  justify-content: space-between;
}

.anatomy-labels span::after {
  content: "";
  width: 16px;
  border-top: 1px dashed var(--line);
  align-self: center;
}

.challenge {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.challenge-copy h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.challenge-copy p {
  margin: 0;
  color: var(--muted);
}

.challenge-candle {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 60px;
  margin: 18px auto;
}

.challenge-candle .wick {
  display: block;
  width: 2px;
  height: 30px;
  background: var(--ink);
}

.challenge-candle .body {
  display: block;
  width: 34px;
  height: 54px;
  border-radius: 3px;
  background: var(--green);
}

.challenge-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.challenge-feedback {
  min-height: 24px;
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.challenge-feedback.correct {
  color: var(--green);
}

.challenge-feedback.wrong {
  color: var(--red);
}

.lesson-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.compare-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  border-top: 4px solid var(--blue);
}

.compare-card.short {
  border-top-color: var(--red);
}

.compare-badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.compare-card.short .compare-badge {
  background: var(--red-soft);
  color: var(--red);
}

.compare-card h3 {
  margin: 14px 0 7px;
  font-size: 18px;
}

.compare-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.stat-pill,
.phase-pill {
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.phase-pill.bull {
  background: var(--green-soft);
  color: var(--green);
}

.phase-pill.bear {
  background: var(--red-soft);
  color: var(--red);
}

.short-lab {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
}

.short-gauge svg {
  display: block;
  width: 100%;
  height: auto;
}

.gauge-profit {
  fill: var(--green-soft);
}

.gauge-loss {
  fill: var(--red-soft);
}

.short-gauge line {
  stroke: var(--line);
  stroke-width: 1;
}

.short-gauge #shortMarker {
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  transition: y1 0.18s ease, y2 0.18s ease;
}

.short-controls label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.scrubber {
  width: 100%;
  accent-color: var(--brand);
}

.short-value {
  margin-top: 12px;
  color: var(--muted);
}

.short-value strong {
  color: var(--ink);
}

.short-result {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.short-result span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.short-result strong {
  display: block;
  font-size: 26px;
}

.short-result p {
  margin: 6px 0 0;
  font-size: 13px;
}

.short-result.positive strong {
  color: var(--green);
}

.short-result.negative strong {
  color: var(--red);
}

.risk-card {
  margin-top: 18px;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid #f0c7a2;
  border-radius: 8px;
  background: var(--brand-soft);
}

.risk-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.risk-card p {
  margin: 0;
  color: #74410e;
  font-size: 14px;
}

.flow-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 18px;
}

.flow-step {
  flex: 1;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.flow-step span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.flow-step strong,
.flow-step small {
  display: block;
}

.flow-step strong {
  font-size: 14px;
}

.flow-step small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.flow-arrow {
  align-self: center;
  color: var(--brand);
  font-size: 20px;
}

.story-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.story-step {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.story-step-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.story-step h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.story-step p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.story-arrow {
  align-self: center;
  color: var(--brand);
  font-size: 24px;
  font-weight: 800;
}

.rule-list {
  display: grid;
  gap: 10px;
}

.rule-item {
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.rule-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 14px;
}

.rule-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.strategy-switch {
  margin-bottom: 18px;
}

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

.stat {
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-soft);
}

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

.stat strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.scrubber {
  margin-top: 18px;
}

.cycle-readout {
  margin-top: 10px;
}

.cycle-readout p {
  margin: 0;
  color: var(--muted);
}

.emotion-scale {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.emotion-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.emotion-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  background: linear-gradient(90deg, var(--blue), var(--brand), var(--red));
  transition: width 0.2s ease;
}

.emotion-copy {
  margin: 14px 0 0;
  color: var(--muted);
  text-align: center;
}

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

.myth-card {
  position: relative;
  height: 160px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  perspective: 900px;
}

.myth-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  backface-visibility: hidden;
  transition: transform 0.55s ease;
  text-align: left;
}

.myth-face.front {
  color: var(--ink);
}

.myth-face.front small {
  color: var(--brand);
  font-weight: 700;
}

.myth-face.back {
  background: var(--blue-soft);
  transform: rotateY(180deg);
}

.myth-face.back span {
  color: #234a75;
  font-size: 16px;
  font-weight: 700;
}

.myth-face.back strong {
  color: #234a75;
  font-size: 17px;
}

.myth-card.flipped .myth-face.front {
  transform: rotateY(-180deg);
}

.myth-card.flipped .myth-face.back {
  transform: rotateY(0);
}

.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.calculator-grid .panel {
  margin-top: 0;
}

.calculator-grid h2 {
  margin: 0 0 18px;
  font-size: 19px;
}

.calculator-grid label {
  display: flex;
  justify-content: space-between;
  margin: 14px 0 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.number-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.calc-results {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.calc-results div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.calc-results span {
  color: var(--muted);
  font-size: 13px;
}

.calc-results strong {
  font-size: 15px;
}

.calc-results .warn {
  color: var(--red);
}

.quiz-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.quiz-question h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

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

.quiz-option {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.quiz-option:hover {
  border-color: var(--brand);
  transform: translateX(2px);
}

.quiz-option.correct {
  border-color: var(--green);
  background: var(--green-soft);
}

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

.quiz-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.quiz-result {
  margin-top: 18px;
  text-align: center;
}

.quiz-result h2 {
  margin: 0;
  font-size: 28px;
}

.quiz-result p {
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

.locked-hint {
  color: var(--muted);
}

.course-card.locked {
  cursor: default;
  background: var(--surface-soft);
  color: var(--muted);
}

.course-card.locked:hover {
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}

.course-card.locked .icon {
  color: var(--muted);
}

.course-card.locked .course-status {
  background: var(--line);
  color: var(--muted);
}

.share-experiment {
  display: grid;
  gap: 18px;
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(20, minmax(0, 1fr));
  gap: 3px;
}

.share-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--surface-soft);
  transition: background 0.18s ease, transform 0.18s ease;
}

.share-cell.owned {
  background: var(--brand);
}

.share-cell:hover {
  transform: scale(1.08);
}

.price-sim {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.force-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.force-card.buyer {
  background: #e4f3ed;
  border-color: #b9dfd1;
}

.force-card.seller {
  background: #f8e5e3;
  border-color: #e6b7b3;
}

.force-card.buyer:hover {
  border-color: var(--green);
  box-shadow: 0 8px 20px rgba(22, 133, 107, 0.1);
  transform: translateY(-2px);
}

.force-card.seller:hover {
  border-color: var(--red);
  box-shadow: 0 8px 20px rgba(200, 74, 74, 0.1);
  transform: translateY(-2px);
}

.force-card:active {
  transform: scale(0.98);
}

.force-card > span:first-child {
  font-weight: 800;
}

.force-card.buyer > span:first-child {
  color: var(--green);
}

.force-card.seller > span:first-child {
  color: var(--red);
}

.force-card strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.force-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.force-fill {
  display: block;
  width: 50%;
  height: 100%;
  transition: width 0.2s ease, background 0.2s ease;
}

.force-card.buyer .force-fill {
  background: var(--green);
}

.force-card.seller .force-fill {
  background: var(--red);
}

.liquid-tilt-card {
  margin: 6px 0 20px;
}

.liquid-tilt-inner {
  position: relative;
  display: flex;
  height: 190px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  transform-origin: center;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.liquid-tilt-inner.buyer-more {
  transform: rotate(-2.5deg);
}

.liquid-tilt-inner.seller-more {
  transform: rotate(2.5deg);
}

.liquid-side {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px;
  border: 0;
  overflow: hidden;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
}

.liquid-side.buyer {
  background: rgba(228, 243, 237, 0.5);
}

.liquid-side.seller {
  background: rgba(248, 229, 227, 0.5);
}

.liquid-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50%;
  transition: height 0.6s ease;
}

.liquid-side.buyer .liquid-wave {
  background: linear-gradient(180deg, rgba(22, 133, 107, 0.2), rgba(22, 133, 107, 0.78));
}

.liquid-side.seller .liquid-wave {
  background: linear-gradient(180deg, rgba(200, 74, 74, 0.2), rgba(200, 74, 74, 0.78));
}

.liquid-divider {
  width: 3px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
  z-index: 2;
}

.liquid-label {
  position: relative;
  z-index: 1;
  font-size: 15px;
  font-weight: 800;
}

.liquid-sub {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
}

.liquid-readout {
  margin-top: 10px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.book-quote {
  margin-top: 18px;
  padding: 18px 20px;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: var(--brand-soft);
}

.book-quote p {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.book-quote span {
  color: #7a4a18;
  font-size: 12px;
  font-weight: 700;
}

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

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

.book-tag {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.book-card blockquote {
  margin: 14px 0 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
}

.book-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.story-box {
  margin: 18px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--blue-soft);
}

.story-box strong {
  display: block;
  margin-bottom: 6px;
  color: #234a75;
  font-size: 13px;
  font-weight: 800;
}

.story-box p {
  margin: 0;
  color: #33506b;
  font-size: 15px;
  line-height: 1.7;
}

.tool-copy {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.tool-result {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 700;
}

.tool-result.win {
  background: var(--green-soft);
  color: var(--green);
}

.tool-result.loss {
  background: var(--red-soft);
  color: var(--red);
}

.asset-result {
  margin-top: 18px;
  padding: 16px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.asset-result strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.asset-result p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.stock-slider-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.stock-slider-card label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stock-slider-card label span {
  color: var(--ink);
}

.stock-slider-card .scrubber {
  margin-top: 16px;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    overflow-y: hidden;
  }

  .nav {
    flex-direction: row;
    gap: 8px;
    min-width: max-content;
  }

  .nav-item {
    white-space: nowrap;
  }

  .sidebar-note {
    display: none;
  }

  .topbar {
    padding: 0 18px;
    gap: 14px;
  }

  .brand {
    min-width: auto;
  }

  .brand-copy small {
    display: none;
  }

  .top-progress {
    width: min(240px, 42vw);
  }

  .concept-row,
  .myth-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .index-basket {
    grid-template-columns: 1fr;
  }

  .book-shelf {
    grid-template-columns: 1fr;
  }

  .flow-row {
    flex-wrap: wrap;
  }

  .story-steps {
    grid-template-columns: 1fr;
  }

  .story-arrow {
    display: none;
  }

  .flow-step {
    min-width: calc(50% - 10px);
  }

  .flow-arrow {
    display: none;
  }
}

@media (max-width: 640px) {
  .topbar {
    height: 64px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .main {
    padding: 32px 16px 48px;
  }

  .hero {
    padding-top: 14px;
  }

  .course-grid,
  .anatomy-grid,
  .compare-grid,
  .calculator-grid {
    grid-template-columns: 1fr;
  }

  .price-sim {
    grid-template-columns: 1fr;
  }

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

  .course-card {
    grid-template-columns: 28px 36px minmax(0, 1fr) auto;
    padding: 15px;
  }

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

  .lesson-actions {
    flex-direction: column-reverse;
  }

  .lesson-actions .primary-button,
  .lesson-actions .text-button {
    justify-content: center;
    width: 100%;
  }

  .short-lab {
    grid-template-columns: 1fr;
  }

  .short-gauge {
    max-width: 220px;
    margin: 0 auto;
  }

  .concept-row,
  .myth-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .flow-step {
    min-width: 100%;
  }

  .footer {
    flex-direction: column;
    gap: 6px;
    padding: 20px 18px;
  }
}
