:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --panel: #ffffff;
  --panel-soft: #fbfbfa;
  --text: #1f2933;
  --muted: #66707a;
  --line: #e7e9ec;
  --line-strong: #d9dde2;
  --brand: #2f5d62;
  --brand-soft: #eef4f4;
  --accent: #8b6f47;
  --chart-grid: rgba(31, 41, 51, 0.06);
  --positive: #1f2933;
  --negative: #8b9096;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101214;
  --panel: #15181a;
  --panel-soft: #1b1f22;
  --text: #f2f4f5;
  --muted: #a3aab1;
  --line: #272c30;
  --line-strong: #353c42;
  --brand: #94bab8;
  --brand-soft: rgba(148, 186, 184, 0.08);
  --accent: #b79f7a;
  --chart-grid: rgba(255, 255, 255, 0.06);
  --positive: #f2f4f5;
  --negative: #8d949b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  text-decoration: none;
}

.page-shell {
  width: min(96vw, 1720px);
  margin: 0 auto;
  padding: 12px 16px 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--brand);
}

.brand-copy strong,
.brand-copy span {
  display: block;
}

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

.brand-copy span {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.range-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  background: var(--panel);
}

.range-switch button,
.theme-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.range-switch button {
  min-width: 64px;
  height: 40px;
  padding: 0 16px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.range-switch button + button {
  border-left: 1px solid var(--line);
}

.range-switch button.active {
  background: var(--brand);
  color: #fff;
}

.theme-toggle {
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 13px;
  font-weight: 600;
}

.market-stage {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 0;
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.market-list {
  border-right: 1px solid var(--line);
  min-width: 0;
}

.list-head {
  display: grid;
  grid-template-columns: 1.15fr .8fr 1fr;
  gap: 8px;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.watchlist {
  max-height: 842px;
  overflow: auto;
}

.watch-item {
  width: 100%;
  display: grid;
  grid-template-columns: 1.15fr .8fr 1fr;
  gap: 8px;
  align-items: center;
  min-height: 70px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.watch-item:hover,
.watch-item.active {
  background: var(--brand-soft);
}

.watch-item-main strong,
.watch-item-side strong,
.watch-item-activity strong,
.stat strong {
  font-family: "IBM Plex Mono", monospace;
}

.watch-item-main strong {
  display: block;
  font-size: 14px;
}

.watch-item-main span,
.watch-item-side span,
.watch-item-activity span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}

.watch-item-side strong,
.watch-item-activity strong {
  font-size: 13px;
}

.market-main {
  min-width: 0;
}

.market-head {
  display: grid;
  grid-template-columns: 1.1fr .95fr;
  gap: 18px;
  align-items: end;
  min-height: 132px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.market-kicker,
.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.market-title h1 {
  margin: 8px 0 0;
  font-size: 36px;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.market-title p {
  margin: 10px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.market-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat {
  min-height: 82px;
  padding: 12px 14px;
  border-left: 1px solid var(--line);
}

.stat:first-child {
  border-left: 0;
}

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

.stat strong {
  display: block;
  margin-top: 10px;
  font-size: 21px;
}

.market-subhead {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.chart-frame {
  height: 620px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, var(--chart-grid) 1px, transparent 1px),
    linear-gradient(var(--chart-grid) 1px, transparent 1px),
    linear-gradient(180deg, rgba(47, 93, 98, 0.02), transparent 16%);
  background-size: 42px 42px, 42px 42px, 100% 100%;
}

.chart {
  width: 100%;
  height: 100%;
}

.market-note {
  padding: 12px 22px 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.platform-intro {
  margin-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.intro-lead {
  display: grid;
  grid-template-columns: 1.25fr .85fr;
  gap: 22px;
  padding: 24px 0 18px;
  border-bottom: 1px solid var(--line);
}

.intro-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
}

.intro-tag::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.intro-lead h2 {
  margin: 16px 0 0;
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.intro-lead p {
  margin: 16px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.intro-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.base-url {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.base-url span {
  font-size: 12px;
  color: var(--muted);
}

.base-url code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  color: var(--brand);
  word-break: break-all;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid transparent;
}

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

.btn-secondary {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
}

.intro-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.metric-tile {
  min-height: 120px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.metric-tile:last-child {
  border-right: 0;
}

.metric-tile strong {
  display: block;
  font-size: 18px;
  color: var(--brand);
}

.metric-tile span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.section-block {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.section-head h3 {
  margin: 8px 0 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 10px 0 0;
  max-width: 900px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.feature-grid article {
  min-height: 184px;
  padding: 18px 18px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-grid article:last-child {
  border-right: 0;
}

.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
}

.feature-grid h4,
.scene-list h4 {
  margin: 0;
  font-size: 18px;
}

.feature-grid p,
.scene-list p,
.steps li span {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.split-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.scene-list,
.steps {
  margin-top: 18px;
}

.scene-list article {
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
}

.scene-list article + article {
  padding-top: 16px;
}

.steps {
  padding-left: 18px;
}

.steps li {
  padding: 0 0 14px 10px;
}

.steps li strong,
.steps li span {
  display: block;
}

.steps li strong {
  font-size: 16px;
}

.steps code {
  font-family: "IBM Plex Mono", monospace;
  color: var(--brand);
}

.code-block pre {
  margin: 18px 0 0;
  padding: 18px;
  background: #20262d;
  color: #f3f4f6;
  overflow: auto;
  font-size: 13px;
  line-height: 1.85;
  font-family: Consolas, Monaco, monospace;
}

.positive {
  color: var(--positive);
}

.negative {
  color: var(--negative);
}

@media (max-width: 1180px) {
  .market-stage,
  .intro-lead,
  .split-block {
    grid-template-columns: 1fr;
  }

  .market-stats,
  .intro-metrics,
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-grid article:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: 100%;
    padding: 10px 10px 28px;
  }

  .topbar,
  .topbar-left,
  .topbar-right,
  .market-subhead,
  .intro-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .market-stage,
  .market-head,
  .market-stats,
  .intro-metrics,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .list-head {
    display: none;
  }

  .watch-item {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px 14px;
  }

  .market-head,
  .chart-frame,
  .intro-lead,
  .section-block {
    padding-left: 0;
    padding-right: 0;
  }

  .feature-grid article,
  .metric-tile {
    border-right: 0;
  }

  .chart-frame {
    height: 440px;
  }
}
