:root {
  --bg: #090d12;
  --bg-2: #10151d;
  --panel: #121821;
  --panel-soft: #182231;
  --panel-warm: #1b1710;
  --text: #f3f7fb;
  --muted: #9aa8ba;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.16);
  --green: #22d3a6;
  --red: #ff6b7f;
  --amber: #f4b740;
  --blue: #5ea6ff;
  --violet: #9b8cff;
  --radius: 8px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(34, 211, 166, 0.08), transparent 22rem),
    linear-gradient(90deg, rgba(244, 183, 64, 0.055), transparent 34rem),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 56px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

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

p,
h1,
h2,
h3,
strong,
small,
span,
a {
  overflow-wrap: anywhere;
}

.topbar,
.page,
.footer {
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

.topbar {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(9, 13, 18, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 0.7rem;
  color: #ffffff;
  font-weight: 800;
  min-width: 0;
}

.brand-mark {
  border-radius: var(--radius);
  height: 2.35rem;
  object-fit: contain;
  width: 2.35rem;
}

.gateway-logo {
  display: block;
  height: auto;
  margin-bottom: 1rem;
  max-width: min(100%, 26rem);
  width: 26rem;
}

.nav {
  align-items: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  padding: 0.25rem;
}

.nav a {
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
  padding: 0.55rem 0.85rem;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
  white-space: nowrap;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.13);
  color: var(--text);
}

.nav a:hover {
  transform: translateY(-1px);
}

.button-link {
  background: linear-gradient(135deg, var(--green), #7ee7c5);
  border-radius: var(--radius);
  color: #07101f;
  display: inline-flex;
  font-weight: 850;
  justify-content: center;
  margin-top: 0.6rem;
  padding: 0.8rem 1rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
  width: fit-content;
}

.button-link:hover {
  box-shadow: 0 10px 26px rgba(34, 211, 166, 0.22);
  transform: translateY(-1px);
}

.page {
  padding: 1.8rem 1rem 4rem;
}

.gateway {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.gateway-panel {
  width: min(100%, 920px);
}

.hero {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.026)),
    linear-gradient(180deg, rgba(34, 211, 166, 0.055), transparent);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.45fr);
  padding: clamp(1.2rem, 4vw, 2.2rem);
  position: relative;
  scroll-margin-top: 1rem;
}

.hero > *,
.panel,
.metric,
.story-card,
.risk-card,
.insight-strip > div,
.matrix > div,
.readout-card,
.hero-card {
  min-width: 0;
}

.hero::before {
  background: linear-gradient(90deg, var(--green), var(--amber), transparent);
  border-radius: var(--radius) var(--radius) 0 0;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.hero-report {
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.38fr);
}

.eyebrow {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  margin: 0 0 0.7rem;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.06;
  margin: 0;
}

h1 {
  font-size: clamp(2.45rem, 5.4vw, 4.4rem);
  letter-spacing: 0;
  max-width: 13ch;
}

html[lang="zh-CN"] h1 {
  font-size: clamp(2.15rem, 3.8vw, 3.25rem);
  max-width: 20ch;
}

h2 {
  font-size: clamp(1.55rem, 2.45vw, 2.25rem);
}

h3 {
  font-size: 1.1rem;
}

.lede {
  color: #c9d4e3;
  font-size: 1.08rem;
  max-width: 48rem;
}

.quick-nav {
  align-items: center;
  display: flex;
  gap: 0.55rem;
  margin: 1rem 0;
  overflow-x: auto;
  padding-bottom: 0.1rem;
  scrollbar-width: none;
}

.quick-nav::-webkit-scrollbar {
  display: none;
}

.quick-nav a {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd6ee;
  flex: 0 0 auto;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0.55rem 0.8rem;
  transition: background 180ms ease, border-color 180ms ease;
}

.quick-nav a:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text);
}

