:root {
  color-scheme: dark;
  --bg: #050816;
  --bg-soft: #070b18;
  --card: rgba(15, 23, 42, 0.82);
  --card-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(147, 197, 253, 0.34);
  --text: #e5edf8;
  --muted: #9aa9bd;
  --muted-strong: #cbd5e1;
  --blue: #60a5fa;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --pink: #f472b6;
  --green: #34d399;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --topbar-height: 76px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.22), transparent 34rem),
    radial-gradient(circle at 80% 20%, rgba(167, 139, 250, 0.2), transparent 30rem),
    radial-gradient(circle at 50% 80%, rgba(34, 211, 238, 0.08), transparent 38rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px clamp(16px, 4vw, 42px);
  background: rgba(5, 8, 22, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: fit-content;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  color: white;
  font-weight: 900;
  letter-spacing: -0.08em;
  box-shadow: 0 12px 35px rgba(96, 165, 250, 0.3);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted-strong);
  text-decoration: none;
  white-space: nowrap;
  font-size: 14px;
}

.nav a:hover {
  background: rgba(148, 163, 184, 0.12);
  color: white;
}

main {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 42px);
}

.hero {
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: stretch;
  padding: clamp(24px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62)),
    radial-gradient(circle at 70% 20%, rgba(96, 165, 250, 0.2), transparent 28rem);
  box-shadow: var(--shadow);
}

.hero-copy {
  align-self: center;
}

.eyebrow,
.card-kicker {
  margin: 0 0 10px;
  color: var(--cyan);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 930px;
  margin-bottom: 18px;
  font-size: clamp(38px, 7vw, 84px);
  line-height: 0.94;
  letter-spacing: -0.07em;
}

.hero-copy p:last-child {
  max-width: 720px;
  color: var(--muted-strong);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.65;
}

.hero-panel {
  display: grid;
  gap: 14px;
  align-content: center;
}

.hero-panel div,
.intro-grid article,
.report-card,
.data-section {
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 55px rgba(0, 0, 0, 0.22);
}

.hero-panel div {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.hero-panel strong {
  display: block;
  margin-bottom: 4px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-panel span {
  color: var(--muted);
}

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

.snapshot-note div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 55px rgba(0, 0, 0, 0.18);
}

.snapshot-label {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.snapshot-note strong {
  display: block;
  margin-bottom: 6px;
  font-size: clamp(20px, 3vw, 30px);
  letter-spacing: -0.04em;
}

.snapshot-note p,
.snapshot-inline {
  color: var(--muted);
}

.snapshot-note p {
  margin-bottom: 0;
  line-height: 1.55;
}

.snapshot-inline {
  margin-top: 6px;
  font-size: 13px;
}

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

.intro-grid article {
  min-height: 190px;
  padding: 20px;
  border-radius: var(--radius-lg);
}

.intro-grid h2 {
  margin-bottom: 10px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.intro-grid p,
.section-heading p,
.report-toolbar p,
.legend,
.report-actions,
.download-grid span {
  color: var(--muted);
  line-height: 1.55;
}

.report-section,
.data-section {
  scroll-margin-top: calc(var(--topbar-height) + 28px);
  margin: 0 0 74px;
}

.section-heading {
  max-width: 900px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-bottom: 12px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.section-heading p:not(.eyebrow) {
  font-size: 17px;
}

.report-card,
.data-section {
  border-radius: var(--radius-xl);
  padding: clamp(14px, 2vw, 22px);
}

.report-toolbar {
  position: sticky;
  top: calc(var(--topbar-height) + 10px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -2px -2px 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(7, 11, 24, 0.92);
  backdrop-filter: blur(16px);
}

.report-toolbar.simple {
  position: static;
}

.report-toolbar h3 {
  margin-bottom: 4px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.report-toolbar p {
  margin-bottom: 0;
  font-size: 14px;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.84);
}

.segmented button {
  border: 0;
  border-radius: 999px;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  white-space: nowrap;
}

.segmented button.active {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.92), rgba(167, 139, 250, 0.92));
  color: white;
  box-shadow: 0 10px 28px rgba(96, 165, 250, 0.2);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.62);
}

.legend strong {
  color: var(--text);
}

.legend span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: rgba(148, 163, 184, 0.56);
}

.frame-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #020617;
}

.frame-wrap iframe {
  display: block;
  width: 100%;
  height: min(82vh, 940px);
  min-height: 620px;
  border: 0;
  background: #020617;
}

.cluster-frame iframe {
  height: 860px;
  min-height: 860px;
}

.split-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
}

.split-view iframe {
  height: min(78vh, 860px);
  min-height: 600px;
  border-radius: 14px;
}

.split-view.cluster-frame iframe {
  height: 760px;
  min-height: 760px;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.report-actions a,
.download-grid a {
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.6);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.report-actions a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 14px;
}

.report-actions a:hover,
.download-grid a:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: rgba(30, 41, 59, 0.72);
}

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

.download-grid a {
  display: block;
  padding: 18px;
  border-radius: var(--radius-lg);
}

.download-grid strong,
.download-grid span {
  display: block;
}

.download-grid strong {
  margin-bottom: 6px;
}

.footer {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 42px) 42px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.footer a {
  color: var(--muted-strong);
  text-decoration: none;
}

@media (max-width: 1100px) {
  .hero,
  .intro-grid {
    grid-template-columns: 1fr 1fr;
  }

  .split-view {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --topbar-height: 104px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav {
    width: 100%;
    padding-bottom: 2px;
  }

  main {
    padding: 14px;
  }

  .hero {
    min-height: unset;
    grid-template-columns: 1fr;
    padding: 22px;
    border-radius: 24px;
  }

  h1 {
    font-size: clamp(42px, 14vw, 62px);
  }

  .intro-grid,
  .snapshot-note,
  .download-grid {
    grid-template-columns: 1fr;
  }

  .intro-grid {
    margin-bottom: 46px;
  }

  .report-toolbar {
    top: calc(var(--topbar-height) + 8px);
    flex-direction: column;
    align-items: stretch;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    padding: 11px 8px;
    font-size: 13px;
  }

  .legend {
    display: block;
    font-size: 14px;
  }

  .legend span {
    display: block;
    margin-top: 6px;
  }

  .legend span:not(:last-child)::after {
    content: "";
    margin: 0;
  }

  .frame-wrap {
    overflow-x: auto;
  }

  .frame-wrap iframe {
    min-width: 980px;
    height: 76vh;
    min-height: 560px;
  }

  .cluster-frame iframe,
  .split-view.cluster-frame iframe {
    height: 700px;
    min-height: 700px;
  }

  .report-actions a {
    width: 100%;
    text-align: center;
  }

  .footer {
    display: block;
  }

  .footer a {
    display: inline-block;
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .report-actions a,
  .download-grid a {
    transition: none;
  }
}
