:root {
  --bg: #07111d;
  --bg-soft: #0d1b2b;
  --panel: rgba(8, 20, 34, 0.78);
  --panel-strong: rgba(12, 28, 48, 0.95);
  --text: #edf3ff;
  --muted: #a7b7d4;
  --line: rgba(255, 255, 255, 0.08);
  --red: #cf142b;
  --blue: #012169;
  --blue-bright: #4c8dff;
  --white: #f5f7fb;
  --gold: #f3c96b;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(76, 141, 255, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(207, 20, 43, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 7%, transparent 7% 45%, rgba(255, 255, 255, 0.04) 45% 52%, transparent 52% 100%),
    linear-gradient(45deg, rgba(207, 20, 43, 0.14) 0 5%, transparent 5% 47%, rgba(1, 33, 105, 0.16) 47% 55%, transparent 55% 100%),
    linear-gradient(180deg, #02050a 0%, var(--bg) 45%, #04070b 100%);
}

a {
  color: inherit;
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.hero,
.stat-card,
.chart-card,
.callout,
.narrative-card,
.sources a {
  backdrop-filter: blur(16px);
}

.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(135deg, rgba(1, 33, 105, 0.85), rgba(8, 17, 29, 0.94) 42%, rgba(207, 20, 43, 0.55) 100%);
  box-shadow: var(--shadow);
}

.brand-lockup {
  margin-bottom: 26px;
}

.brand-logo {
  display: block;
  width: auto;
  max-width: min(170px, 100%);
  height: auto;
  max-height: 96px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35));
}

.hero__flag {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background:
    linear-gradient(90deg, transparent 0 44%, var(--white) 44% 56%, transparent 56%),
    linear-gradient(0deg, transparent 0 44%, var(--white) 44% 56%, transparent 56%),
    linear-gradient(90deg, transparent 0 47%, var(--red) 47% 53%, transparent 53%),
    linear-gradient(0deg, transparent 0 47%, var(--red) 47% 53%, transparent 53%),
    linear-gradient(34deg, transparent 0 45%, var(--white) 45% 49%, transparent 49% 51%, var(--white) 51% 55%, transparent 55%),
    linear-gradient(-34deg, transparent 0 45%, var(--white) 45% 49%, transparent 49% 51%, var(--white) 51% 55%, transparent 55%),
    linear-gradient(34deg, transparent 0 47.2%, var(--red) 47.2% 49.8%, transparent 49.8% 50.2%, var(--red) 50.2% 52.8%, transparent 52.8%),
    linear-gradient(-34deg, transparent 0 47.2%, var(--red) 47.2% 49.8%, transparent 49.8% 50.2%, var(--red) 50.2% 52.8%, transparent 52.8%);
}

.hero__copy {
  position: relative;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

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

h1,
h2 {
  font-family: "DM Serif Display", serif;
  letter-spacing: -0.03em;
}

h1 {
  max-width: 10ch;
  font-size: clamp(3.6rem, 10vw, 7.4rem);
  line-height: 0.9;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1;
}

h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.08;
}

.hero__lede,
.section__intro,
.chart-card__intro,
.stat-card p,
.callout p,
.narrative-card p {
  color: var(--muted);
  line-height: 1.55;
}

.hero__lede {
  max-width: 60ch;
  margin: 18px 0 0;
  font-size: 1.05rem;
}

.hero__highlights,
.stats-grid,
.dual-panel,
.split-layout,
.narrative-grid {
  display: grid;
  gap: 18px;
}

.hero__highlights > *,
.stats-grid > *,
.dual-panel > *,
.split-layout > *,
.narrative-grid > *,
.donut-layout > * {
  min-width: 0;
}

.hero__highlights {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.headline-pill,
.stat-card,
.chart-card,
.callout,
.narrative-card,
.sources a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.headline-pill {
  padding: 18px;
}

.headline-pill__label,
.stat-card__kicker,
.callout__label {
  display: block;
  color: #dce7ff;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.headline-pill__value {
  display: block;
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.headline-pill__meta {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.section__heading {
  margin-bottom: 16px;
}

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

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

.stat-card {
  padding: 20px;
}

.stat-card h3 {
  margin-top: 12px;
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  line-height: 1;
}

.stat-card--mini h3 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.split-layout {
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.8fr);
  align-items: start;
}

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

.chart-card,
.callout {
  padding: 22px;
}

.callout {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
    linear-gradient(145deg, rgba(207, 20, 43, 0.15), rgba(1, 33, 105, 0.18));
}

.callout h3 {
  margin-top: 10px;
}

.callout__divider {
  height: 1px;
  margin: 22px 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.bar-panel,
.compare-bars {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.donut-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin-top: 22px;
}

.donut-card {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-height: 0;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.04), transparent 55%),
    rgba(255, 255, 255, 0.03);
}

.donut-chart {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 320px);
  min-width: 0;
  aspect-ratio: 1;
  z-index: 1;
}

.donut-chart svg {
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.35));
}

.donut-center {
  position: absolute;
  z-index: 1;
  display: grid;
  gap: 4px;
  text-align: center;
}

.donut-center__label,
.donut-center__meta {
  color: var(--muted);
}

.donut-center__label {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.donut-center__value {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.donut-center__meta {
  font-size: 0.92rem;
}

.donut-legend {
  display: grid;
  gap: 10px;
}

.legend-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
  cursor: pointer;
}

.legend-row__swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
}

