@font-face {
  font-family: "Spaceship";
  src: url("./assets/fonts/9a93ecd23c2ef0fb7f8e.9a93ecd23c2ef0fb7f8e.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Spaceship";
  src: url("./assets/fonts/9845558fc59cb1ba1b87.9845558fc59cb1ba1b87.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Spaceship";
  src: url("./assets/fonts/ff0080baa663b824059b.ff0080baa663b824059b.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: #101214;
  --page-deep: #090a0c;
  --surface: #1a1c1f;
  --surface-raised: #242629;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.075);
  --text: #f6f6f7;
  --muted: #b4b5ba;
  --dim: #777980;
  --blue: #4f61ff;
  --blue-deep: #000fbd;
  --green: #4fbd8a;
  --red: #e35d4f;
  --amber: #d6a35a;
  --container: min(1180px, calc(100vw - 48px));
  --radius-card: 24px;
  --ease: cubic-bezier(0.55, 0, 0.35, 1);
}

* { box-sizing: border-box; }
html { background: var(--page); scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--text);
  font-family: "Spaceship", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, select, input { color: inherit; font: inherit; }
button, select { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
img, svg { display: block; }

.container { width: var(--container); margin-inline: auto; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; z-index: 200; top: 8px; left: 8px;
  padding: 9px 14px; border-radius: 999px; background: #fff; color: #111;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.promo-bar {
  height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: #17181c;
  color: #e7e7e9;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.site-header {
  position: sticky; top: 0; z-index: 40;
  height: 72px;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(16, 18, 20, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 28px; height: 28px; fill: #fff; }
.brand-word {
  font-size: 22px; font-weight: 400; letter-spacing: 1.4px;
}
.desktop-nav {
  display: flex; align-items: center; gap: 32px;
  font-size: 15px; font-weight: 700; white-space: nowrap;
}
.desktop-nav a { opacity: 0.88; }
.desktop-nav a:hover { opacity: 1; }
.header-actions {
  justify-self: end;
  display: flex; align-items: center; gap: 8px;
  min-width: 0;
}
.header-actions .mode-switch { flex: 0 0 auto; }
.header-pill {
  height: 44px;
  display: inline-flex; align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(31, 32, 38, 0.72);
  font-size: 14px; font-weight: 700;
}
.header-pill select {
  border: 0; background: transparent; outline: none;
  min-width: 108px;
}
.header-pill--blue { background: rgba(63, 77, 220, 0.68); }
.mode-switch {
  height: 44px; padding: 4px;
  display: flex; gap: 2px;
  border-radius: 999px;
  background: rgba(31, 32, 38, 0.72);
}
.mode-switch__button {
  border: 0; background: transparent;
  padding: 0 14px; border-radius: 999px;
  font-size: 14px; font-weight: 700; color: var(--muted);
}
.mode-switch__button.is-active { background: var(--blue); color: #fff; }

.hero {
  padding: 72px 0 40px;
  background:
    radial-gradient(circle at 18% 0%, rgba(79, 97, 255, 0.22), transparent 42%),
    radial-gradient(circle at 82% 20%, rgba(79, 189, 138, 0.08), transparent 36%),
    var(--page-deep);
}
.hero-core { width: var(--container); margin-inline: auto; }
.eyebrow {
  color: var(--muted);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.28em;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(48px, 7vw, 84px);
  font-weight: 700; line-height: 1.02; letter-spacing: -0.04em;
}
.lede {
  max-width: 720px;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
}
.kpi-row {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.kpi {
  padding: 22px 22px 20px;
  border-radius: var(--radius-card);
  background: var(--surface);
  min-width: 0;
}
.kpi b {
  display: block;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
}
.kpi span { color: var(--dim); font-size: 13px; font-weight: 500; }

.section { padding: 88px 0; }
.section--alt { background: var(--page-deep); }
.split-heading {
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: end;
}
.split-heading h2 {
  font-size: clamp(36px, 4.4vw, 56px);
  font-weight: 700; line-height: 1.06; letter-spacing: -0.035em;
}
.split-heading p { color: var(--muted); font-size: 18px; line-height: 1.5; }

.card {
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: 28px;
}
.dim { color: var(--dim); font-weight: 400; font-size: 12px; }
#heatmap-card { overflow-x: auto; }

.heat-table { width: 100%; border-collapse: collapse; }
.heat-table th, .heat-table td {
  padding: 12px 10px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.heat-table th { color: var(--dim); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; }
.heat-bar {
  height: 10px; border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden; min-width: 88px;
}
.heat-note { margin: 14px 4px 0; font-size: 13px; }
.heat-bar > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, #2c38c8, var(--blue));
  border-radius: inherit;
}
.pill {
  display: inline-flex; align-items: center;
  height: 26px; padding: 0 10px;
  border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--surface-raised);
}
.pill--pos { color: var(--green); background: rgba(79,189,138,0.12); }
.pill--neg { color: var(--red); background: rgba(227,93,79,0.14); }
.pill--neu { color: var(--muted); }

.market-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.market-card {
  min-height: 180px;
  padding: 26px 26px 22px;
  border-radius: var(--radius-card);
  background: var(--surface);
  display: flex; flex-direction: column; gap: 10px;
}
.market-card h3 { font-size: 28px; letter-spacing: -0.03em; }
.market-card p { color: var(--muted); font-size: 14px; }
.market-card .meta { margin-top: auto; color: var(--dim); font-size: 13px; }

.crisis-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 18px; }
.lamp-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.lamp {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 999px;
  background: var(--surface-raised); font-size: 14px; font-weight: 700;
}
.lamp i {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--green);
}
.lamp.is-mid i { background: var(--amber); }
.lamp.is-high i { background: var(--red); box-shadow: 0 0 12px rgba(227,93,79,0.7); }
.sent-bars { display: grid; gap: 10px; }
.sent-row { display: grid; grid-template-columns: 64px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.sent-row b { height: 8px; border-radius: 999px; background: var(--surface-raised); overflow: hidden; }
.sent-row b i { display: block; height: 100%; }
.sent-row.positive b i { background: var(--green); }
.sent-row.neutral b i { background: var(--dim); }
.sent-row.negative b i { background: var(--red); }
.crisis-item { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.crisis-item:last-child { border-bottom: 0; }
.crisis-item a { font-weight: 700; }
.crisis-item a:hover { color: var(--blue); }
.crisis-item small { display: block; margin-top: 6px; color: var(--dim); font-size: 13px; }
.open-hint { display: block; margin-top: 8px; color: var(--dim); font-size: 12px; letter-spacing: 0.04em; }

.table-wrap { overflow-x: auto; }
.matrix { width: 100%; border-collapse: collapse; min-width: 720px; }
.matrix th, .matrix td {
  padding: 12px 10px; text-align: center; font-size: 13px;
  border-bottom: 1px solid var(--line-soft);
}
.matrix th { color: var(--dim); font-weight: 500; }
.matrix td:first-child, .matrix th:first-child { text-align: left; font-weight: 700; }
.cell {
  display: inline-flex; min-width: 42px; justify-content: center;
  padding: 4px 8px; border-radius: 8px; font-weight: 700;
}
.cell.hot { background: rgba(227,93,79,0.18); color: #ffb1a8; }
.cell.ok { background: rgba(79,189,138,0.14); color: #9be7c4; }
.cell.mid { background: rgba(255,255,255,0.06); color: var(--muted); }

.feed-list { display: grid; gap: 12px; }
.feed-item {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 18px; align-items: center;
  padding: 18px 22px;
  border-radius: 20px;
  background: var(--surface);
}
.feed-item .src {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.feed-item h3 { font-size: 17px; font-weight: 700; line-height: 1.3; }
.feed-item h3:hover { color: #c9ceff; }
.feed-item p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.eng { text-align: right; font-variant-numeric: tabular-nums; }
.eng b { display: block; font-size: 20px; }
.eng span { color: var(--dim); font-size: 12px; }

.quote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.quote-card {
  padding: 28px 28px 24px;
  border-radius: var(--radius-card);
  background: var(--surface);
  min-height: 200px;
  display: flex; flex-direction: column;
}
.quote-card blockquote {
  margin: 0;
  font-size: 22px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.35;
}
.quote-card footer { margin-top: auto; padding-top: 22px; color: var(--dim); font-size: 13px; }

.health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.pipes-heading { margin-top: 28px; }
.health {
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: var(--surface);
}
.health strong { display: block; font-size: 16px; }
.health span { color: var(--dim); font-size: 12px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot.ok { background: var(--green); }
.dot.no-results { background: var(--dim); }
.dot.partial, .dot.rate-limited { background: var(--amber); }
.dot.auth-failed, .dot.error, .dot.unreachable, .dot.timeout { background: var(--red); }

.narrative-list { display: grid; gap: 12px; }
.narr {
  display: grid;
  grid-template-columns: 120px 1fr 1fr 88px;
  gap: 16px; align-items: center;
  padding: 20px 22px;
  border-radius: 20px;
  background: var(--surface);
}
.narr h3 { font-size: 18px; }
.narr .side { color: var(--muted); font-size: 14px; }
.narr .side b { color: var(--text); }
.gap-num { font-size: 22px; font-weight: 700; text-align: right; }
.gap-num.plus { color: var(--green); }
.gap-num.minus { color: var(--red); }

.site-footer {
  padding: 28px 0 48px;
  color: var(--dim); font-size: 13px;
}
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 980px) {
  .site-header {
    height: auto;
    min-height: 64px;
    padding: 10px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: space-between;
  }
  .desktop-nav { display: none; }
  .header-actions { justify-self: unset; flex-wrap: wrap; max-width: 100%; }
  .kpi-row, .market-grid, .health-grid, .quote-grid { grid-template-columns: 1fr 1fr; }
  .crisis-layout, .split-heading, .feed-item, .narr { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .split-heading p { padding: 0; }
  .eng { text-align: left; }
}
@media (max-width: 640px) {
  .market-grid, .health-grid, .quote-grid { grid-template-columns: 1fr; }
  .header-pill--blue { display: none; }
  .header-pill { height: 40px; padding: 0 12px; }
  .header-pill select { min-width: 72px; max-width: 42vw; }
  .mode-switch { height: 40px; }
  .mode-switch__button { padding: 0 10px; font-size: 13px; }
  :root { --container: min(1120px, calc(100vw - 32px)); }
}
