:root {
  --bg: #fbfaf8;
  --paper: #ffffff;
  --ink: #191b1f;
  --muted: #5e6572;
  --line: #dfe2e7;
  --soft: #eef4f0;
  --accent: #166c61;
  --accent-dark: #0b403a;
  --accent-soft: #dceee9;
  --orange: #bf5c24;
  --shadow: 0 18px 45px rgba(30, 38, 48, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 250, 248, 0.88);
  border-bottom: 1px solid rgba(223, 226, 231, 0.8);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 20px;
}

.nav a {
  min-height: 38px;
  padding: 10px 14px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.nav a[href="#"]:not(.button) {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.nav a[href="#"]:not(.button):hover {
  background: rgba(17, 94, 89, 0.14);
}

.hero {
  padding: 64px 20px 24px;
}

.hero-inner,
.section-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.hero-inner {
  text-align: center;
}

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

h1 {
  max-width: 1180px;
  margin: 0 auto 20px;
  font-size: clamp(2rem, 3.1vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.title-main,
.title-subtitle {
  display: block;
}

.title-main {
  margin-bottom: 8px;
  font-weight: 800;
}

.title-subtitle {
  font-size: 1em;
  font-weight: 750;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.authors {
  max-width: 940px;
  margin: 0 auto 8px;
  color: #333942;
  font-size: 1.16rem;
  line-height: 1.5;
}

.affiliation {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.24rem;
  font-weight: 750;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(22, 108, 97, 0.14);
}

.button:hover {
  background: var(--accent-dark);
}

.button.muted {
  background: var(--paper);
  color: var(--accent-dark);
  box-shadow: none;
}

.wide-figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

figcaption {
  padding: 16px 18px 18px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
  text-align: left;
}

.section {
  padding: 72px 20px;
}

.tinted {
  background: var(--soft);
  border-block: 1px solid rgba(22, 108, 97, 0.12);
}

.white-section {
  background: #fff;
  border-block: 1px solid var(--line);
}

.narrow {
  max-width: 860px;
}

.abstract-section p,
.section-heading p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.abstract-section p {
  margin-bottom: 16px;
}

.section-heading {
  max-width: 960px;
  margin-bottom: 28px;
}

.results-grid,
.finding-grid,
.video-grid {
  display: grid;
  gap: 16px;
}

.results-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}

.metric-card,
.finding,
.video-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 20px;
}

.metric-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-bottom: 12px;
  color: var(--accent-dark);
  font-size: 2.1rem;
  line-height: 1;
}

.metric-card p,
.finding p,
.video-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

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

.comparison-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.table-row {
  display: grid;
  grid-template-columns: 1.35fr repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.table-row:first-child {
  border-top: 0;
}

.table-row span {
  min-width: 0;
  padding: 16px 18px;
  color: #303640;
  font-size: 0.96rem;
  line-height: 1.35;
  border-left: 1px solid var(--line);
}

.table-row span:first-child {
  border-left: 0;
  font-weight: 750;
}

.table-head span {
  background: #f3f6f4;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.table-row.standout span {
  background: #f4fbf8;
  color: var(--accent-dark);
  font-weight: 800;
}

.finding-stack {
  display: grid;
  gap: 18px;
}

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

.finding {
  padding: 22px;
}

.finding h3 {
  color: var(--ink);
  margin-bottom: 10px;
}

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

.delta-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.delta-card h3 {
  margin: 0;
  padding: 18px 18px 6px;
  color: var(--ink);
}

.delta-card p {
  min-height: 48px;
  margin: 0;
  padding: 0 18px 14px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.delta-card table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.86rem;
}

.delta-card th,
.delta-card td {
  padding: 11px 9px;
  border-top: 1px solid var(--line);
  text-align: center;
  line-height: 1.2;
}

.delta-card th {
  color: #34414d;
  font-weight: 800;
}

.delta-card thead th {
  background: #f5f7f8;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.delta-card tbody th {
  width: 30%;
  text-align: left;
  background: #fbfcfc;
  font-size: 0.78rem;
}

.delta-card td {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 750;
}

.delta-card td.zero {
  background: #f8f8f8;
  color: #3e4954;
}

.delta-card td.pos {
  background: #fddbc7;
  color: #6d2c1f;
}

.delta-card td.pos.mid {
  background: #ef8a62;
  color: #ffffff;
}

.delta-card td.pos.strong {
  background: #b2182b;
  color: #ffffff;
}

.delta-card td.neg {
  background: #d1e5f0;
  color: #163f5f;
}

.delta-card td.neg.mid {
  background: #67a9cf;
  color: #ffffff;
}

.delta-card td.neg.strong {
  background: #2166ac;
  color: #ffffff;
}

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

.study-list article {
  display: grid;
  grid-template-columns: 58px 0.7fr 1.45fr;
  gap: 18px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.study-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 850;
}

.study-list h3 {
  margin-bottom: 0;
}

.study-list p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

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

.insight-card,
.evidence-panel,
.principle-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.insight-card {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.paper-note {
  max-width: 720px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.55;
  text-align: center;
}

.insight-card h3,
.evidence-panel h3,
.principle-row h3 {
  margin-bottom: 8px;
  color: var(--ink);
}

.insight-card p,
.evidence-panel p,
.principle-row p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.insight-card .delta-card {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.insight-card .delta-card h3 {
  padding: 0 0 12px;
  font-size: 1rem;
}

.insight-card .delta-card table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.insight-card .delta-card p {
  display: none;
}

.insight-takeaway {
  padding-top: 2px;
  border-top: 1px solid var(--line);
}

.insight-takeaway h3 {
  margin-top: 14px;
}

.evidence-layout {
  display: grid;
  gap: 22px;
}

.evidence-panel {
  padding: 22px;
}

.evidence-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.evidence-panel .delta-grid {
  grid-template-columns: 1fr;
}

.evidence-notes {
  display: grid;
  gap: 12px;
}

.evidence-note {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

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

.principle-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
}

.principle-row .delta-card {
  box-shadow: none;
}

.principle-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.variant-wide .insight-grid {
  grid-template-columns: 1fr;
}

body.variant-wide .insight-card {
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  align-items: center;
}

body.variant-wide .insight-card .delta-card p {
  min-height: 0;
}

body.variant-compact .section-inner {
  max-width: 1180px;
}

body.variant-compact .insight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

body.variant-compact .insight-card {
  gap: 12px;
  padding: 16px;
}

body.variant-compact .delta-card h3 {
  padding: 15px 15px 5px;
}

body.variant-compact .delta-card p {
  min-height: 0;
  padding: 0 15px 12px;
  font-size: 0.82rem;
}

body.variant-compact .insight-takeaway h3 {
  font-size: 0.98rem;
}

body.variant-compact .insight-takeaway p {
  font-size: 0.88rem;
}

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

.video-grid article {
  overflow: hidden;
}

.video-grid video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  object-fit: cover;
}

.video-grid h3,
.video-grid p {
  padding-inline: 18px;
}

.video-grid h3 {
  margin: 16px 0 8px;
}

.video-grid p {
  padding-bottom: 18px;
}

pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f8;
  color: #26313b;
  box-shadow: var(--shadow);
}

code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer {
  padding: 28px 20px 42px;
  color: var(--muted);
  text-align: center;
}

.footer p {
  margin: 0;
}

@media (min-width: 901px) {
  .title-main {
    white-space: nowrap;
  }
}

@media (max-width: 900px) {
  .hero {
    padding-top: 54px;
  }

  h1 {
    max-width: 760px;
    font-size: clamp(2rem, 5.2vw, 2.8rem);
  }

  .results-grid,
  .delta-grid,
  .finding-grid,
  .insight-grid,
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .evidence-panel-grid,
  .principle-row {
    grid-template-columns: 1fr;
  }

  .table-row {
    grid-template-columns: 1.25fr repeat(4, 0.8fr);
  }

  .table-row span {
    padding: 14px 12px;
    font-size: 0.88rem;
  }

  .study-list article {
    grid-template-columns: 48px 1fr;
  }

  .study-list p {
    grid-column: 2;
  }

  body.variant-wide .insight-card,
  body.variant-compact .insight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .hero,
  .section {
    padding-inline: 16px;
  }

  .section {
    padding-block: 54px;
  }

  .results-grid,
  .delta-grid,
  .finding-grid,
  .insight-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .delta-card p {
    min-height: 0;
  }

  .delta-card th,
  .delta-card td {
    padding: 10px 7px;
    font-size: 0.78rem;
  }

  .comparison-table {
    display: grid;
    gap: 10px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .table-head {
    display: none;
  }

  .table-row {
    display: grid;
    min-width: 0;
    grid-template-columns: 1fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
  }

  .table-row span {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--line);
    border-left: 0;
    font-size: 0.9rem;
  }

  .table-row span:first-child {
    grid-column: 1 / -1;
    border-top: 0;
    background: #f3f6f4;
  }

  .table-row span[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .table-row.table-head {
    display: none;
  }

  .study-list article {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .study-list p {
    grid-column: auto;
  }

  h1 {
    font-size: 2rem;
    line-height: 1.08;
  }

  .title-main {
    margin-bottom: 7px;
  }

  .title-subtitle {
    font-size: 0.82em;
  }

  .authors {
    font-size: 1.02rem;
  }

  .affiliation {
    font-size: 1.08rem;
  }

  .metric-card strong {
    font-size: 1.9rem;
  }
}