.legend-row__label {
  color: #eef4ff;
  font-weight: 500;
}

.legend-row__value {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.legend-row.is-active,
.legend-row:hover {
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.donut-segment {
  transition: filter 160ms ease, opacity 160ms ease, stroke-width 160ms ease;
  cursor: pointer;
}

.donut-segment:hover,
.donut-segment:focus-visible,
.donut-segment.is-active {
  filter: brightness(1.15);
  stroke-width: 64;
  outline: none;
}

.donut-chart.is-dimmed .donut-segment:not(.is-active) {
  opacity: 0.42;
}

.donut-label {
  position: absolute;
  z-index: 2;
  display: none;
  gap: 2px;
  max-width: 130px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(7, 17, 29, 0.86);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.donut-label span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.donut-label strong {
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.1;
}

.donut-label.is-active {
  transform: scale(1.04);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(10, 24, 42, 0.95);
}

.donut-label--top-left {
  top: 24px;
  left: 12px;
}

.donut-label--top-right {
  top: 18px;
  right: 8px;
}

.donut-label--right {
  top: 145px;
  right: -6px;
}

.donut-label--bottom-right {
  right: 20px;
  bottom: 28px;
}

.donut-label--bottom-left {
  bottom: 34px;
  left: 8px;
}

.donut-tooltip {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(3, 8, 14, 0.96);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.3;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.donut-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-row__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 16px;
  align-items: end;
  color: #eff5ff;
  font-size: 0.98rem;
  font-weight: 500;
}

.bar-row__top span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bar-row__top strong {
  white-space: nowrap;
}

.bar-track {
  overflow: hidden;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-bright), var(--red));
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bar-fill.is-visible {
  transform: scaleX(1);
}

.compare-bars {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  min-height: 280px;
}

.compare-bars__item {
  display: grid;
  gap: 12px;
}

.compare-bars__label {
  color: var(--muted);
  font-size: 0.94rem;
}

.compare-bars__value {
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 700;
}

.compare-bars__track {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: 22px 22px 10px 10px;
  background: rgba(255, 255, 255, 0.06);
}

.compare-bars__fill {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent),
    linear-gradient(180deg, var(--blue-bright), var(--red));
  transform-origin: bottom center;
  transform: scaleY(0);
  transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.compare-bars__fill.is-visible {
  transform: scaleY(1);
}

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

.narrative-card {
  padding: 22px;
}

.narrative-card h3 {
  margin-bottom: 14px;
  font-size: 1.5rem;
  line-height: 1.05;
}

.sources {
  display: grid;
  gap: 12px;
}

.sources a {
  padding: 16px 18px;
  color: #eef4ff;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.sources a:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: var(--panel-strong);
}

@media (max-width: 1100px) {
  .split-layout {
    grid-template-columns: 1fr;
  }

  .donut-layout {
    grid-template-columns: minmax(250px, 0.75fr) minmax(280px, 1fr);
  }

  .donut-label {
    display: none;
  }
}

@media (max-width: 880px) {
  .hero__highlights,
  .stats-grid,
  .stats-grid--tight,
  .narrative-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dual-panel,
  .donut-layout {
    grid-template-columns: 1fr;
  }

  .compare-bars {
    min-height: 0;
  }

  .compare-bars__track {
    min-height: 180px;
  }

  .donut-card {
    width: min(100%, 430px);
    margin-inline: auto;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 20px;
  }

  .section,
  .hero {
    padding: 20px;
  }

  .section {
    border-radius: 20px;
  }

  .hero {
    border-radius: 24px;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.75rem, 14vw, 4.25rem);
  }

  h2 {
    font-size: clamp(2rem, 8.5vw, 2.8rem);
  }

  .donut-card {
    padding: 14px;
  }

  .legend-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 10px;
  }

  .legend-row__value {
    grid-column: 2;
    white-space: normal;
  }

  .bar-row__top {
    gap: 10px;
  }

  .chart-card,
  .callout,
  .narrative-card,
  .stat-card {
    padding: 18px;
  }

  .compare-bars {
    gap: 10px;
  }

  .compare-bars__label {
    min-height: 2.8em;
  }

  .compare-bars__track {
    min-height: 150px;
  }
}

@media (max-width: 560px) {
  .hero__highlights,
  .stats-grid,
  .stats-grid--tight,
  .narrative-grid {
    grid-template-columns: 1fr;
  }

  .page-shell {
    width: min(100% - 16px, 1240px);
    padding-top: 8px;
    padding-bottom: 32px;
  }

  .section {
    margin-top: 16px;
    padding: 18px 16px;
  }

  .hero {
    margin-bottom: 16px;
    padding: 24px 18px;
  }

  .hero__highlights {
    gap: 12px;
    margin-top: 22px;
  }

  .headline-pill {
    padding: 16px;
  }

  .headline-pill__value {
    font-size: 2.4rem;
  }

  .eyebrow {
    font-size: 0.72rem;
    line-height: 1.45;
  }

  .bar-row__top {
    font-size: 0.9rem;
  }

  .donut-center__value {
    font-size: 2rem;
  }

  .donut-center__meta {
    font-size: 0.78rem;
  }

  .sources a {
    padding: 14px;
  }
}
