:root {
  color-scheme: dark;
  --bg: #080e18;
  --surface: #0c1623;
  --surface2: #122232;
  --line: #253747;
  --text: #edf2f4;
  --muted: #94a8b9;
  --dim: #8495a5;
  --accent: #78e1d5;
  --buy: #78e1d5;
  --sell: #f29a89;
  --amber: #e8bd7d;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-family: var(--sans);
  font-synthesis: none;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  touch-action: manipulation;
}
button {
  color: inherit;
  border: 0;
  background: transparent;
  transition:
    background 0.18s,
    color 0.18s,
    transform 0.18s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}
[hidden] {
  display: none !important;
}
::selection {
  background: #d7ef8544;
}
h1,
h2,
p {
  margin: 0;
}
input,
select,
textarea {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  background: #0b1420;
  border-radius: 6px;
  color: var(--text);
  padding: 11px 12px;
  width: 100%;
  min-height: 44px;
}
textarea {
  resize: vertical;
}
input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  accent-color: var(--accent);
}
input[type="number"] {
  font-family: var(--mono);
}
label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 16px 0 7px;
}
label .muted {
  font-size: 12px;
  float: right;
}
select {
  cursor: pointer;
}
progress {
  width: 100%;
  height: 3px;
  appearance: none;
  border: 0;
  background: var(--line);
  display: block;
  border-radius: 0;
}
progress::-webkit-progress-bar {
  background: var(--line);
}
progress::-webkit-progress-value {
  background: var(--accent);
}
progress::-moz-progress-bar {
  background: var(--accent);
}
.skip {
  position: fixed;
  top: -70px;
  left: 10px;
  z-index: 100;
  background: var(--accent);
  color: #111;
  padding: 15px;
}
.skip:focus {
  top: 10px;
}
.topbar {
  height: 84px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 30px;
  gap: 30px;
  background: #0b1420;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 19px;
  letter-spacing: 2px;
  font-weight: 700;
  min-width: 226px;
}
.brand-sub {
  display: block;
  font-size: 9px;
  letter-spacing: 4px;
  margin-top: 5px;
  font-weight: 500;
  color: var(--muted);
}
.brand-sub b {
  font-size: 9px;
  letter-spacing: 0.3px;
  margin-left: 8px;
  font-weight: 400;
}
.brand-symbol {
  display: block;
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid #bb944b;
  background: #161616;
}
.brand-symbol > img {
  position: absolute;
  width: 202%;
  height: 202%;
  max-width: none;
  left: -51%;
  top: -33%;
  mask: url('/brand-mask.svg') center / 100% 100% no-repeat;
}
.mode-nav {
  height: 100%;
  display: flex;
  align-items: stretch;
  gap: 32px;
  margin: auto;
}
.mode-nav button {
  position: relative;
  padding: 0 3px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
.mode-nav button.active {
  color: var(--accent);
}
.mode-nav button.active:after {
  content: "";
  height: 2px;
  background: var(--accent);
  bottom: -1px;
  left: 0;
  right: 0;
  position: absolute;
}
.mode-nav button:hover {
  color: var(--text);
}
.nav-tag {
  font: 10px var(--mono);
  background: #1b3536;
  color: var(--accent);
  padding: 3px 5px;
  margin-left: 8px;
  border-radius: 3px;
}
.live-dot {
  display: inline-block;
  margin-left: 9px;
  width: 5px;
  height: 5px;
  background: var(--buy);
  border-radius: 100%;
}
.quiet {
  color: var(--muted);
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 5px;
}
.quiet:hover {
  background: var(--surface2);
  color: var(--text);
}
.help-button {
  font-size: 13px;
  white-space: nowrap;
}
.help-button span {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  margin-left: 12px;
}
.app-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  max-width: 1920px;
  margin: auto;
}
.sidebar {
  border-right: 1px solid var(--line);
  padding: 30px 20px 24px;
  min-height: calc(100vh - 84px);
}
.sidebar-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
.sidebar-heading span:last-child {
  font: 11px var(--mono);
}
.sidebar progress {
  margin: 13px 0 30px;
}
.course-group {
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 1.5px;
  margin: 24px 12px 12px;
}
.course-link {
  width: 100%;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 11px;
  min-height: 43px;
  padding: 9px 12px;
  border-radius: 5px;
  font-size: 13px;
  color: #b8c1b5;
  line-height: 1.5;
  margin: 3px 0;
}
.course-link:hover {
  background: var(--surface2);
}
.course-link.active {
  background: #d7ef8512;
  color: var(--accent);
}
.course-link .course-number {
  font: 11px var(--mono);
  color: var(--dim);
  width: 19px;
  flex-shrink: 0;
}
.course-link.active .course-number {
  color: var(--accent);
}
.course-link .course-check {
  margin-left: auto;
  font-size: 12px;
  color: var(--accent);
}
.sidebar-bottom {
  margin-top: 40px;
  padding: 22px 8px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #c2cbbf;
}
.sidebar-bottom small {
  display: block;
  font-size: 11px;
  color: var(--dim);
  margin-top: 7px;
}
.outline-icon {
  border: 1px solid var(--line);
  height: 32px;
  width: 32px;
  display: grid;
  place-items: center;
  color: var(--accent);
  border-radius: 50%;
}
main {
  padding: 34px 36px 0;
  min-width: 0;
  outline: none;
}
.page-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 29px;
  gap: 25px;
}
.eyebrow {
  font: 11px var(--mono);
  letter-spacing: 2.3px;
  color: var(--accent);
  margin-bottom: 13px;
}
h1 {
  font-size: clamp(24px, 2.3vw, 38px);
  font-weight: 550;
  letter-spacing: -0.8px;
  line-height: 1.45;
}
.intro-text {
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
  margin-top: 10px;
  max-width: 780px;
}
.chapter-mark {
  font: 58px var(--mono);
  font-weight: 200;
  letter-spacing: -4px;
  color: #414c3b;
  display: flex;
  align-items: baseline;
  flex-shrink: 0;
}
.chapter-mark span {
  font-size: 14px;
  letter-spacing: 0;
  margin-left: 10px;
  color: var(--dim);
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 24px;
  align-items: start;
}
.market-column {
  min-width: 0;
}
.market-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.market-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 19px 22px 0;
}
.instrument {
  display: flex;
  align-items: center;
  gap: 10px;
}
.coin-symbol {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: #323825;
  color: var(--accent);
  border: 1px solid #455038;
  border-radius: 50%;
  font-size: 23px;
}
.instrument strong {
  font: 14px var(--mono);
  font-weight: 600;
}
.instrument small {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--dim);
  display: block;
  margin-top: 5px;
}
.source-badge {
  font-size: 11px;
  border: 1px solid #3b4434;
  color: #b6c89b;
  padding: 5px 8px;
  border-radius: 4px;
  margin-left: auto;
  text-align: center;
}
.source-badge.live {
  color: var(--buy);
  border-color: #71d9b24d;
}
.source-badge.error {
  color: var(--amber);
  border-color: #e8c58a55;
}
.icon-button {
  font-size: 23px;
  width: 40px;
  height: 40px;
  color: var(--muted);
  border-radius: 4px;
}
.icon-button:hover {
  background: var(--surface2);
}
.price-strip {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 22px 22px;
  flex-wrap: wrap;
}
.price-strip > strong {
  font: 30px var(--mono);
  letter-spacing: -1px;
}
.price-strip > span {
  font: 11px var(--mono);
  color: var(--muted);
}
.price-strip .spread-label {
  margin-left: auto;
  font: 11px var(--sans);
}
.spread-label b {
  font-family: var(--mono);
  color: var(--text);
  font-weight: 400;
}
.zoom-bar {
  display: flex;
  align-items: center;
  border-block: 1px solid var(--line);
  padding: 10px 19px;
  gap: 10px;
}
.zoom-label {
  font-size: 11px;
  color: var(--dim);
  margin-right: auto;
  white-space: nowrap;
}
.zoom-options {
  display: flex;
  align-items: center;
  gap: 3px;
}
.zoom-options button {
  font-size: 12px;
  padding: 9px 10px;
  border-radius: 4px;
  min-height: 36px;
  color: var(--muted);
  white-space: nowrap;
}
.zoom-options button span {
  font: 10px var(--mono);
  margin-right: 6px;
  opacity: 0.7;
}
.zoom-options button.active {
  background: var(--accent);
  color: #20281a;
  font-weight: 600;
}
.zoom-options button:hover:not(.active) {
  background: #2a3229;
}
.zoom-arrow {
  color: #53604e;
  font-size: 16px;
}
.visual-stage {
  background:
    radial-gradient(ellipse at 50% 35%, #2531233d, transparent 70%), #141915;
  position: relative;
  overflow: hidden;
}
.stage-caption {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 22px 0;
  font-size: 11px;
  color: var(--dim);
  min-height: 46px;
}
.stage-caption span:first-child {
  font: 10px var(--mono);
  letter-spacing: 2px;
  color: #c0cbb8;
}
.stage-caption span:last-child {
  text-align: right;
}
#market-viz {
  width: 100%;
  height: auto;
  display: block;
  min-height: 260px;
  max-height: 440px;
}
svg text {
  font-family: var(--mono);
  font-size: 12px;
}
svg .cn {
  font-family: var(--sans);
}
svg [role="button"] {
  cursor: pointer;
}
svg [role="button"]:hover .hit {
  fill: #d7ef8510;
}
svg [role="button"]:focus-visible {
  outline: 1px solid var(--accent);
}
.stage-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 3px 22px 16px;
  color: var(--muted);
  font-size: 10px;
}
.buy-key,
.sell-key {
  width: 6px;
  height: 6px;
  display: inline-block;
  background: var(--buy);
  margin-right: 5px;
}
.sell-key {
  background: var(--sell);
  margin-left: 15px;
}
.zoom-controls {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}
.zoom-controls button {
  width: 35px;
  height: 32px;
  font-size: 18px;
  color: var(--muted);
}
.zoom-controls button:hover {
  background: var(--surface2);
}
.zoom-controls span {
  font: 10px var(--mono);
  color: var(--accent);
  padding: 0 6px;
}
.market-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  padding: 20px 5px;
}
.market-metrics > div {
  padding: 0 15px;
  border-right: 1px solid var(--line);
}
.market-metrics > div:last-child {
  border: 0;
}
.market-metrics span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}
.market-metrics abbr {
  border: 0;
  text-decoration: none;
}
.market-metrics strong {
  display: block;
  font: 18px var(--mono);
  margin: 10px 0 6px;
  white-space: nowrap;
}
.market-metrics small {
  font-size: 9px;
  color: var(--dim);
}
.positive {
  color: var(--buy) !important;
}
.negative {
  color: var(--sell) !important;
}
.flow-charts {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #151a16;
}
.flow-charts > div {
  padding: 15px 18px 5px;
  min-width: 0;
}
.flow-charts > div + div {
  border-left: 1px solid var(--line);
}
.mini-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 10px var(--mono);
  color: var(--muted);
}
.mini-heading b {
  font: 10px var(--sans);
  margin-left: 8px;
  color: var(--dim);
}
.flow-charts svg {
  width: 100%;
  display: block;
  height: auto;
  max-height: 100px;
  margin-top: 8px;
}
.coach-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.coach-card {
  border: 1px solid #46513b;
  background: linear-gradient(150deg, #252d20, #1b211a 75%);
  border-radius: 10px;
  padding: 22px;
}
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 10px var(--mono);
  letter-spacing: 1.3px;
  color: var(--muted);
  gap: 7px;
  line-height: 1.6;
}
.section-label b {
  font: 12px var(--sans);
  color: var(--text);
  margin-left: 10px;
  letter-spacing: 0;
  font-weight: 400;
}
.spark {
  color: var(--accent);
  font-size: 20px;
  margin-right: auto;
}
.coach-card > .section-label {
  justify-content: flex-start;
  font-size: 9px;
  letter-spacing: 1.4px;
  color: #c1d2a8;
}
.coach-card h2 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.65;
  margin: 19px 0 13px;
  letter-spacing: -0.3px;
}
.coach-card > p {
  font-size: 13px;
  color: #b1bdab;
  line-height: 1.95;
}
.task-action {
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid #425037;
  margin-top: 21px;
  padding-top: 18px;
  margin-bottom: 15px;
}
.step-circle {
  font: 11px var(--mono);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #63704f;
  border-radius: 50%;
  color: var(--accent);
  flex-shrink: 0;
}
.task-action p {
  font-size: 12px;
  color: #d5dfca;
}
.primary {
  background: var(--accent);
  color: #242d1c;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--accent);
  padding: 13px 15px;
  min-height: 46px;
  width: 100%;
  text-align: left;
  border-radius: 5px;
  line-height: 1.5;
}
.primary span {
  float: right;
  margin-left: 8px;
}
.primary:hover {
  background: #e4f7ad;
  border-color: #e4f7ad;
}
.result-message {
  font-size: 11px;
  line-height: 1.8;
  color: #b6c4a7;
  margin: 12px 0;
  min-height: 39px;
}
.switch-row {
  display: flex;
  align-items: center;
  gap: 7px;
  border-top: 1px solid #3c4832;
  padding-top: 13px;
  margin: 15px 0 0;
  font-size: 11px;
}
.switch-row input {
  margin: 0;
}
.switch-row small {
  margin-left: auto;
  color: var(--dim);
  font-size: 9px;
}
.order-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}
.order-card > .section-label {
  font-size: 9px;
}
.paper-label {
  font: 9px var(--mono);
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  letter-spacing: 1px;
  color: var(--accent);
}
.side-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #101511;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 19px;
}
.side-toggle button {
  padding: 10px;
  font-size: 12px;
  color: var(--dim);
  border-radius: 3px;
  min-height: 39px;
}
.side-toggle button.selected[data-side="buy"] {
  background: #71d9b218;
  color: var(--buy);
}
.side-toggle button.selected[data-side="sell"] {
  background: #f59b9c18;
  color: var(--sell);
}
.order-card label {
  font-size: 11px;
}
.order-card input,
.order-card select {
  font-size: 12px;
  padding: 10px;
}
.input-row {
  display: flex;
  gap: 10px;
}
.input-row > div {
  flex: 1;
  min-width: 0;
}
.buy-submit {
  width: 100%;
  padding: 12px;
  border: 1px solid #71d9b252;
  color: var(--buy);
  background: #71d9b213;
  border-radius: 5px;
  margin-top: 17px;
  min-height: 44px;
  font-size: 12px;
}
.buy-submit span {
  float: right;
}
.buy-submit:hover {
  background: #71d9b22a;
}
.buy-submit.sell {
  border-color: #f59b9c52;
  color: var(--sell);
  background: #f59b9c13;
}
.small-copy {
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
  margin-top: 10px;
}
.own-order {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}
.own-order button {
  color: var(--sell);
  padding: 8px 4px;
}
.own-order small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}
.quiz-card {
  padding: 20px 0;
}
.quiz-card .section-label {
  color: var(--dim);
}
.quiz-card h2 {
  font-size: 14px;
  line-height: 1.8;
  font-weight: 500;
  margin: 15px 0;
}
.quiz-option {
  display: flex;
  text-align: left;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 8px;
  min-height: 44px;
}
.quiz-option > span {
  font: 10px var(--mono);
  color: var(--dim);
}
.quiz-option:hover {
  background: var(--surface2);
}
.quiz-option.correct {
  border-color: var(--buy);
  color: var(--buy);
  background: #71d9b20a;
}
.quiz-option.incorrect {
  border-color: var(--sell);
  color: var(--sell);
}
#quiz-feedback {
  font-size: 12px;
  color: var(--accent);
  line-height: 1.8;
  margin: 12px 0;
}
.full {
  width: 100%;
}
#next-lesson {
  text-align: left;
  border-top: 1px solid var(--line);
  border-radius: 0;
  margin-top: 10px;
  font-size: 12px;
  padding-inline: 0;
}
#next-lesson span {
  float: right;
}
.timeline-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 21px;
}
.timeline-panel .section-label {
  font-size: 9px;
}
.timeline-panel .section-label > span:last-child {
  font-size: 10px;
  letter-spacing: 0;
  color: var(--dim);
}
#event-tape {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  min-height: 44px;
}
.event-row {
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.event-row > span:first-child {
  font: 10px var(--mono);
  color: var(--dim);
  min-width: 28px;
}
.event-row.new {
  color: #d6dfcb;
}
.event-bullet {
  height: 5px;
  width: 5px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  margin-right: 9px;
}
.knowledge-panel {
  margin: 24px 0 20px;
  padding: 8px 2px;
}
.knowledge-panel > p {
  font-size: 14px;
  line-height: 2;
  color: #bbc6b7;
  margin: 14px 0 17px;
}
.pitfall {
  display: flex;
  gap: 17px;
  padding: 16px 18px;
  background: #e8c58a07;
  border-left: 2px solid #b7a373;
}
.pitfall > span {
  font-size: 11px;
  color: var(--amber);
  white-space: nowrap;
  line-height: 1.9;
}
.pitfall p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.data-panel details {
  border-block: 1px solid var(--line);
}
summary {
  padding: 17px 0;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  list-style: none;
}
summary > span {
  float: right;
}
details p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 16px;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font: 12px var(--mono);
  text-align: right;
}
th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
th {
  font-weight: 400;
  color: var(--dim);
}
caption {
  text-align: left;
  margin: 8px 0;
  font: 12px var(--sans);
  color: var(--muted);
}
.source-links {
  margin-top: 20px !important;
}
.source-links a {
  color: var(--accent);
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 35px 0 24px;
  margin-top: 20px;
  color: var(--dim);
  font-size: 10px;
  line-height: 1.8;
}
footer > span:first-child {
  font: 9px var(--mono);
  letter-spacing: 1px;
}
footer b {
  font-weight: 400;
  color: var(--muted);
  margin-left: 16px;
}
.mobile-course {
  display: none;
}
.secondary {
  border: 1px solid #556246;
  border-radius: 5px;
  min-height: 44px;
  padding: 10px;
  color: #d6e6c4;
  font-size: 12px;
  background: #d7ef8508;
}
.secondary:hover {
  background: #d7ef851a;
}
.replay-controls {
  display: flex;
  gap: 5px;
  margin: 12px 0;
  align-items: center;
}
.replay-controls > * {
  flex: 1;
  font-size: 11px;
  padding: 9px 7px;
}
.coach-card textarea,
.coach-card input,
.coach-card select {
  font-size: 12px;
}
.coach-card label {
  font-size: 11px;
}
.coach-card #lock-thesis {
  margin-top: 16px;
}
.review {
  font-size: 12px;
  line-height: 1.9;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  color: #d0dfbf;
}
.review strong {
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}
.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 10px;
  border-top: 1px solid var(--line);
  margin-top: 17px;
  padding-top: 17px;
}
.account-grid span {
  font-size: 10px;
  color: var(--dim);
}
.account-grid strong {
  font: 13px var(--mono);
  display: block;
  margin-top: 6px;
}
.account-note {
  font-size: 10px;
  color: var(--dim);
  line-height: 1.8;
  margin-top: 15px;
}
dialog {
  border: 1px solid #546049;
  border-radius: 14px;
  max-width: 540px;
  width: calc(100% - 40px);
  background: #1b221b;
  color: var(--text);
  padding: 36px;
  box-shadow: 0 25px 100px #0009;
}
dialog::backdrop {
  background: #070d0bd6;
  backdrop-filter: blur(5px);
}
dialog h2 {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 20px;
}
dialog p,
dialog li {
  font-size: 14px;
  line-height: 1.9;
  color: #becbb6;
}
dialog ol {
  padding-left: 20px;
}
dialog li {
  margin: 12px 0;
}
.dialog-close {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 25px;
  color: var(--muted);
  width: 40px;
  height: 40px;
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #1b2515;
  padding: 13px 22px;
  font-size: 13px;
  border: 1px solid #f1ffcb;
  border-radius: 7px;
  max-width: 90%;
  box-shadow: 0 12px 40px #0006;
  z-index: 20;
}
.funding-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  font-size: 12px;
  color: var(--amber);
  line-height: 1.9;
  margin-top: 14px;
}
@media (min-width: 1600px) {
  .app-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  main {
    padding: 40px 46px 0;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 334px;
    gap: 28px;
  }
  .sidebar {
    padding-inline: 26px;
  }
  .coach-card {
    padding: 25px;
  }
  #market-viz {
    max-height: 480px;
  }
  .intro-text {
    font-size: 15px;
  }
  .market-metrics strong {
    font-size: 22px;
  }
}
@media (max-width: 1250px) {
  .app-layout {
    grid-template-columns: 195px minmax(0, 1fr);
  }
  main {
    padding: 25px 22px 0;
  }
  .sidebar {
    padding-inline: 12px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 16px;
  }
  .course-link {
    font-size: 12px;
    padding-inline: 9px;
  }
  .coach-card {
    padding: 18px;
  }
  .market-metrics > div {
    padding-inline: 10px;
  }
  .market-metrics strong {
    font-size: 15px;
  }
  .zoom-label {
    display: none;
  }
  .zoom-bar {
    justify-content: center;
    padding-inline: 8px;
  }
  .market-toolbar {
    padding-inline: 16px;
  }
  .stage-caption {
    padding-inline: 16px;
  }
  .source-badge {
    font-size: 10px;
  }
  .chapter-mark {
    font-size: 44px;
  }
  .market-metrics small {
    font-size: 9px;
  }
  .brand {
    min-width: 195px;
  }
  .topbar {
    padding-inline: 22px;
    gap: 20px;
  }
  .mode-nav {
    gap: 24px;
  }
  .help-button {
    font-size: 11px;
  }
}
@media (max-width: 1050px) {
  .app-layout {
    grid-template-columns: 175px minmax(0, 1fr);
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .coach-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
  }
  .quiz-card {
    grid-column: 1/-1;
    padding: 15px;
  }
  .quiz-card #quiz-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .market-column {
    display: contents;
  }
  .market-panel {
    grid-row: 1;
  }
  .coach-column {
    grid-row: 2;
  }
  .timeline-panel {
    grid-row: 3;
    margin-top: 0;
  }
  .knowledge-panel {
    grid-row: 4;
    margin: 10px 0;
  }
  .data-panel {
    grid-row: 5;
  }
  .intro-text {
    font-size: 13px;
  }
  .chapter-mark {
    display: none;
  }
  .brand {
    font-size: 16px;
    min-width: 180px;
  }
  .topbar {
    gap: 15px;
  }
  .help-button {
    font-size: 0;
  }
  .help-button span {
    font-size: 12px;
  }
  .mode-nav {
    gap: 20px;
  }
  .sidebar {
    padding-top: 25px;
  }
  .course-link {
    font-size: 11px;
    gap: 6px;
  }
  #market-viz {
    max-height: 400px;
    min-height: 250px;
  }
}
@media (max-width: 720px) {
  :root {
    font-size: 16px;
  }
  .topbar {
    height: auto;
    min-height: 105px;
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 16px 19px 0;
    gap: 11px;
  }
  .brand {
    font-size: 15px;
    letter-spacing: 1.8px;
  }
  .brand-symbol {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
  }
  .brand-sub {
    font-size: 8px;
    letter-spacing: 2px;
  }
  .brand-sub b {
    font-size: 8px;
  }
  .mode-nav {
    grid-row: 2;
    grid-column: 1/-1;
    width: 100%;
    gap: 0;
    justify-content: space-between;
    margin: 0;
    height: 46px;
  }
  .mode-nav button {
    font-size: 13px;
    padding: 0 12px;
  }
  .help-button {
    grid-row: 1;
    grid-column: 2;
    padding: 0;
    min-height: 32px;
  }
  .help-button span {
    margin: 0;
  }
  .app-layout {
    display: block;
  }
  .sidebar {
    display: none;
  }
  main {
    padding: 19px 16px 0;
  }
  .mobile-course {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
  }
  .mobile-course label {
    margin: 0;
    white-space: nowrap;
    font-size: 12px;
  }
  .mobile-course select {
    font-size: 13px;
    min-height: 40px;
    padding: 8px 10px;
  }
  .page-intro {
    margin-bottom: 22px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
  }
  h1 {
    font-size: 25px;
    letter-spacing: -0.8px;
  }
  .intro-text {
    font-size: 13px;
    line-height: 1.9;
    margin-top: 10px;
  }
  .workspace {
    gap: 18px;
  }
  .market-toolbar {
    padding: 14px 13px 0;
  }
  .instrument strong {
    font-size: 12px;
  }
  .instrument small {
    font-size: 8px;
  }
  .coin-symbol {
    width: 29px;
    height: 29px;
    font-size: 20px;
  }
  .source-badge {
    font-size: 9px;
    padding: 5px;
    max-width: 110px;
  }
  .icon-button {
    width: 30px;
    height: 38px;
    flex-shrink: 0;
  }
  .price-strip {
    padding: 14px 14px 18px;
    gap: 9px;
  }
  .price-strip > strong {
    font-size: 26px;
  }
  .price-strip > span {
    font-size: 10px;
  }
  .price-strip .spread-label {
    font-size: 9px;
  }
  .zoom-options {
    width: 100%;
    justify-content: space-between;
  }
  .zoom-options button {
    font-size: 11px;
    padding: 9px 6px;
    min-height: 41px;
  }
  .zoom-options button span {
    font-size: 9px;
    margin-right: 3px;
  }
  .zoom-arrow {
    font-size: 12px;
  }
  .zoom-bar {
    padding: 7px 9px;
  }
  .stage-caption {
    padding: 14px 13px 0;
    font-size: 9px;
    min-height: 44px;
    gap: 15px;
  }
  .stage-caption span:first-child {
    font-size: 9px;
    letter-spacing: 1.2px;
  }
  .stage-caption span:last-child {
    max-width: 65%;
    line-height: 1.6;
  }
  #market-viz {
    min-height: 255px;
    width: 100%;
  }
  .stage-bottom {
    padding: 5px 12px 12px;
    font-size: 9px;
  }
  .zoom-controls button {
    width: 35px;
    height: 37px;
  }
  .market-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 20px 0;
    padding: 19px 8px;
  }
  .market-metrics > div {
    padding-left: 16px;
  }
  .market-metrics > div:nth-child(2) {
    border-right: 0;
  }
  .market-metrics span {
    font-size: 11px;
  }
  .market-metrics strong {
    font-size: 19px;
    margin: 7px 0 4px;
  }
  .market-metrics small {
    font-size: 10px;
  }
  .flow-charts > div {
    padding: 12px 9px 6px;
  }
  .mini-heading {
    font-size: 9px;
  }
  .mini-heading b {
    font-size: 9px;
    margin-left: 4px;
  }
  .mini-heading > span:last-child {
    display: none;
  }
  .coach-column {
    grid-template-columns: 1fr;
  }
  .coach-card {
    padding: 22px;
  }
  .coach-card h2 {
    font-size: 21px;
  }
  .coach-card > p {
    font-size: 14px;
  }
  .coach-card .section-label {
    font-size: 10px;
  }
  .coach-card label,
  .order-card label {
    font-size: 12px;
  }
  .coach-card textarea,
  .coach-card input,
  .coach-card select,
  .order-card input,
  .order-card select {
    font-size: 16px;
  }
  .primary {
    font-size: 14px;
    padding: 14px;
  }
  .order-card {
    padding: 21px;
  }
  .side-toggle button {
    font-size: 14px;
    min-height: 44px;
  }
  .buy-submit {
    font-size: 14px;
    min-height: 47px;
  }
  .small-copy,
  .result-message {
    font-size: 12px;
  }
  .quiz-card {
    padding: 15px 5px;
  }
  .quiz-card #quiz-options {
    grid-template-columns: 1fr;
  }
  .quiz-card h2 {
    font-size: 16px;
  }
  .quiz-option {
    font-size: 14px;
    padding: 13px;
  }
  .quiz-card .section-label {
    font-size: 10px;
  }
  .quiz-card #quiz-feedback {
    font-size: 13px;
  }
  .timeline-panel {
    padding: 16px;
  }
  .timeline-panel .section-label b {
    font-size: 11px;
  }
  .knowledge-panel > p {
    font-size: 15px;
  }
  .pitfall {
    flex-direction: column;
    gap: 5px;
    padding: 13px 15px;
  }
  .pitfall p {
    font-size: 13px;
  }
  .pitfall > span {
    font-size: 12px;
  }
  .stage-caption span:last-child {
    font-size: 9px;
  }
  .section-label {
    font-size: 10px;
  }
  .data-panel summary {
    font-size: 13px;
  }
  .data-panel p {
    font-size: 13px;
  }
  footer {
    flex-direction: column;
    gap: 9px;
    padding-top: 25px;
    font-size: 10px;
  }
  .replay-controls > * {
    font-size: 13px;
  }
  .switch-row {
    font-size: 12px;
  }
  .switch-row small {
    font-size: 11px;
  }
  .quiet {
    font-size: 13px;
  }
  dialog {
    padding: 28px 24px;
  }
  dialog h2 {
    font-size: 22px;
  }
  .account-grid strong {
    font-size: 16px;
  }
  .account-grid span {
    font-size: 12px;
  }
  .account-note {
    font-size: 11px;
  }
}
.immersive .sidebar,
.immersive .page-intro,
.immersive .mobile-course,
.immersive .knowledge-panel,
.immersive .data-panel,
.immersive footer {
  display: none !important;
}
.immersive .app-layout {
  display: block;
  max-width: none;
}
.immersive main {
  padding: 20px;
}
.immersive .market-panel {
  min-height: calc(100vh - 125px);
}
.immersive #market-viz {
  max-height: none;
}
.immersive .timeline-panel {
  margin-bottom: 20px;
}
.mobile-lab-controls {
  display: none;
}
@media (max-width: 720px) {
  .mobile-lab-controls {
    display: block;
    padding: 0 14px 16px;
  }
}
.layer-controls {
  display: flex;
  gap: 8px;
  padding: 0 22px 15px;
}
.layer-controls button {
  font-size: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  min-height: 40px;
  color: var(--muted);
}
.layer-controls button.active {
  color: var(--accent);
  border-color: #66744e;
  background: #d7ef850a;
}
.intro-text,
.knowledge-panel > p {
  font-size: 16px;
}
.course-link {
  font-size: 14px;
  min-height: 44px;
}
.course-group {
  font-size: 12px;
  letter-spacing: 0.8px;
}
.coach-card > p {
  font-size: 15px;
}
.quiz-card h2 {
  font-size: 16px;
}
.quiz-option,
.primary,
.buy-submit {
  font-size: 14px;
}
.order-card input,
.order-card select {
  font-size: 14px;
}
.order-card label,
.coach-card label,
.result-message,
.small-copy,
.stage-caption,
.stage-caption span:first-child,
.market-metrics span,
.market-metrics small,
.mini-heading,
.mini-heading b,
.source-badge,
.task-action p {
  font-size: 12px;
}
.stage-caption {
  padding-bottom: 10px;
}
.market-metrics small {
  line-height: 1.7;
  display: block;
}
.coach-card > .section-label,
.paper-label,
.section-label,
.sidebar-heading span:last-child,
.course-link .course-number {
  font-size: 11px;
}
.zoom-options button {
  font-size: 13px;
}
.switch-row {
  font-size: 12px;
}
.switch-row small {
  font-size: 11px;
}
.account-note {
  font-size: 12px;
}
#quiz-feedback,
.pitfall p {
  font-size: 14px;
}
input[type="range"] {
  padding: 0;
  accent-color: var(--accent);
}
@media (max-width: 1250px) and (min-width: 721px) {
  .course-link {
    font-size: 12px;
  }
  .stage-caption,
  .stage-caption span:first-child {
    font-size: 11px;
  }
  .market-metrics span,
  .market-metrics small {
    font-size: 11px;
  }
}
@media (max-width: 720px) {
  .zoom-options button {
    font-size: 12px;
  }
  .intro-text {
    font-size: 15px;
  }
  .stage-caption {
    flex-direction: column;
    gap: 6px;
  }
  .stage-caption span:last-child {
    text-align: left;
    max-width: none;
    font-size: 11px;
  }
  .stage-caption span:first-child {
    font-size: 10px;
  }
  .layer-controls {
    padding-inline: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