.hero-card,
.panel,
.metric,
.event-card,
.risk-card {
  background: rgba(18, 24, 33, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.hero-card {
  padding: 1rem;
}

.readout-card {
  background:
    linear-gradient(180deg, rgba(244, 183, 64, 0.08), transparent),
    #111722;
  border: 1px solid rgba(244, 183, 64, 0.22);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  justify-content: center;
  padding: 1.1rem;
}

.readout-card span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.readout-card strong {
  color: var(--amber);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1;
}

.readout-card p {
  color: #cbd5e4;
  margin: 0;
}

.bias {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.bias strong {
  color: var(--amber);
  font-size: 1.15rem;
}

.score-meter {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  height: 0.6rem;
  overflow: hidden;
}

.score-meter span {
  background: linear-gradient(90deg, var(--red), var(--amber), var(--green));
  display: block;
  height: 100%;
}

.dashboard {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 1rem 0;
  scroll-margin-top: 1rem;
}

.insight-strip {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 1rem 0;
}

.home-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.insight-strip div {
  background: rgba(18, 24, 33, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1rem;
  position: relative;
}

.insight-strip div::before,
.metric::before,
.risk-card::before {
  background: linear-gradient(180deg, var(--green), rgba(34, 211, 166, 0));
  border-radius: 999px;
  content: "";
  height: 2.4rem;
  left: 0;
  position: absolute;
  top: 1rem;
  width: 3px;
}

.insight-strip span,
.matrix span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 850;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.insight-strip strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.2;
}

.insight-strip p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.45rem 0 0;
}

.metric {
  padding: 1rem;
  position: relative;
}

.metric span {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
}

.metric strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1.05;
}

.metric small,
.small-note,
.source-line {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  margin-top: 0.35rem;
}

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

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

.grid-2,
.grid-3 {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  scroll-margin-top: 1rem;
}

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

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

.panel {
  padding: 1.05rem;
  scroll-margin-top: 1rem;
}

.panel-header {
  align-items: start;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.chart {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  height: 230px;
  padding: 0.35rem;
  width: 100%;
}

.heatmap {
  display: grid;
  gap: 0.55rem;
}

.matrix {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.matrix div {
  background: rgba(255, 255, 255, 0.048);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem;
}

.matrix strong {
  display: block;
  font-size: 1.05rem;
}

.matrix p {
  margin: 0.45rem 0 0;
}

.heat-row {
  align-items: center;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 6rem minmax(0, 1fr) 4rem;
}

.heat-bar {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  height: 0.75rem;
  overflow: hidden;
}

.heat-bar span {
  display: block;
  height: 100%;
}

.events {
  display: grid;
  gap: 0.8rem;
}

.story-locator {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: -0.15rem 0 1rem;
}

.story-locator a {
  align-items: center;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #c9d5e5;
  display: flex;
  font-size: 0.86rem;
  font-weight: 800;
  gap: 0.5rem;
  min-height: 2.7rem;
  padding: 0.58rem 0.68rem;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.story-locator a span {
  color: var(--green);
  flex: 0 0 auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.story-locator a:hover {
  background: rgba(34, 211, 166, 0.09);
  border-color: rgba(34, 211, 166, 0.28);
  color: var(--text);
  transform: translateY(-1px);
}

.story-grid {
  counter-reset: story;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.story-card {
  background: rgba(18, 24, 33, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: story;
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  position: relative;
  scroll-margin-top: 6rem;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.story-card::before {
  color: rgba(255, 255, 255, 0.08);
  content: counter(story, decimal-leading-zero);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  position: absolute;
  right: 0.8rem;
  top: 0.7rem;
}

.story-card:hover {
  background: rgba(21, 29, 40, 0.98);
  border-color: rgba(34, 211, 166, 0.28);
  transform: translateY(-1px);
}

.story-card:target {
  animation: targetPulse 900ms ease;
  border-color: rgba(244, 183, 64, 0.72);
  box-shadow: 0 0 0 1px rgba(244, 183, 64, 0.28), 0 22px 70px rgba(244, 183, 64, 0.12);
}

@keyframes targetPulse {
  0% {
    background: rgba(244, 183, 64, 0.20);
  }

  100% {
    background: rgba(18, 24, 33, 0.92);
  }
}

.story-card.priority-high:target {
  background: linear-gradient(180deg, rgba(244, 183, 64, 0.14), rgba(18, 24, 33, 0.94));
}

.story-card.priority-high {
  border-color: rgba(32, 212, 151, 0.32);
  background: linear-gradient(180deg, rgba(34, 211, 166, 0.11), rgba(18, 24, 33, 0.94));
}

.story-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}

.story-top strong {
  color: var(--green);
  font-size: 0.84rem;
  text-align: right;
}

.story-card h3 {
  font-size: 1.25rem;
  padding-right: 2.6rem;
  overflow-wrap: anywhere;
}

.story-card p {
  margin: 0;
}

.ai-take {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: var(--radius);
  color: #dbe6f6;
  font-weight: 650;
  padding: 0.75rem;
}

.watch-signal {
  background: rgba(244, 183, 64, 0.10);
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: #f5d79c;
  padding: 0.65rem 0.75rem;
}

.event-card {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 8rem minmax(0, 1fr) 9rem;
  padding: 1rem;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.35rem 0.55rem;
  width: fit-content;
}

.impact {
  color: var(--text);
  font-weight: 850;
}

.watchlist {
  display: grid;
  gap: 0.75rem;
}

.risk-card {
  padding: 1rem;
  position: relative;
}

.risk-card p,
.event-card p,
.panel p,
.footer {
  color: var(--muted);
}

.disclaimer {
  background: rgba(244, 183, 64, 0.10);
  border: 1px solid rgba(244, 183, 64, 0.30);
  border-radius: var(--radius);
  color: #f7d99b;
  margin-top: 1rem;
  padding: 1rem;
}

.language-card {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.language-card.compact {
  margin-top: 0;
}

.language-card a {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.language-card a:hover {
  background: var(--panel-soft);
  border-color: rgba(34, 211, 166, 0.28);
  transform: translateY(-1px);
}

.source-list {
  display: grid;
  gap: 0.7rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.source-drawer {
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  margin-top: -0.1rem;
  padding-top: 0.55rem;
}

.source-drawer summary {
  color: #c9dcff;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 850;
  list-style: none;
  width: fit-content;
}

.source-drawer summary::-webkit-details-marker {
  display: none;
}

.source-drawer summary::after {
  color: var(--green);
  content: " +";
}

.source-drawer[open] summary::after {
  content: " -";
}

.source-drawer div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.source-drawer a {
  background: rgba(94, 166, 255, 0.10);
  border: 1px solid rgba(94, 166, 255, 0.28);
  border-radius: 999px;
  color: #d7e6ff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.4rem 0.58rem;
}

.source-drawer a:hover {
  background: rgba(94, 166, 255, 0.18);
  color: #ffffff;
}

.source-list a {
  color: #c9dcff;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: rgba(198, 215, 255, 0.35);
  text-underline-offset: 0.18rem;
}

.source-list a:hover {
  color: var(--text);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 2rem 1rem 3rem;
}

@media (max-width: 860px) {
  .topbar,
  .hero,
  .dashboard,
  .insight-strip,
  .grid-2,
  .grid-3,
  .language-card,
  .event-card,
  .story-grid,
  .matrix {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    display: grid;
  }
}

@media (max-width: 640px) {
  .topbar {
    gap: 0.75rem;
    padding: 0.8rem 0.8rem 0.35rem;
  }

  .brand {
    font-size: 0.98rem;
  }

  .brand-mark {
    height: 2rem;
    width: 2rem;
  }

  .nav {
    max-width: 100%;
    overflow-x: auto;
  }

  .nav a {
    font-size: 0.84rem;
    padding: 0.48rem 0.7rem;
  }

  .page {
    padding: 0.85rem 0.75rem 2.5rem;
  }

  .hero {
    gap: 1rem;
    padding: 1rem;
  }

  .button-link {
    width: 100%;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3.15rem);
    max-width: 11ch;
  }

  html[lang="zh-CN"] h1 {
    font-size: clamp(1.85rem, 9.2vw, 2.65rem);
    line-height: 1.12;
    max-width: 12ch;
  }

  h2 {
    font-size: clamp(1.45rem, 7vw, 2rem);
    line-height: 1.12;
  }

  .eyebrow {
    font-size: 0.72rem;
    margin-bottom: 0.55rem;
  }

  .lede {
    font-size: 0.98rem;
    margin-bottom: 0;
  }

  .readout-card,
  .hero-card,
  .panel,
  .metric,
  .risk-card,
  .story-card,
  .insight-strip div {
    padding: 0.85rem;
  }

  .readout-card strong {
    font-size: 1.85rem;
  }

  .insight-strip,
  .dashboard,
  .grid-2,
  .grid-3 {
    gap: 0.65rem;
    margin: 0.65rem 0;
  }

  .quick-nav {
    margin: 0.75rem -0.75rem 0.75rem;
    padding: 0 0.75rem 0.15rem;
  }

  .metric strong {
    font-size: 1.32rem;
  }

  .panel-header {
    align-items: flex-start;
    display: grid;
    gap: 0.55rem;
  }

  .chart {
    height: 170px;
  }

  .matrix {
    gap: 0.55rem;
  }

  .matrix div {
    padding: 0.75rem;
  }

  .story-locator {
    display: flex;
    gap: 0.5rem;
    margin-left: -0.15rem;
    margin-right: -0.15rem;
    overflow-x: auto;
    padding: 0 0.15rem 0.2rem;
    scrollbar-width: none;
  }

  .story-locator::-webkit-scrollbar {
    display: none;
  }

  .story-locator a {
    flex: 0 0 auto;
    min-height: 2.45rem;
    padding: 0.52rem 0.65rem;
  }

  .story-grid {
    gap: 0.7rem;
  }

  .story-top {
    align-items: flex-start;
    display: grid;
    gap: 0.4rem;
  }

  .story-top strong {
    text-align: left;
  }

  .story-card h3 {
    font-size: 1.08rem;
    line-height: 1.22;
    padding-right: 2.1rem;
  }

  .ai-take,
  .watch-signal,
  .story-card p,
  .risk-card p,
  .source-line,
  .small-note {
    font-size: 0.92rem;
  }

  .watch-signal {
    padding: 0.58rem 0.65rem;
  }

  .source-list {
    gap: 0.6rem;
  }

  .disclaimer {
    font-size: 0.9rem;
    margin-top: 0.75rem;
    padding: 0.85rem;
  }

  .footer {
    display: grid;
    gap: 0.4rem;
    padding: 1.4rem 0.75rem 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 390px) {
  html[lang="zh-CN"] h1 {
    font-size: clamp(1.72rem, 8.8vw, 2.25rem);
  }

  .brand span:last-child {
    max-width: 13rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
