:root {
  color-scheme: light;
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-strong: #eef4f2;
  --ink: #181f22;
  --muted: #5f6d70;
  --line: #dce6e3;
  --teal: #0f7e83;
  --teal-dark: #0a4f54;
  --red: #bd3a34;
  --red-soft: #ffe8e3;
  --gold: #d9962c;
  --shadow: 0 24px 70px rgba(19, 32, 36, 0.13);
  --radius: 8px;
  --max: 1180px;
  --header: 72px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101414;
  --surface: #171d1d;
  --surface-strong: #202929;
  --ink: #eef5f2;
  --muted: #a8b6b3;
  --line: #2f3b3b;
  --teal: #4bc4c0;
  --teal-dark: #8de4df;
  --red: #ff746a;
  --red-soft: #3a2321;
  --gold: #f1bd68;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(15, 126, 131, 0.12), transparent 28rem),
    radial-gradient(circle at 88% 22%, rgba(189, 58, 52, 0.1), transparent 24rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

body.no-scroll {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 4px;
  background: transparent;
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--red), var(--gold));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: var(--header);
  padding: 0.85rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 10%);
  background: color-mix(in srgb, var(--bg), transparent 8%);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  font-weight: 900;
  font-size: 0.86rem;
}

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

.top-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.55rem, 1.2vw, 1rem);
}

.top-nav a {
  padding: 0.55rem 0.4rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--ink);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(19, 32, 36, 0.08);
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: calc(100svh - var(--header) - 56px);
  padding: clamp(1.4rem, 4vw, 3.5rem);
  overflow: hidden;
  isolation: isolate;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  z-index: -3;
  object-fit: cover;
  object-position: center;
}

.hero-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(9, 22, 24, 0.88), rgba(9, 22, 24, 0.36) 52%, rgba(9, 22, 24, 0.08)),
    linear-gradient(0deg, rgba(9, 22, 24, 0.72), transparent 45%);
}

.hero-content {
  align-self: center;
  max-width: 770px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #9fe9e3;
}

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

h1 {
  max-width: 1080px;
  margin: 0;
  font-size: clamp(3.2rem, 7.2vw, 6rem);
  line-height: 0.9;
  letter-spacing: 0;
  overflow-wrap: normal;
  text-wrap: balance;
  word-break: normal;
}

.hero-subtitle {
  max-width: 680px;
  margin: 1.4rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-weight: 850;
}

.button.primary {
  background: #fff;
  color: #102024;
}

.button.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.hero-panel {
  position: absolute;
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: clamp(1rem, 3vw, 2rem);
  width: min(420px, 100%);
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(10, 25, 27, 0.68);
  color: #fff;
  backdrop-filter: blur(18px);
}

.hero-panel strong {
  display: block;
  margin: 0.35rem 0 0.45rem;
  font-size: 1.15rem;
  line-height: 1.25;
}

.hero-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.panel-kicker {
  color: #9fe9e3;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

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

.stat-card {
  min-height: 210px;
  padding: 1.2rem;
  background: var(--surface);
}

.stat-value,
.stat-suffix {
  color: var(--red);
  font-size: clamp(2.2rem, 4vw, 3.55rem);
  font-weight: 950;
  line-height: 1;
}

.stat-suffix {
  margin-left: 0.15rem;
  color: var(--teal);
  font-size: clamp(1rem, 2vw, 1.3rem);
}

.stat-card p {
  margin: 1rem 0 0;
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 4rem);
  width: min(var(--max), calc(100% - 2rem));
  margin: 4rem auto;
}

.side-rail {
  position: sticky;
  top: calc(var(--header) + 1rem);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface), transparent 6%);
  backdrop-filter: blur(18px);
}

