:root {
  --bg: #08121a;
  --bg-2: #102635;
  --panel: rgba(7, 19, 28, 0.78);
  --panel-strong: rgba(9, 23, 34, 0.92);
  --border: rgba(131, 179, 199, 0.16);
  --text: #f4f8fb;
  --muted: #a8bcc8;
  --bull: #26d3a6;
  --bear: #ff7b6b;
  --amber: #ffbf5f;
  --ice: #86d5ff;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 191, 95, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(38, 211, 166, 0.18), transparent 28%),
    linear-gradient(160deg, #061018 0%, #0a1c28 42%, #08121a 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(transparent 0 97%, rgba(255, 255, 255, 0.03) 97% 100%),
    linear-gradient(90deg, transparent 0 97%, rgba(255, 255, 255, 0.03) 97% 100%);
  background-size: 38px 38px;
  opacity: 0.22;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 92%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(134, 213, 255, 0.15), transparent 18%),
    radial-gradient(circle at 80% 18%, rgba(255, 191, 95, 0.12), transparent 16%),
    radial-gradient(circle at 50% 80%, rgba(38, 211, 166, 0.08), transparent 22%);
  pointer-events: none;
}

.shell {
  width: min(1220px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(14, 28, 41, 0.92), rgba(7, 19, 28, 0.86));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.05), transparent 35%);
  pointer-events: none;
}

.topline-head,
.section-head h2 {
  letter-spacing: -0.04em;
}

.topline {
  display: grid;
  gap: 18px;
}

.topline-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.topline h1,
.section-head h2 {
  margin: 0;
  line-height: 0.98;
}

.topline h1 {
  font-size: clamp(1.55rem, 2.8vw, 2.3rem);
}

.lede,
.section-copy,
.hero-meta,
.methodology li,
.sample-card p,
.sender-row span,
.keyword-cluster p {
  color: var(--muted);
}

.lede {
  max-width: 62ch;
  margin: 20px 0 0;
  font-size: 1rem;
  line-height: 1.75;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.76rem;
  color: var(--amber);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.meta-chip,
.signal-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.92rem;
}

.summary-table-wrap {
  overflow-x: auto;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
}

.summary-table thead th {
  padding: 0 14px 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.summary-table tbody td {
  padding: 16px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

.cell-main {
  font-size: 1.24rem;
  font-weight: 700;
  line-height: 1.15;
}

.cell-main.positive {
  color: var(--bull);
}

.cell-main.negative {
  color: var(--bear);
}

.cell-main.neutral {
  color: var(--amber);
}

.cell-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.mini-card,
.stat-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
}

.mini-card span,
.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.mini-card strong,
.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.6rem;
  line-height: 1.15;
}

.stat-card strong.positive {
  color: var(--bull);
}

.stat-card strong.negative {
  color: var(--bear);
}

.stat-card strong.neutral {
  color: var(--amber);
}

.stat-card.text-value strong {
  font-size: 1.1rem;
}

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

.stat-card {
  min-height: 122px;
}

.stat-card small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 20px;
}

.section-copy {
  margin: 0;
  max-width: 48ch;
  line-height: 1.65;
}

.trend-wrap {
  height: 390px;
}

.event-panel {
  margin-top: 18px;
}

