:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1a1f2e;
  --muted: #5b6478;
  --line: #e6e9f0;
  --accent: #2563eb;
  --accent-soft: #eff4ff;
  --accent-2: #7c3aed;
  --hot: #e11d48;
  --good: #059669;
  --warn: #d97706;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --radius: 14px;
  --nav-h: 60px;
  --max: 960px;
}

html[data-theme="dark"] {
  --bg: #0f1419;
  --surface: #1a222d;
  --text: #e8eef8;
  --muted: #9aa6b8;
  --line: #2a3444;
  --accent: #60a5fa;
  --accent-soft: #1a2740;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-image: radial-gradient(1200px 420px at 10% -10%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }



.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.35) blur(16px);
  -webkit-backdrop-filter: saturate(1.35) blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px;
  height: 60px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  font-weight: 750;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--text); opacity: .88; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(145deg, #3b82f6 0%, #6366f1 55%, #8b5cf6 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 800;
  box-shadow: 0 6px 14px color-mix(in srgb, #6366f1 28%, transparent);
}
.brand-text { font-weight: 750; }

.site-nav {
  justify-self: center;
  display: flex;
  align-items: stretch;
  height: 100%;
}
.nav-links {
  display: flex;
  align-items: stretch;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}
.nav-links li { display: flex; align-items: stretch; }
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active {
  color: var(--text);
  font-weight: 700;
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px;
  bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.nav-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  width: 38px; height: 38px;
  border-radius: 11px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.nav-toggle svg { width: 18px; height: 18px; }

.theme-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  width: 38px; height: 38px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.theme-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  color: var(--accent);
  background: var(--accent-soft);
}

@media (max-width: 760px) {
  .nav-inner {
    display: flex;
    height: 56px;
    padding: 0 14px;
  }
  .brand { margin-right: auto; }
  .brand-text { font-size: 14px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
  .nav-toggle { display: inline-flex; order: 2; }
  .theme-btn { order: 3; }
  .site-nav {
    display: none;
    position: absolute;
    left: 12px; right: 12px;
    top: 60px;
    justify-self: stretch;
    height: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 8px;
    z-index: 120;
  }
  .site-header.is-open .site-nav { display: block; }
  .nav-links {
    flex-direction: column;
    height: auto;
    gap: 2px;
  }
  .nav-links a {
    padding: 13px 14px;
    border-radius: 12px;
    font-size: 15px;
  }
  .nav-links a.active {
    background: var(--accent-soft);
    color: var(--accent);
  }
  .nav-links a.active::after { display: none; }
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.hero {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--surface);
  margin-bottom: 20px;
}
.hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-body { padding: 18px 20px 20px; }
.hero-date {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 6px;
}
.hero-title {
  margin: 0 0 8px;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.hero-desc { margin: 0; color: var(--muted); font-size: 14px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}
.chip {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  font-weight: 500;
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}
.section-title .bar {
  width: 4px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  flex-shrink: 0;
}

.grid { display: grid; gap: 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow);
  transition: border-color .15s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }

.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}

.card-title {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.45;
}
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--accent); text-decoration: underline; }

.summary { margin: 0 0 10px; color: var(--text); font-size: 14px; }

.why {
  font-size: 13px;
  color: var(--muted);
  background: color-mix(in srgb, var(--hot) 6%, var(--surface));
  border-left: 3px solid var(--hot);
  padding: 8px 10px;
  border-radius: 0 10px 10px 0;
  margin: 0 0 12px;
}

.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a {
  font-size: 12px;
  text-decoration: none;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  padding: 5px 11px;
  border-radius: 999px;
  font-weight: 500;
}
.links a:hover { border-color: var(--accent); text-decoration: none; }

.hold { display: grid; gap: 12px; }
@media (min-width: 720px) {
  .hold { grid-template-columns: 1fr 1fr; }
}