.rail-title {
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.rail-link {
  padding: 0.58rem 0.7rem;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.rail-link.active,
.rail-link:hover {
  background: var(--surface-strong);
  color: var(--ink);
}

.content {
  min-width: 0;
}

.section {
  scroll-margin-top: calc(var(--header) + 1.5rem);
  padding: clamp(2.4rem, 6vw, 5.5rem) 0;
  border-bottom: 1px solid var(--line);
}

.section:first-child {
  padding-top: 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 1.6rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.section-head p:not(.eyebrow) {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.thesis-grid,
.conclusion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.plain-card,
.insight,
.policy-panel,
.chart-shell,
.simulator,
.chain-detail,
.timeline-detail,
.member,
.accordion details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 40px rgba(19, 32, 36, 0.06);
}

.plain-card,
.insight,
.policy-panel {
  padding: 1.2rem;
}

.plain-card.accent {
  background: linear-gradient(180deg, color-mix(in srgb, var(--red-soft), var(--surface) 34%), var(--surface));
}

.plain-card h3,
.insight h3,
.policy-panel h3,
.member h3 {
  margin: 0;
  font-size: 1.08rem;
}

.plain-card p,
.insight p {
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.chart-shell {
  padding: 1rem;
  margin-top: 1rem;
}

.chart-shell.compact {
  margin-top: 1rem;
}

.chart-toolbar,
.chart-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.chart-toolbar {
  flex-wrap: wrap;
}

.segmented {
  min-height: 40px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
}

.segmented.active,
.segmented:hover,
.segmented:focus-visible {
  background: var(--ink);
  color: var(--surface);
}

.chart-summary {
  min-height: 28px;
  color: var(--muted);
  font-weight: 750;
}

.chart {
  min-height: 330px;
  overflow-x: auto;
}

.svg-chart {
  display: block;
  width: 100%;
  min-width: 650px;
  height: 330px;
}

.axis-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bar {
  fill: var(--teal);
  transition: opacity 180ms ease, transform 180ms ease;
}

.bar:hover {
  opacity: 0.78;
}

.bar-alt {
  fill: var(--red);
}

.line-path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 4;
  stroke-linecap: round;
}

.point {
  fill: var(--surface);
  stroke: var(--gold);
  stroke-width: 3;
}

.tooltip {
  position: fixed;
  z-index: 90;
  max-width: 240px;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  background: var(--ink);
  color: var(--surface);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 14px));
  transition: opacity 120ms ease;
  box-shadow: var(--shadow);
  font-size: 0.86rem;
}

.tooltip.show {
  opacity: 1;
}

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

.insight-number {
  display: block;
  margin-bottom: 0.8rem;
  color: var(--red);
  font-size: 2.6rem;
  font-weight: 950;
  line-height: 1;
}

.horizontal-bars {
  display: grid;
  gap: 0.75rem;
}

.hbar {
  display: grid;
  grid-template-columns: minmax(110px, 180px) 1fr 48px;
  gap: 0.8rem;
  align-items: center;
}

.hbar-label,
.hbar-value {
  color: var(--muted);
  font-weight: 800;
}

.hbar-track {
  height: 16px;
  border-radius: 999px;
  background: var(--surface-strong);
  overflow: hidden;
}

.hbar-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--red));
  transition: width 700ms ease;
}

.simulator-section {
  border-bottom: 0;
}

.simulator {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(310px, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1rem, 3vw, 1.4rem);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-strong), transparent 8%), var(--surface));
}

.controls {
  display: grid;
  gap: 1rem;
}

.controls label {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.controls span {
  color: var(--muted);
  font-weight: 850;
}

.controls output {
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 950;
}

input[type="range"] {
  accent-color: var(--red);
  width: 100%;
}

.simulator-output {
  display: grid;
  align-content: center;
  gap: 1rem;
}

.meter {
  position: relative;
  display: grid;
  justify-items: center;
  min-height: 190px;
  padding: 0.8rem 0 0;
}

.meter svg {
  width: min(100%, 300px);
}

.meter-bg,
.meter-fill {
  fill: none;
  stroke-width: 18;
  stroke-linecap: round;
}

.meter-bg {
  stroke: var(--surface-strong);
}

.meter-fill {
  stroke: var(--red);
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 320ms ease;
}

.meter circle {
  fill: var(--ink);
  transition: transform 320ms ease;
  transform-origin: 110px 110px;
}

.meter strong {
  margin-top: -1.7rem;
  color: var(--red);
  font-size: 2.7rem;
  font-weight: 950;
  line-height: 1;
}

.meter span {
  color: var(--muted);
  font-weight: 800;
}

.result-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
}