.chart-canvas,
#trend-chart,
.hourly-chart {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hourly-chart {
  height: 320px;
  min-height: 320px;
}

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

.event-card {
  position: relative;
  display: grid;
  gap: 12px;
  min-height: 284px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(255, 191, 95, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(17, 36, 50, 0.92), rgba(8, 18, 26, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.event-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 22px 0 0 22px;
  background: rgba(255, 255, 255, 0.18);
}

.event-card.positive::before {
  background: linear-gradient(180deg, rgba(38, 211, 166, 0.4), var(--bull));
}

.event-card.negative::before {
  background: linear-gradient(180deg, rgba(255, 123, 107, 0.4), var(--bear));
}

.event-card.warning::before {
  background: linear-gradient(180deg, rgba(255, 191, 95, 0.35), var(--amber));
}

.event-card.neutral::before {
  background: linear-gradient(180deg, rgba(134, 213, 255, 0.28), rgba(134, 213, 255, 0.8));
}

.event-topline,
.event-reaction-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.event-date {
  color: #f3f8fb;
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: 0.04em;
}

.event-date span,
.event-response,
.event-source {
  color: var(--muted);
  font-size: 0.88rem;
}

.event-date span {
  font-weight: 500;
}

.event-card h3 {
  margin: 8px 0 0;
  font-size: 1.18rem;
  line-height: 1.22;
}

.event-category {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e9f3f8;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.event-summary,
.event-linkage {
  margin: 0;
  color: rgba(244, 248, 251, 0.94);
  line-height: 1.65;
}

.event-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.event-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #eef5f9;
  font-size: 0.92rem;
  font-weight: 700;
}

.event-pill b {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-reaction {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.event-reaction.positive {
  color: var(--bull);
  background: rgba(38, 211, 166, 0.12);
  border-color: rgba(38, 211, 166, 0.18);
}

.event-reaction.negative {
  color: var(--bear);
  background: rgba(255, 123, 107, 0.14);
  border-color: rgba(255, 123, 107, 0.18);
}

.event-reaction.warning,
.event-reaction.neutral {
  color: var(--amber);
  background: rgba(255, 191, 95, 0.12);
  border-color: rgba(255, 191, 95, 0.16);
}

.event-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.event-source {
  margin-top: auto;
}

.event-source a {
  color: var(--ice);
  text-decoration: none;
}

.event-source a:hover {
  text-decoration: underline;
}

.event-empty {
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.trend-axis,
.trend-point-label,
.sample-meta,
.sender-meta,
.hour-label {
  fill: rgba(228, 238, 245, 0.9);
  color: rgba(228, 238, 245, 0.9);
}

.trend-axis {
  font-size: 12px;
  font-weight: 600;
  paint-order: stroke;
  stroke: rgba(8, 18, 26, 0.95);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.trend-axis.x {
  fill: rgba(214, 228, 237, 0.86);
}

.trend-axis.sentiment,
.trend-axis.legend {
  fill: rgba(234, 242, 247, 0.92);
}

.trend-axis.vix,
.trend-axis.axis-title.vix {
  fill: rgba(255, 202, 111, 0.96);
}

.trend-axis.axis-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.trend-plot-bg {
  fill: url(#trendPlotBg);
}

.trend-axis-band {
  fill: rgba(5, 18, 27, 0.74);
}

.trend-grid-line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-dasharray: 4 8;
}

.trend-grid-line.zero {
  stroke: rgba(255, 255, 255, 0.16);
}

.trend-grid-vert {
  stroke: rgba(255, 255, 255, 0.04);
  stroke-dasharray: 3 10;
}

.trend-path {
  fill: none;
  stroke: var(--ice);
  stroke-width: 4;
}

.vix-path {
  fill: none;
  stroke: var(--amber);
  stroke-width: 3;
  stroke-dasharray: 10 8;
}

.trend-area {
  fill: url(#trendFill);
}

.trend-zero {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-dasharray: 6 8;
}

.trend-latest-ring {
  fill: none;
  stroke-width: 2;
  opacity: 0.9;
}

.trend-latest-ring.vix {
  stroke: rgba(255, 191, 95, 0.95);
}

.trend-legend-bg {
  fill: rgba(8, 18, 26, 0.78);
  stroke: rgba(255, 255, 255, 0.08);
}

.trend-point {
  stroke: rgba(8, 18, 26, 0.92);
  stroke-width: 2;
}

.vix-point {
  fill: var(--amber);
  stroke: rgba(8, 18, 26, 0.88);
  stroke-width: 1.5;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.hour-card {
  display: grid;
  gap: 8px;
}

.hour-bars {
  height: 196px;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 8px;
}

.hour-bar {
  position: relative;
  height: 100%;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.hour-bar::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: var(--bar-height, 20%);
  background: linear-gradient(180deg, rgba(255, 191, 95, 0.2), rgba(38, 211, 166, 0.82));
}

.hour-bar.bear::before {
  background: linear-gradient(180deg, rgba(255, 123, 107, 0.25), rgba(255, 123, 107, 0.88));
}

.hour-score {
  text-align: center;
  font-size: 0.88rem;
}

.keyword-sections {
  display: grid;
  gap: 18px;
}

.keyword-cluster {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.keyword-cluster h3 {
  margin: 0 0 6px;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.keyword-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.05);
}

.keyword-pill b {
  font-size: 0.8rem;
  color: var(--muted);
}

.sender-table {
  display: grid;
  gap: 12px;
}

.sender-row {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1.2fr 2.4fr;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.sender-row strong {
  font-size: 1rem;
}

.sender-bias {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.sender-bias span {
  position: absolute;
  inset: 0 auto 0 50%;
  width: var(--bias-width, 0%);
  transform: translateX(-100%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bear), rgba(255, 123, 107, 0.5));
}

.sender-bias span.pos {
  left: 50%;
  transform: none;
  background: linear-gradient(90deg, rgba(38, 211, 166, 0.55), var(--bull));
}

.sample-list {
  display: grid;
  gap: 14px;
}

.sample-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sample-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sample-score {
  min-width: 78px;
  padding: 8px 10px;
  border-radius: 999px;
  text-align: center;
  font-weight: 700;
}

.sample-score.pos {
  background: rgba(38, 211, 166, 0.14);
  color: var(--bull);
}

.sample-score.neg {
  background: rgba(255, 123, 107, 0.14);
  color: var(--bear);
}

.sample-card p {
  margin: 0 0 12px;
  line-height: 1.65;
}

.source-pill {
  display: inline-block;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.83rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.methodology ul,
.methodology li,
#method-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

#method-list {
  display: grid;
  gap: 14px;
}

#method-list li {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.65;
}

#method-list strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 0.98rem;
}

#method-list code {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(134, 213, 255, 0.08);
  border: 1px solid rgba(134, 213, 255, 0.14);
  color: var(--ice);
  font-family: "SFMono-Regular", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: rise 0.7s ease forwards;
}

.reveal:nth-child(2) {
  animation-delay: 0.08s;
}

.reveal:nth-child(3) {
  animation-delay: 0.14s;
}

.reveal:nth-child(4) {
  animation-delay: 0.2s;
}

.reveal:nth-child(5) {
  animation-delay: 0.26s;
}

.reveal:nth-child(6) {
  animation-delay: 0.32s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1040px) {
  .topline-head,
  .two-col {
    grid-template-columns: 1fr;
  }

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

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

  .topline-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-meta {
    justify-content: flex-start;
  }

  .sender-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 18px, 100%);
    padding: 12px 0 24px;
  }

  .panel {
    padding: 18px;
    border-radius: 22px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .trend-wrap {
    height: 350px;
  }

  .hourly-chart {
    height: 280px;
    min-height: 280px;
  }

  .event-timeline {
    grid-template-columns: 1fr;
  }

  .event-card {
    min-height: auto;
  }
}
