:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #ffffff;
  --surface-soft: rgba(246, 247, 249, 0.86);
  --ink: #111318;
  --text-secondary: #525866;
  --muted: #7a8190;
  --line: rgba(20, 25, 34, 0.11);
  --green: #16794c;
  --green-bg: #e8f6ee;
  --red: #ba2d3b;
  --red-bg: #fdecee;
  --yellow: #8f6413;
  --yellow-bg: #fff4d8;
  --gray: #667085;
  --gray-bg: #eff1f5;
  --accent: #a83232;
  --accent-soft: #f8e9e4;
  --shadow: 0 18px 46px rgba(31, 35, 45, 0.08);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f14;
  --surface: rgba(21, 26, 33, 0.82);
  --surface-strong: #111820;
  --surface-soft: rgba(25, 31, 39, 0.9);
  --ink: #f3f6fa;
  --text-secondary: #b9c0cc;
  --muted: #8992a2;
  --line: rgba(255, 255, 255, 0.11);
  --green: #50d58a;
  --green-bg: rgba(80, 213, 138, 0.12);
  --red: #ff6b7a;
  --red-bg: rgba(255, 107, 122, 0.12);
  --yellow: #f7c948;
  --yellow-bg: rgba(247, 201, 72, 0.14);
  --gray: #aab2c0;
  --gray-bg: rgba(170, 178, 192, 0.12);
  --accent: #ff8a66;
  --accent-soft: rgba(255, 138, 102, 0.15);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(168, 50, 50, 0.12), transparent 34%),
    radial-gradient(circle at top right, rgba(39, 63, 59, 0.1), transparent 32%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}

.site-nav,
main,
.footer {
  width: min(100% - 36px, 1180px);
  margin: 0 auto;
}

.site-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-cluster,
.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand-cluster {
  gap: 18px;
}

.brand {
  gap: 10px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

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

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

.brand-copy small,
.brand-clock,
.source-chip,
.panel-head span,
.freshness-line {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.brand-clock {
  font-size: 17px;
  color: var(--ink);
  letter-spacing: 0;
}

.nav-links {
  gap: 7px;
}

.nav-links > a,
.language-toggle,
.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
}

.nav-links > a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.nav-icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle,
.language-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
}

.theme-toggle button,
.language-toggle button {
  border: 0;
  min-width: 32px;
  min-height: 32px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.theme-toggle button.active,
.language-toggle button.active {
  background: var(--ink);
  color: var(--bg);
}

.theme-glyph {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

main {
  padding: 30px 0 44px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: stretch;
}

.hero-copy,
.hero-card,
.panel,
.score-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 24px;
}

.hero-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  background:
    linear-gradient(135deg, rgba(168, 50, 50, 0.18), transparent 58%),
    var(--surface);
}

.hero-card span {
  color: var(--muted);
  font-weight: 800;
}

.hero-card strong {
  font-size: 38px;
  letter-spacing: 0;
}

.hero-card em {
  font-style: normal;
  font-size: 18px;
  font-weight: 900;
}

.market-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gray);
}

.summary {
  margin: 0;
  font-size: 28px;
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: 0;
}

.freshness-line {
  margin-top: 14px;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.score-card {
  padding: 16px;
  min-height: 108px;
}

.score-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.score-card strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
}

.signal-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  margin-top: 8px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.light-green {
  color: var(--green);
  background: var(--green-bg);
}

.light-red {
  color: var(--red);
  background: var(--red-bg);
}

.light-yellow {
  color: var(--yellow);
  background: var(--yellow-bg);
}

.light-gray {
  color: var(--gray);
  background: var(--gray-bg);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel h2 {
  margin: 4px 0 0;
  font-size: 20px;
  letter-spacing: 0;
}

.source-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--surface-soft);
  white-space: nowrap;
}

.metric-grid,
.flow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric-grid > div,
.flow-grid > div {
  min-height: 76px;
  padding: 13px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.metric-grid span,
.flow-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric-grid strong,
.flow-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 21px;
  letter-spacing: 0;
}

.mini-chart {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 72px;
  margin-top: 16px;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.bar {
  flex: 1;
  min-width: 3px;
  border-radius: 999px 999px 3px 3px;
  background: color-mix(in srgb, var(--accent) 72%, var(--surface-strong));
  opacity: 0.72;
}

.insight-row,
.panel-note {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.insight-row {
  margin-top: 12px;
}

.broker-list,
.research-list,
.source-grid {
  display: grid;
  gap: 10px;
}

.broker-item,
.research-item,
.source-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 13px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.broker-item strong,
.research-item strong,
.source-item strong {
  font-size: 14px;
}

.broker-item span,
.research-item p,
.source-item span {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.wide-panel,
.source-panel {
  margin-top: 16px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

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

@media (max-width: 920px) {
  .site-nav,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .hero,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

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

  .summary {
    font-size: 23px;
  }
}

@media (max-width: 560px) {
  .site-nav,
  main,
  .footer {
    width: min(100% - 20px, 1180px);
  }

  .brand-cluster {
    width: 100%;
    justify-content: space-between;
  }

  .metric-grid,
  .flow-grid,
  .score-grid {
    grid-template-columns: 1fr;
  }
}