.result-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.result-list dt {
  color: var(--muted);
  font-weight: 800;
}

.result-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 950;
}

.callout {
  margin: 0;
  padding: 0.9rem;
  border-left: 4px solid var(--red);
  border-radius: 0 6px 6px 0;
  background: var(--red-soft);
  color: var(--ink);
  font-weight: 800;
}

.evidence-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.evidence-strip article {
  min-height: 150px;
  padding: 1.1rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
}

.evidence-strip strong {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--gold);
  font-size: 2.2rem;
  line-height: 1;
}

.evidence-strip span {
  color: color-mix(in srgb, var(--surface), transparent 16%);
}

.model-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.7fr) minmax(0, 1fr);
  gap: 1rem;
}

.chain {
  display: grid;
  gap: 0.6rem;
}

.chain-step {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 0.8rem;
  min-height: 64px;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.chain-step span {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--teal-dark);
  font-weight: 950;
}

.chain-step.active {
  border-color: color-mix(in srgb, var(--teal), transparent 20%);
  background: color-mix(in srgb, var(--surface-strong), var(--teal) 10%);
}

.chain-step.active span {
  background: var(--teal);
  color: #fff;
}

.chain-detail {
  min-height: 330px;
  padding: clamp(1.2rem, 3vw, 2rem);
}

.chain-detail h3 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.02;
}

.chain-detail p {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.chain-detail .mini-data {
  display: inline-flex;
  margin-top: 1.25rem;
  padding: 0.65rem 0.8rem;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--red);
  font-weight: 950;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.time-node {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-weight: 950;
}

.time-node.active,
.time-node:hover {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.timeline-detail {
  min-height: 116px;
  margin-top: 0.8rem;
  padding: 1.1rem;
}

.timeline-detail h3 {
  margin: 0 0 0.4rem;
}

.timeline-detail p {
  margin: 0;
  color: var(--muted);
}

.policy-panel {
  margin-top: 1rem;
  background: var(--ink);
  color: var(--surface);
}

.policy-panel ol {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: color-mix(in srgb, var(--surface), transparent 12%);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.member {
  min-height: 200px;
  padding: 1rem;
  display: grid;
  align-content: space-between;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.member:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.member span {
  display: grid;
  place-items: center;
  width: 58px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--red));
  color: #fff;
  font-weight: 950;
}

.member h3 {
  max-width: 12rem;
  line-height: 1.18;
}

.class-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.class-meta span {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
}

.accordion {
  display: grid;
  gap: 0.8rem;
}

.accordion details {
  padding: 0.95rem 1rem;
}

.accordion summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 950;
}

.accordion p {
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--teal-dark);
  font-weight: 900;
}

@media (max-width: 1080px) {
  .top-nav {
    display: none;
  }

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

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

  .side-rail {
    position: static;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .rail-title {
    grid-column: 1 / -1;
  }

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

@media (max-width: 760px) {
  :root {
    --header: 64px;
  }

  .brand-text {
    display: none;
  }

  .hero {
    min-height: calc(100svh - var(--header) - 80px);
    padding: 1.25rem;
  }

  h1 {
    font-size: clamp(2.25rem, 10.8vw, 3rem);
    line-height: 0.95;
  }

  .hero-panel {
    display: none;
  }

  .snapshot,
  .two-column,
  .evidence-strip,
  .model-grid,
  .simulator,
  .team-grid,
  .thesis-grid,
  .conclusion-grid {
    grid-template-columns: 1fr;
  }

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

  .rail-link {
    font-size: 0.85rem;
  }

  .chart {
    min-height: 300px;
  }

  .hbar {
    grid-template-columns: 1fr 52px;
  }

  .hbar-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

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

  .result-list div,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .member {
    min-height: 155px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
