:root {
  color-scheme: light;
  --ink: #14181f;
  --ink-soft: #3e4754;
  --muted: #667485;
  --line: #d9e0e8;
  --line-strong: #b8c4d1;
  --paper: #ffffff;
  --wash: #f4f7fb;
  --wash-2: #ebf2f7;
  --blue: #145ca8;
  --blue-dark: #0d3f75;
  --teal: #087c74;
  --green: #22805a;
  --rust: #b3532d;
  --red: #b82e3f;
  --amber: #a66a00;
  --shadow: 0 24px 60px rgba(20, 24, 31, 0.11);
  --shadow-soft: 0 12px 36px rgba(20, 24, 31, 0.08);
  --max-width: 1180px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--wash);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
canvas {
  display: block;
  max-width: 100%;
}

canvas {
  width: 100%;
}

a {
  color: inherit;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

section {
  scroll-margin-top: 92px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 12px max(24px, calc((100vw - var(--max-width)) / 2));
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(217, 224, 232, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--ink);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 900;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 650;
}

.site-header nav a,
.header-link,
.site-footer a {
  text-decoration: none;
}

.site-header nav a:hover,
.header-link:hover,
.site-footer a:hover {
  color: var(--blue);
}

.header-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #fff;
  background: var(--blue);
  border-radius: 6px;
  font-weight: 750;
}

.header-link:hover {
  color: #fff;
  background: var(--blue-dark);
}