.ticker {
  font-size: 12px;
  color: var(--accent-2);
  letter-spacing: .02em;
  font-weight: 600;
  margin-bottom: 4px;
}
.price {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}
.up { color: var(--hot); }
.down { color: var(--good); }
.note { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  margin-right: 6px;
  margin-bottom: 4px;
  font-weight: 600;
}
.tag.s { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.tag.l { background: color-mix(in srgb, var(--good) 12%, transparent); color: var(--good); }
.hold p { margin: 10px 0 0; font-size: 14px; }

.cal { display: grid; gap: 8px; }
.cal .item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.cal .d {
  min-width: 52px;
  font-weight: 800;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: -0.01em;
}

.archive-list { display: grid; gap: 10px; }
.archive-item {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease;
}
.archive-item:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  text-decoration: none;
}
.archive-item .date {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}
.archive-item .title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
}
.archive-item .excerpt {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.cat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.cat-card h3 { margin: 0 0 8px; font-size: 16px; }
.cat-card p { margin: 0; color: var(--muted); font-size: 14px; }
.empty-state {
  margin-top: 14px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.page-head { margin-bottom: 22px; }
.page-head h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 4vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.page-head p { margin: 0; color: var(--muted); font-size: 14px; }

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 16px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.site-footer a { color: var(--muted); }

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
}



.cat-links { margin: 12px 0 0; padding: 0 0 0 18px; }
.cat-links li { margin: 6px 0; font-size: 14px; }
.cat-links a { color: var(--text); }
.cat-links a:hover { color: var(--accent); }

/* learn / chain */
.river-page { --max: 820px; }
.river-hero {
  margin: 8px 0 28px;
  padding: 28px 24px 26px;
  border-radius: 22px;
  color: #f4f1ea;
  background:
    radial-gradient(900px 280px at 90% -40%, rgba(250,204,21,.18), transparent 55%),
    linear-gradient(165deg, #1b2433 0%, #243044 48%, #2a3a4a 100%);
  box-shadow: var(--shadow);
}
html[data-theme="dark"] .river-hero {
  background:
    radial-gradient(900px 280px at 90% -40%, rgba(96,165,250,.16), transparent 55%),
    linear-gradient(165deg, #101820 0%, #17202b 100%);
}
.river-hero .kicker {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: .16em;
  font-weight: 700;
  color: #e8c56b;
  text-transform: uppercase;
}
.river-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 6vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}
.river-hero p { margin: 0; color: #c9d2de; font-size: 15px; max-width: 38em; }

.river {
  list-style: none;
  margin: 0;
  padding: 0 0 8px 0;
  position: relative;
}
.river::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, #e8c56b, #60a5fa 45%, #a78bfa 75%, #fb7185);
  opacity: .85;
}
.step { position: relative; padding: 0 0 22px 52px; }
.step:last-child { padding-bottom: 4px; }
.step .dot {
  position: absolute;
  left: 11px;
  top: 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid #94a3b8;
  box-shadow: 0 0 0 4px var(--bg);
  z-index: 1;
}
.s0 .dot { border-color: #e8c56b; }
.s1 .dot { border-color: #f59e0b; }
.s2 .dot { border-color: #38bdf8; }
.s3 .dot { border-color: #22c55e; }
.s4 .dot { border-color: #8b5cf6; }
.s5 .dot { border-color: #64748b; }
.s6 .dot { border-color: #3b82f6; }
.s7 .dot { border-color: #6366f1; }
.s8 .dot { border-color: #fb7185; }

.step-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px 15px;
}
.step .meta {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 4px;
}
.s0 .meta { color: #b45309; }
.s4 .meta { color: #7c3aed; }
.s7 .meta { color: #4f46e5; }
.s8 .meta { color: #e11d48; }
html[data-theme="dark"] .s0 .meta { color: #e8c56b; }
html[data-theme="dark"] .s4 .meta { color: #c4b5fd; }

.step h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.step .role { margin: 0 0 10px; font-size: 14.5px; }
.step .why {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  padding: 0;
  background: none;
  border: 0;
}
.step .hand {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.who { margin: 0 0 10px; font-size: 13.5px; color: var(--text); line-height: 1.7; }
.who em {
  font-style: normal;
  font-weight: 700;
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 10%, transparent);
  padding: 0 5px;
  border-radius: 4px;
}

.river-note {
  margin: 28px 0 0;
  padding: 20px 4px 0;
  border-top: 1px solid var(--line);
}
.river-note h2 {
  margin: 18px 0 8px;
  font-size: 17px;
  font-weight: 800;
}
.river-note p { margin: 0 0 10px; font-size: 14.5px; color: var(--text); }
.river-note p:last-child { margin: 0; }

.river-page { --max: 760px; }
.step-body { padding: 20px 20px 18px; }
.step h3 {
  margin: 16px 0 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
}
.step p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.75; }
.step p:last-child { margin-bottom: 0; }
.term {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.term strong { color: var(--text); font-weight: 700; }
.gloss { margin: 0; padding: 0; }
.gloss dt {
  font-weight: 800;
  margin: 14px 0 4px;
  font-size: 14px;
}
.gloss dd { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.7; }


/* learn hub + topic */
.learn-grid {
  display: grid;
  gap: 12px;
}
@media (min-width: 640px) {
  .learn-grid { grid-template-columns: 1fr 1fr; }
}
.learn-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.learn-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  text-decoration: none;
  transform: translateY(-1px);
}
.learn-card .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 6px;
}
.learn-card h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.learn-card p { margin: 0; color: var(--muted); font-size: 13.5px; }

.topic-hero {
  margin: 4px 0 22px;
  padding: 26px 22px 22px;
  border-radius: 20px;
  background:
    radial-gradient(700px 240px at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.topic-hero .kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.topic-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.topic-hero .lede { margin: 0; color: var(--muted); font-size: 15px; max-width: 40em; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0 0 22px;
}
@media (min-width: 640px) {
  .stat-row { grid-template-columns: repeat(4, 1fr); }
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 12px;
  box-shadow: var(--shadow);
}
.stat .v {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 2px;
}
.stat .l { font-size: 12px; color: var(--muted); margin: 0; }

.prose-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.prose-block h2 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 800;
}
.prose-block ol, .prose-block ul { margin: 0; padding-left: 1.2em; }
.prose-block li { margin: 0 0 8px; font-size: 14px; }
.prose-block li:last-child { margin-bottom: 0; }
.quote-list { display: grid; gap: 10px; }
.quote {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
}
.quote .meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 6px;
}
.badge.pos { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.badge.neg { background: color-mix(in srgb, var(--hot) 12%, transparent); color: var(--hot); }
.badge.mix { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.badge.neu { background: var(--accent-soft); color: var(--accent); }

.site-footer {
  margin-top: 12px;
}


/* invest section: sidebar + main */
.invest-layout {
  display: grid;
  gap: 18px;
  align-items: start;
}
@media (min-width: 900px) {
  .invest-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 28px;
  }
  .wrap.wrap-invest {
    max-width: 1100px;
  }
}
.invest-side {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 12px;
  box-shadow: var(--shadow);
}
@media (min-width: 900px) {
  .invest-side {
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 88px);
    overflow: auto;
  }
}
.invest-side .side-label {
  margin: 0 8px 10px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.invest-side nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.invest-side a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--text);
  text-decoration: none;
  line-height: 1.35;
}
.invest-side a:hover {
  background: color-mix(in srgb, var(--accent-soft) 70%, transparent);
  text-decoration: none;
  color: var(--accent);
}
.invest-side a.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.invest-side a .sub {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}
.invest-side a.active .sub { color: color-mix(in srgb, var(--accent) 70%, var(--muted)); }
.invest-crumb {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}
.invest-crumb a { color: var(--muted); }
.invest-crumb a:hover { color: var(--accent); }
.invest-main { min-width: 0; }
@media (max-width: 899px) {
  .invest-side {
    padding: 10px;
  }
  .invest-side nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .invest-side a {
    flex: 0 0 auto;
    white-space: nowrap;
    border: 1px solid var(--line);
    padding: 6px 12px;
    font-size: 13px;
  }
  .invest-side a .sub { display: none; }
  .invest-side .side-label { display: none; }
}
