:root {
  color-scheme: light;
  --paper: #fcfcfa;
  --surface: #f2f4f1;
  --surface-strong: #e7ebe5;
  --ink: #172124;
  --muted: #5a6668;
  --line: #cfd6d2;
  --teal: #0b6f6b;
  --teal-dark: #075451;
  --coral: #c75a3e;
  --violet: #7056a3;
  --amber: #b97818;
  --green: #4d8848;
  --header-height: 64px;
  --page-width: 1180px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea,
select {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 8px 12px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.section-shell,
.nav-shell {
  width: min(calc(100% - 48px), var(--page-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  border-bottom: 1px solid rgba(207, 214, 210, 0.9);
  background: rgba(252, 252, 250, 0.94);
  backdrop-filter: blur(12px);
}

.nav-shell {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.wordmark {
  justify-self: start;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  color: var(--teal-dark);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 650;
}

.nav-links a,
.nav-code {
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-code:hover,
.nav-code:focus-visible {
  color: var(--teal);
}

.nav-code {
  justify-self: end;
  padding: 6px 14px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("assets/framework.png");
  background-size: cover;
  background-position: center;
  opacity: 0.16;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(252, 252, 250, 0.78);
}

.hero-content {
  width: min(calc(100% - 48px), 1020px);
  margin-inline: auto;
  padding: 76px 0 62px;
  text-align: center;
}

.venue,
.eyebrow {
  margin: 0 0 14px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.venue span {
  display: inline-block;
  margin-right: 10px;
  padding: 3px 9px;
  color: #fff;
  background: var(--teal-dark);
  border-radius: 3px;
}

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

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

h1 {
  max-width: 1000px;
  margin: 0 auto 22px;
  font-size: 48px;
  line-height: 1.12;
}

h1 strong {
  color: var(--teal-dark);
  font-weight: 700;
}

.hero-thesis {
  max-width: 790px;
  margin: 0 auto 22px;
  color: #344043;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1.45;
}

.authors {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 30px;
  margin: 12px 0 4px;
  font-size: 17px;
  font-weight: 700;
}

.authors a {
  text-decoration: none;
}

.authors a:hover,
.authors a:focus-visible {
  color: var(--teal);
  text-decoration: underline;
}

.authors sup {
  color: var(--coral);
}

.affiliation {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.affiliation span {
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 32px;
}

.button {
  min-width: 112px;
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 140ms ease, background-color 140ms ease, color 140ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

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

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--teal-dark);
}

.button-secondary {
  color: var(--ink);
  background: var(--paper);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  color: var(--teal-dark);
  border-color: var(--teal-dark);
}

.button-tertiary {
  color: var(--teal-dark);
  border-color: var(--teal-dark);
  background: rgba(252, 252, 250, 0.72);
}

.button-tertiary:hover,
.button-tertiary:focus-visible {
  color: #fff;
  background: var(--teal-dark);
}

.hero-finding {
  max-width: 820px;
  margin: 0 auto;
  padding-top: 19px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  border-top: 1px solid rgba(23, 33, 36, 0.25);
  text-align: left;
}

.finding-label {
  padding: 3px 8px;
  color: #fff;
  background: var(--coral);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-finding p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

.section {
  padding: 96px 0;
}

.section-intro {
  padding-top: 82px;
  padding-bottom: 82px;
  background: var(--surface);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 72px;
  align-items: start;
}

h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.18;
}

.abstract-copy {
  max-width: 720px;
  padding-left: 28px;
  border-left: 4px solid var(--amber);
}

.abstract-copy p {
  margin: 0;
  color: #354144;
}

.abstract-copy p + p {
  margin-top: 18px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 56px;
  align-items: end;
  margin-bottom: 48px;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.framework-figure,
.diagnostic-grid figure {
  margin: 0;
}

.framework-figure a {
  display: block;
  border: 1px solid var(--line);
  background: #fff;
}

.framework-figure img {
  width: 100%;
}

figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 38px;
  margin-top: 54px;
}

.module {
  padding-top: 20px;
  border-top: 4px solid var(--line);
}

.module-dfge { border-color: var(--violet); }
.module-ben { border-color: var(--green); }
.module-cri { border-color: var(--coral); }

.module-index {
  margin: 0 0 7px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

.module h3 {
  margin: 0 0 7px;
  font-size: 22px;
}

.module p:last-child {
  margin: 0;
  color: #435053;
  font-size: 15px;
}

.results-section {
  background: #162124;
  color: #f7f8f4;
}

.results-section .eyebrow {
  color: #76c5be;
}

.results-heading > p {
  color: #bdc8c5;
}

.dataset-tabs {
  border-top: 1px solid #516063;
  border-bottom: 1px solid #516063;
}

.tab-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #516063;
}

.tab-list button {
  min-height: 52px;
  padding: 11px 18px;
  color: #bdc8c5;
  border: 0;
  border-right: 1px solid #516063;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
}

.tab-list button:last-child {
  border-right: 0;
}

.tab-list button[aria-selected="true"] {
  color: #162124;
  background: #e7ebe5;
}

.tab-list button:focus-visible {
  outline: 3px solid #e2a74e;
  outline-offset: -3px;
}

.result-panel {
  min-height: 240px;
  display: grid;
  grid-template-columns: 1fr 1fr minmax(220px, 0.8fr);
  align-items: center;
}

.result-panel[hidden] {
  display: none;
}

.metric-block {
  padding: 32px;
  border-right: 1px solid #516063;
}

.metric-name,
.metric-gain,
.metric-value,
.panel-note {
  margin: 0;
}

.metric-name {
  color: #bdc8c5;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-value {
  margin: 4px 0 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 48px;
  line-height: 1.15;
}

.metric-gain {
  color: #86d2a0;
  font-size: 14px;
  font-weight: 700;
}

.panel-note {
  padding: 32px;
  color: #d3dbd8;
  font-size: 15px;
}

.table-wrap {
  margin-top: 40px;
  overflow-x: auto;
  outline: none;
}

.table-wrap:focus-visible {
  outline: 2px solid #e2a74e;
  outline-offset: 4px;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

caption {
  margin-bottom: 10px;
  color: #bdc8c5;
  font-size: 13px;
  text-align: left;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid #435154;
  text-align: right;
  white-space: nowrap;
}

thead th {
  color: #bdc8c5;
  font-size: 12px;
  font-weight: 700;
}

tbody th,
thead th:first-child {
  text-align: left;
}

tbody th {
  color: #fff;
}

td {
  font-size: 14px;
}

td.best {
  color: #86d2a0;
  font-weight: 800;
}

.ablation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 58px;
  align-items: center;
}

.ablation-list {
  border-top: 1px solid var(--line);
}

.ablation-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 1fr) 72px;
  gap: 20px;
  align-items: center;
  min-height: 82px;
  border-bottom: 1px solid var(--line);
}

.ablation-row > div:first-child {
  display: flex;
  flex-direction: column;
}

.ablation-row strong {
  font-size: 14px;
}

.ablation-row span {
  color: var(--muted);
  font-size: 12px;
}

.ablation-track {
  height: 8px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-strong);
}

.ablation-track span {
  display: block;
  height: 100%;
  background: var(--coral);
}

.is-full .ablation-track span {
  background: var(--teal);
}

.analysis-takeaway {
  padding: 28px 0 28px 30px;
  border-left: 4px solid var(--violet);
}

.takeaway-number {
  margin: 0;
  color: var(--violet);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 52px;
  line-height: 1;
}

.analysis-takeaway h3 {
  margin: 12px 0 8px;
  font-size: 19px;
}

.analysis-takeaway p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 54px 48px;
  margin-top: 82px;
}

.diagnostic-grid figure {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.diagnostic-grid img {
  width: 100%;
  border: 1px solid #e1e5e2;
  background: #fff;
}

.diagnostic-wide {
  grid-column: 1 / -1;
  width: min(100%, 840px);
  justify-self: center;
}

.repro-section {
  padding: 74px 0;
  color: #fff;
  background: var(--teal-dark);
}

.repro-section .eyebrow {
  color: #9edbd5;
}

.repro-shell {
  display: grid;
  grid-template-columns: 0.72fr 1.55fr auto;
  gap: 50px;
  align-items: center;
}

.repro-shell h2 {
  font-size: 30px;
}

.repro-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 36px;
  margin: 0;
}

.repro-facts div {
  padding-left: 15px;
  border-left: 2px solid #70b7b0;
}

.repro-facts dt {
  color: #9edbd5;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.repro-facts dd {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 700;
}

.text-link {
  white-space: nowrap;
  font-size: 14px;
  font-weight: 750;
}

.citation-section {
  background: var(--surface);
}

.citation-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  gap: 68px;
  align-items: start;
}

.citation-shell > div > p:not(.eyebrow) {
  margin: 18px 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.citation-copy {
  min-width: 132px;
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 26px;
  color: #e9efed;
  border-radius: 6px;
  background: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
}

footer {
  padding: 28px 0;
  color: #c3ccca;
  background: #101719;
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-size: 13px;
}

.footer-shell p {
  margin: 0;
}

.footer-shell div {
  display: flex;
  gap: 22px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  max-width: min(340px, calc(100% - 48px));
  padding: 10px 14px;
  color: #fff;
  border-radius: 5px;
  background: var(--ink);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
  font-size: 13px;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .nav-shell {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  h1 {
    font-size: 40px;
  }

  .intro-grid,
  .section-heading,
  .ablation-layout,
  .repro-shell,
  .citation-shell {
    grid-template-columns: 1fr;
  }

  .intro-grid,
  .section-heading,
  .citation-shell {
    gap: 30px;
  }

  .section-heading {
    align-items: start;
  }

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

  .panel-note {
    grid-column: 1 / -1;
    border-top: 1px solid #516063;
  }

  .metric-block:nth-child(2) {
    border-right: 0;
  }

  .repro-shell {
    gap: 32px;
  }

  .text-link {
    justify-self: start;
  }
}

@media (max-width: 680px) {
  .section-shell,
  .nav-shell,
  .hero-content {
    width: min(calc(100% - 32px), var(--page-width));
  }

  .hero {
    min-height: 0;
  }

  .hero-content {
    padding: 42px 0 28px;
  }

  h1 {
    margin-bottom: 14px;
    font-size: 30px;
    line-height: 1.15;
  }

  h2 {
    font-size: 31px;
  }

  .hero-thesis {
    margin-bottom: 14px;
    font-size: 16px;
  }

  .authors {
    gap: 4px 22px;
    margin-top: 8px;
    font-size: 15px;
  }

  .affiliation {
    font-size: 13px;
  }

  .affiliation {
    max-width: 320px;
    margin-inline: auto;
  }

  .hero-finding {
    grid-template-columns: 1fr;
    gap: 9px;
    padding-top: 13px;
  }

  .finding-label {
    justify-self: center;
  }

  .hero-finding p {
    text-align: center;
    font-size: 13px;
  }

  .hero-actions {
    margin: 18px 0 20px;
  }

  .section {
    padding: 72px 0;
  }

  .section-intro {
    padding: 64px 0;
  }

  .abstract-copy {
    padding-left: 20px;
  }

  .module-grid,
  .diagnostic-grid,
  .repro-facts {
    grid-template-columns: 1fr;
  }

  .module-grid {
    gap: 30px;
  }

  .diagnostic-wide {
    grid-column: auto;
  }

  .tab-list button {
    padding-inline: 10px;
  }

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

  .metric-block,
  .metric-block:nth-child(2) {
    padding: 24px;
    border-right: 0;
    border-bottom: 1px solid #516063;
  }

  .panel-note {
    grid-column: auto;
    padding: 24px;
    border-top: 0;
  }

  .ablation-row {
    grid-template-columns: 1fr 62px;
    gap: 8px 16px;
    padding: 14px 0;
  }

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

  .analysis-takeaway {
    padding-left: 20px;
  }

  .diagnostic-grid {
    gap: 44px;
    margin-top: 64px;
  }

  .citation-shell {
    gap: 34px;
  }

  pre {
    padding: 20px;
    font-size: 11px;
  }

  .footer-shell {
    flex-direction: column;
    align-items: flex-start;
  }

  .toast {
    right: 16px;
    bottom: 16px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