.header-link svg,
.button svg,
.taxonomy-grid svg,
.takeaway svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.hero {
  position: relative;
  min-height: clamp(560px, 68svh, 660px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  align-items: center;
  gap: clamp(28px, 4vw, 58px);
  padding: 72px max(24px, calc((100vw - var(--max-width)) / 2));
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(90deg, #07111b 0%, rgba(7, 17, 27, 0.98) 38%, rgba(7, 17, 27, 0.78) 66%, rgba(7, 17, 27, 0.5) 100%),
    radial-gradient(circle at 88% 40%, rgba(20, 92, 168, 0.28), transparent 34%),
    #07111b;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: auto 0 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.hero-visual {
  position: relative;
  z-index: 1;
  margin: 0;
}

.hero-visual img {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.kicker {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .kicker {
  color: #8de1d7;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(3.5rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 2.65rem;
  line-height: 1.06;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.22;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 720px;
  margin: 18px 0 0;
  color: #f0f6fb;
  font-size: 1.45rem;
  font-weight: 700;
}

.hero-copy {
  max-width: 680px;
  margin: 14px 0 0;
  color: #d6e1ea;
  font-size: 1.08rem;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 28px;
  color: #fff;
  font-weight: 750;
}

.affiliations {
  margin: 8px 0 0;
  color: #c5d2dc;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  color: var(--ink);
  background: #fff;
}

.button-primary:hover {
  background: #eaf3f8;
}

.button-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.button-secondary:hover {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.14);
}

.metrics-strip {
  width: min(var(--max-width), calc(100% - 48px));
  margin: -36px auto 0;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric {
  min-height: 118px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 22px;
  background: var(--paper);
}

.metric strong {
  color: var(--blue-dark);
  font-size: 2.35rem;
  line-height: 1;
}

.metric span {
  color: var(--muted);
  font-weight: 700;
}

.section {
  width: min(var(--max-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 94px 0 0;
}

.section-accent {
  width: 100%;
  max-width: none;
  padding: 94px max(24px, calc((100vw - var(--max-width)) / 2)) 0;
  background: linear-gradient(180deg, transparent 0, transparent 30px, var(--wash-2) 30px, var(--wash-2) 100%);
}

.section-head {
  max-width: 820px;
  margin-bottom: 30px;
}

.section-head p:not(.kicker) {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 1.04rem;
}

.taxonomy-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.taxonomy-grid article,
.chart-card,
.figure-card,
.wide-figure,
.media-panel,
.takeaway {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.taxonomy-grid article {
  min-height: 176px;
  padding: 18px;
}

.taxonomy-grid svg {
  color: var(--blue);
  margin-bottom: 14px;
}

.taxonomy-grid h3 {
  margin-bottom: 8px;
}

.taxonomy-grid p,
.panel-copy p,
.card-head p,
.figure-card figcaption,
.wide-figure figcaption,
.takeaway p {
  color: var(--muted);
}

.taxonomy-grid p,
.panel-copy p,
.card-head p,
.takeaway p {
  margin: 0;
  font-size: 0.94rem;
}

.media-panel {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 24px;
  align-items: center;
  margin-top: 18px;
  padding: 22px;
}

.panel-copy h3 {
  margin-bottom: 10px;
  font-size: 1.45rem;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.segmented button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink-soft);
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 750;
}

.segmented button:hover,
.segmented button.is-active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.media-panel figure,
.figure-card,
.wide-figure {
  margin: 0;
}

.media-panel img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.control-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.control {
  display: grid;
  gap: 7px;
  min-width: 220px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 800;
}

.control.compact {
  min-width: 0;
  margin: 14px 0 10px;
}

.control select {
  min-height: 42px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 38px 0 12px;
  font-weight: 700;
}

.chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.chart-card {
  min-width: 0;
  padding: 18px;
}

.chart-card-wide {
  grid-column: span 1;
}

.card-head {
  display: flex;
  min-height: 58px;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
}

.card-head h3 {
  font-size: 1.18rem;
}

.chart-box {
  position: relative;
  height: 360px;
  min-height: 360px;
}

.chart-box.tall {
  height: 430px;
  min-height: 430px;
}

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

.figure-card {
  overflow: hidden;
}

.figure-card img,
.wide-figure img {
  width: 100%;
  background: #fff;
}

.figure-card figcaption,
.wide-figure figcaption {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.wide-figure {
  overflow: hidden;
  margin-top: 16px;
}

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

.takeaway {
  padding: 22px;
}

.takeaway svg {
  width: 22px;
  height: 22px;
  color: var(--rust);
  margin-bottom: 14px;
}

.takeaway h3 {
  margin-bottom: 8px;
}

.cite-section {
  padding-bottom: 88px;
}

pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  color: #e8edf4;
  background: #121820;
  border-radius: var(--radius);
  border: 1px solid #263240;
  font-size: 0.9rem;
  line-height: 1.55;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 22px;
  padding: 28px 24px 36px;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

@media (max-width: 1040px) {
  .taxonomy-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chart-layout,
  .two-column,
  .media-panel,
  .takeaways {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .site-header nav {
    display: none;
  }

  .hero {
    min-height: 620px;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding-top: 48px;
    padding-bottom: 58px;
    background:
      linear-gradient(90deg, #07111b 0%, rgba(7, 17, 27, 0.96) 70%, rgba(7, 17, 27, 0.76) 100%),
      radial-gradient(circle at 80% 72%, rgba(20, 92, 168, 0.24), transparent 40%),
      #07111b;
  }

  .hero-visual {
    max-width: 720px;
  }

  h1 {
    font-size: 3.45rem;
  }

  h2 {
    font-size: 2.05rem;
  }

  .hero-subtitle {
    font-size: 1.18rem;
  }

  .metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100% - 28px, var(--max-width));
  }

  .section,
  .section-accent {
    width: min(100% - 28px, var(--max-width));
    padding-top: 72px;
  }

  .section-accent {
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 62px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand span:last-child {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-link span {
    display: none;
  }

  .hero {
    min-height: 650px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-visual img {
    border-radius: 6px;
  }

  h1 {
    font-size: 2.65rem;
  }

  h2 {
    font-size: 1.72rem;
  }

  .hero-actions .button {
    flex: 1 1 100%;
  }

  .metrics-strip,
  .taxonomy-grid {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 96px;
  }

  .chart-card {
    padding: 14px;
  }

  .chart-box,
  .chart-box.tall {
    height: 330px;
    min-height: 330px;
  }

  .control,
  .control-grid {
    width: 100%;
  }
}
