:root {
  color-scheme: dark;
  --bg: #070b14;
  --panel: #0e1524;
  --panel-2: #121c2e;
  --ink: #eef4ff;
  --muted: #91a0b9;
  --grid: #26344e;
  --line: #2b3a55;
  --accent: #8ea9ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% -5%, rgba(95, 111, 255, 0.2), transparent 32rem),
    radial-gradient(circle at 90% 5%, rgba(168, 121, 255, 0.12), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a { color: #b5c7ff; }

.hero {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 28px;
  border-bottom: 1px solid rgba(142, 169, 255, 0.18);
}

h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  color: #a9b8d0;
  font-size: 12px;
}

.charts {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 72px;
}

.chart-card {
  margin: 28px 0;
  overflow: hidden;
  border: 1px solid rgba(139, 161, 200, 0.16);
  background: linear-gradient(145deg, rgba(18, 28, 46, 0.96), rgba(10, 16, 29, 0.96));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.23);
}

.chart-card__header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
  padding: 22px 28px 8px;
}

.chart-card h2 {
  margin: 0 0 8px;
  font-size: clamp(21px, 3vw, 30px);
  letter-spacing: -0.025em;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 15px;
  color: #b8c5da;
  font-size: 12px;
}

.legend__item { white-space: nowrap; }
.legend__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  background: var(--dot);
  box-shadow: 0 0 14px color-mix(in srgb, var(--dot), transparent 30%);
}

.chart-plot {
  width: 100%;
  overflow: hidden;
  padding: 4px 10px 8px;
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: inherit;
}

.axis-label, .tick-label { fill: #8190a9; font-size: 11px; }
.axis-label { font-size: 12px; font-weight: 700; fill: #aab7cd; }
.x-label { fill: #92a1ba; font-size: 10px; }
.grid-line { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.axis-line { stroke: #52617b; stroke-width: 1; shape-rendering: crispEdges; }
.trend-line { fill: none; stroke-width: 2.7; stroke-linejoin: round; stroke-linecap: round; }
.point-halo { fill: var(--point); opacity: 0.16; }
.point-dot { fill: var(--point); stroke: #0b1220; stroke-width: 2; cursor: pointer; }
.point-hit { fill: transparent; cursor: pointer; }
.details {
  border-top: 1px solid rgba(139, 161, 200, 0.14);
  color: #aebad0;
}

.details summary {
  padding: 14px 28px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  user-select: none;
}

.table-wrap { overflow-x: auto; padding: 0 28px 24px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 9px 10px; border-bottom: 1px solid rgba(139, 161, 200, 0.12); text-align: left; }
th { color: #7788a5; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
td:nth-child(n + 3), th:nth-child(n + 3) { text-align: right; }
.details a { text-decoration-color: rgba(181, 199, 255, 0.45); text-underline-offset: 3px; }

.tooltip {
  position: fixed;
  z-index: 20;
  min-width: 210px;
  max-width: min(360px, calc(100vw - 24px));
  padding: 12px 14px;
  pointer-events: none;
  border: 1px solid rgba(160, 183, 225, 0.32);
  background: rgba(5, 9, 17, 0.95);
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.45);
  color: #edf3ff;
  font-size: 12px;
  line-height: 1.65;
}

.tooltip strong { display: block; margin-bottom: 4px; font-size: 14px; }
.tooltip__muted { color: #93a2ba; }
.tooltip__voracity {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 5px -5px;
  padding: 5px;
  background: rgba(255, 95, 109, 0.1);
  color: #ff9ca6;
  font-variant-numeric: tabular-nums;
}
.tooltip__voracity strong { margin: 0; color: #ffb1b9; font-size: 12px; text-align: right; }
.tooltip__voracity > span { white-space: nowrap; }
.tooltip__voracity small { display: block; color: #c98e98; font-size: 10px; font-weight: 500; }
.tooltip__voracity-inline { color: #d98d98; }
.tooltip__comparisons { margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(160, 183, 225, 0.18); }
.tooltip__comparison { display: flex; justify-content: space-between; gap: 18px; font-variant-numeric: tabular-nums; }
.tooltip__comparison strong { display: inline; margin: 0; font-size: 12px; font-weight: 700; }
.tooltip__comparison small { font-size: 10px; font-weight: 500; opacity: 0.78; }
.tooltip__comparison--up strong { color: #78dba9; }
.tooltip__comparison--down strong { color: #ff8994; }
.tooltip__comparison--flat strong { color: #aebad0; }

.error {
  margin: 40px 0;
  padding: 22px;
  border: 1px solid rgba(255, 95, 109, 0.35);
  background: rgba(255, 95, 109, 0.08);
  color: #ffc5ca;
  line-height: 1.7;
}

footer {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 44px;
  color: #6f7e97;
  font-size: 12px;
}

@media (max-width: 720px) {
  .hero, .charts, footer { width: min(100% - 24px, 1320px); }
  .hero { padding-top: 30px; }
  .chart-card__header { grid-template-columns: 1fr; padding: 22px 18px 10px; }
  .legend { justify-content: flex-start; }
  .details summary { padding-inline: 18px; }
  .table-wrap { padding-inline: 18px; }
}
