:root {
  color-scheme: light;
  --ink: #171b2f;
  --ink-soft: #5f667f;
  --paper: #fbfbfd;
  --surface: #ffffff;
  --surface-tinted: #f2f4fb;
  --line: #dfe3ef;
  --accent: #4e60bd;
  --accent-dark: #354594;
  --accent-soft: #e9edff;
  --gold: #edb827;
  --dark: #171d35;
  --dark-soft: #252d4a;
  --success: #5f9d46;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --shadow-sm: 0 12px 34px rgba(30, 38, 73, 0.08);
  --shadow-lg: 0 28px 70px rgba(30, 38, 73, 0.13);
  --content: 1180px;
  --reading: 760px;
  --section-space: clamp(5rem, 9vw, 9rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(90, 109, 199, 0.08), transparent 28rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-dark);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(212, 217, 233, 0.85);
  background: rgba(251, 251, 253, 0.88);
  backdrop-filter: blur(18px);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 3rem), var(--content));
  min-height: 68px;
  margin: 0 auto;
}

.site-mark {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.14rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 1.55rem;
}

.site-nav__links a {
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.site-nav__links a:hover {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
}

.nav-toggle__icon {
  display: grid;
  width: 24px;
  gap: 5px;
}

.nav-toggle__icon i {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 180ms ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon i:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon i:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  padding: clamp(5.5rem, 9vw, 8.5rem) max(1.5rem, calc((100vw - var(--content)) / 2)) clamp(6rem, 10vw, 10rem);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(246, 247, 253, 0.9)),
    var(--paper);
}

.hero::after {
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: 180px;
  background: linear-gradient(180deg, transparent, rgba(229, 233, 248, 0.65));
  content: "";
  pointer-events: none;
}

.hero-atmosphere {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-atmosphere::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(78, 96, 189, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 96, 189, 0.055) 1px, transparent 1px);
  background-size: 54px 54px;
  content: "";
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent 88%);
}

.hero-atmosphere::after {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(74, 92, 186, 0.22) 1px, transparent 1.5px);
  background-size: 36px 36px;
  content: "";
  mask-image: radial-gradient(ellipse at 50% 32%, #000 0%, transparent 65%);
  opacity: 0.3;
}

.hero-atmosphere__orb {
  position: absolute;
  width: clamp(18rem, 34vw, 36rem);
  border-radius: 50%;
  aspect-ratio: 1;
  filter: blur(4px);
  opacity: 0.38;
  animation: hero-orbit 18s ease-in-out infinite alternate;
}

.hero-atmosphere__orb--violet {
  top: -18%;
  left: -8%;
  background: radial-gradient(circle at 40% 40%, rgba(138, 113, 224, 0.42), rgba(138, 113, 224, 0));
}

.hero-atmosphere__orb--blue {
  top: 22%;
  right: -12%;
  background: radial-gradient(circle at 50% 50%, rgba(76, 154, 231, 0.38), rgba(76, 154, 231, 0));
  animation-delay: -7s;
  animation-duration: 23s;
}

.hero-atmosphere__orb--gold {
  bottom: -20%;
  left: 34%;
  width: clamp(14rem, 25vw, 27rem);
  background: radial-gradient(circle at 50% 50%, rgba(237, 184, 39, 0.26), rgba(237, 184, 39, 0));
  animation-delay: -12s;
  animation-duration: 20s;
}

.hero__content,
.hero__visual {
  position: relative;
  z-index: 1;
}

.hero__content {
  width: min(100%, 1060px);
  text-align: center;
}

.eyebrow {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 1060px;
  margin: 0 auto 1.65rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 5.2vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.052em;
  line-height: 0.98;
  text-wrap: balance;
}

.hero__summary {
  max-width: 850px;
  margin: 0 auto 1.8rem;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.5vw, 1.24rem);
  line-height: 1.72;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.22rem 0.8rem;
  margin-bottom: 0.35rem;
  color: #323950;
  font-size: 0.94rem;
}

.authors span:not(:last-child)::after {
  content: ",";
}

.authors sup,
.author-note sup {
  color: var(--accent);
  font-weight: 800;
}

.affiliations {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.author-note {
  margin: 0.2rem 0 1.8rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.resource-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.62rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.resource-link:hover {
  transform: translateY(-2px);
  border-color: #aeb7db;
  color: var(--accent-dark);
  box-shadow: var(--shadow-sm);
}

.resource-link--primary {
  border-color: var(--dark);
  color: #fff;
  background: var(--dark);
}

.resource-link--primary:hover {
  border-color: var(--accent-dark);
  color: #fff;
  background: var(--accent-dark);
}

.hero__visual {
  width: min(100%, var(--content));
  margin: clamp(3.5rem, 6vw, 5.25rem) auto 0;
  padding: clamp(0.55rem, 1vw, 0.85rem);
  border: 1px solid rgba(188, 198, 232, 0.78);
  border-radius: calc(var(--radius-lg) + 10px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(238, 241, 252, 0.72));
  box-shadow:
    0 52px 100px rgba(38, 49, 99, 0.18),
    0 14px 35px rgba(38, 49, 99, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  animation: teaser-breathe 9s ease-in-out infinite;
  transform-style: preserve-3d;
}

.hero__visual::before {
  position: absolute;
  z-index: -1;
  inset: 6% 3% -9%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(76, 99, 211, 0.25), transparent 70%);
  content: "";
  filter: blur(22px);
}

.hero__visual::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.hero__visual img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 24px 54px rgba(26, 34, 72, 0.13);
  transition: transform 350ms ease, box-shadow 350ms ease;
}

.hero__visual figcaption,
.method-figure figcaption {
  margin-top: 0.8rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-align: center;
}

@keyframes hero-orbit {
  0% {
    transform: translate3d(-2%, -2%, 0) scale(0.96);
  }

  100% {
    transform: translate3d(8%, 7%, 0) scale(1.08);
  }
}

@keyframes teaser-breathe {
  0%,
  100% {
    transform: translateY(0) rotateX(0deg);
  }

  50% {
    transform: translateY(-8px) rotateX(0.35deg);
  }
}

.section {
  padding: var(--section-space) max(1.5rem, calc((100vw - var(--content)) / 2));
}

.section--tinted {
  border-block: 1px solid var(--line);
  background: var(--surface-tinted);
}

.section-heading {
  max-width: var(--reading);
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section-heading h2 {
  margin-bottom: 1.2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 4vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.section-heading > p:last-child,
.section-heading--split > p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.3vw, 1.12rem);
}

.section-heading--split {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
  max-width: none;
}

.section-heading--split h2 {
  margin-bottom: 0;
}

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

.failure-card {
  min-height: 280px;
  padding: clamp(2rem, 4vw, 3.2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.failure-card:first-child {
  background: linear-gradient(145deg, #fffaf0, #fff);
}

.failure-card:last-child {
  background: linear-gradient(145deg, #f3f6ff, #fff);
}

.card-index {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.failure-card h3,
.method-step h3,
.dataset-note h3,
.demo-placeholder h3 {
  margin-bottom: 0.75rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.5vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.failure-card p:last-child,
.method-step p,
.dataset-note p,
.demo-placeholder__content > p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.method-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: stage;
}

.method-step {
  position: relative;
  min-height: 250px;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(244, 246, 254, 0.9));
  box-shadow: 0 14px 34px rgba(30, 38, 73, 0.07), inset 0 1px 0 #fff;
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.method-step:not(:last-child)::after {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -1.45rem;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  background: #fff;
  content: "→";
  font-weight: 800;
  line-height: 1.65rem;
  text-align: center;
  transform: translateY(-50%);
}

.method-step__number {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 2.4rem;
  border-radius: 50%;
  place-items: center;
  color: #fff;
  background: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.method-step h3 {
  font-size: 1.5rem;
}

.method-figure {
  margin: 2rem 0 0;
}

.method-figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.demo-placeholder {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 280ms ease, border-color 280ms ease, box-shadow 280ms ease;
}

.demo-placeholder figure {
  margin: 0;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 10px);
}

.demo-placeholder__content {
  padding: 1rem clamp(0.5rem, 2vw, 1.5rem) 1rem 0;
}

.demo-placeholder__label {
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.demo-placeholder__content > p {
  margin-bottom: 1.5rem;
}

.demo-placeholder a,
.dataset-note a {
  display: inline-flex;
  padding-bottom: 0.15rem;
  border-bottom: 2px solid var(--accent);
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.section--dark {
  color: #f7f8ff;
  background: var(--dark);
}

.section--dark .eyebrow {
  color: #aebaff;
}

.section--dark .section-heading > p:last-child {
  color: #bfc6dc;
}

.table-block {
  margin-top: 1.5rem;
  padding: clamp(1.2rem, 3vw, 2.2rem);
  border: 1px solid #39415e;
  border-radius: var(--radius-md);
  background: var(--dark-soft);
  box-shadow: 0 22px 55px rgba(5, 9, 25, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: transform 280ms ease, border-color 280ms ease, box-shadow 280ms ease;
}

.table-block + .table-block {
  margin-top: 1.5rem;
}

.table-block__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.table-block__heading h3,
.table-block__heading p {
  margin: 0;
}

.table-block__heading h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 500;
}

.table-block__heading a,
.table-block__heading p {
  color: #c8ceea;
  font-size: 0.8rem;
}

.table-scroll {
  position: relative;
  overflow-x: auto;
  border: 1px solid #404967;
  border-radius: var(--radius-sm);
  isolation: isolate;
}

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

caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

th,
td {
  padding: 0.78rem 0.85rem;
  border-bottom: 1px solid #3e4663;
  text-align: center;
  white-space: nowrap;
}

thead tr:first-child > th:first-child,
tbody tr > th:first-child {
  position: sticky;
  left: 0;
  min-width: 185px;
  text-align: left;
  background: var(--dark-soft);
  box-shadow: 1px 0 0 #4b5577, 14px 0 18px -18px rgba(0, 0, 0, 0.9);
}

thead tr:first-child > th:first-child {
  z-index: 4;
  background: #202842;
}

tbody tr > th:first-child {
  z-index: 2;
}

thead th {
  color: #cad1ef;
  background: #202842;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

tbody th,
tbody td {
  font-size: 0.82rem;
}

.table-highlight th,
.table-highlight td {
  color: #fff;
  background: #303c6b;
  font-weight: 750;
}

.table-highlight > th:first-child {
  background: #303c6b;
}

.evidence-note {
  max-width: 900px;
  margin: 1rem 0 0;
  color: #aeb6d0;
  font-size: 0.76rem;
}

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

.human-eval article {
  display: flex;
  flex-direction: column;
  min-height: 180px;
  justify-content: space-between;
  padding: 1.6rem;
  border: 1px solid #39415e;
  border-radius: var(--radius-md);
  background: #202842;
  box-shadow: 0 16px 36px rgba(5, 9, 25, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.human-eval strong {
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 4vw, 3.8rem);
  font-weight: 500;
}

.human-eval span {
  color: #bcc4df;
  font-size: 0.82rem;
}

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

.data-flow article {
  display: flex;
  min-height: 190px;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 14px 34px rgba(30, 38, 73, 0.07), inset 0 1px 0 #fff;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.data-flow strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.data-flow span {
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.dataset-note {
  display: grid;
  grid-template-columns: 0.35fr 1fr auto;
  gap: 2rem;
  align-items: center;
  margin-top: 1.25rem;
  padding: 1.7rem;
  border-radius: var(--radius-md);
  color: #fff;
  background: var(--accent);
}

.dataset-note h3,
.dataset-note p {
  margin: 0;
  color: #fff;
}

.dataset-note a {
  border-color: #fff;
  color: #fff;
}

.qualitative-cases {
  display: grid;
  gap: 1.5rem;
  width: min(100%, var(--content));
  margin-inline: auto;
}

.qualitative-case {
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 280ms ease, border-color 280ms ease, box-shadow 280ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .hero__visual:hover img {
    transform: translateY(-3px) scale(1.006);
    box-shadow: 0 30px 70px rgba(26, 34, 72, 0.18);
  }

  .failure-card:hover,
  .method-step:hover,
  .demo-placeholder:hover,
  .data-flow article:hover,
  .qualitative-case:hover {
    transform: translateY(-6px);
    border-color: #c4ccec;
    box-shadow: 0 25px 60px rgba(30, 38, 73, 0.14), inset 0 1px 0 #fff;
  }

  .table-block:hover,
  .human-eval article:hover {
    transform: translateY(-5px);
    border-color: #536086;
    box-shadow: 0 30px 72px rgba(5, 9, 25, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  }
}

.qualitative-case__heading {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding-inline: 0.2rem;
}

.qualitative-case__heading p,
.qualitative-case__heading h3 {
  margin: 0;
}

.qualitative-case__heading p {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.qualitative-case__heading h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 500;
}

.qualitative-case__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.qualitative-panel {
  display: grid;
  min-width: 0;
  margin: 0;
  grid-template-rows: auto 1fr;
}

.qualitative-panel__media {
  display: grid;
  overflow: hidden;
  border: 1px solid #e8eaf2;
  border-radius: var(--radius-sm);
  aspect-ratio: 16 / 9;
  place-items: center;
  background: #f7f8fc;
}

.qualitative-panel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qualitative-panel figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.25rem 0.1rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.qualitative-panel figcaption strong {
  color: var(--ink);
  font-size: 0.8rem;
}

.qualitative-panel--ours .qualitative-panel__media {
  border-color: #bcc6ef;
  box-shadow: inset 0 0 0 1px rgba(78, 96, 189, 0.1);
}

.qualitative-panel--ours figcaption strong {
  color: var(--accent-dark);
}

.citation {
  display: grid;
  grid-template-columns: 0.62fr 1.38fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.citation .section-heading {
  margin-bottom: 0;
}

.citation-code {
  position: relative;
  grid-column: 2;
  min-width: 0;
}

.citation pre {
  margin: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  overflow-x: auto;
  border-radius: var(--radius-md);
  color: #e6eaff;
  background: var(--dark);
  box-shadow: var(--shadow-sm);
  font-size: clamp(0.72rem, 1.1vw, 0.86rem);
  line-height: 1.7;
}

.citation-copy {
  position: absolute;
  z-index: 2;
  top: 0.9rem;
  right: 0.9rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid #515c83;
  border-radius: 999px;
  color: #e6eaff;
  background: rgba(37, 45, 74, 0.9);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  cursor: pointer;
}

.citation-copy:hover {
  border-color: #98a7e8;
  background: #35416d;
}

.citation-status {
  display: block;
  min-height: 1.5rem;
  margin-top: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.76rem;
  text-align: right;
}

.citation > p {
  grid-column: 2;
  margin: -1.5rem 0 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem max(1.5rem, calc((100vw - var(--content)) / 2));
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  background: #fff;
  font-size: 0.8rem;
}

.site-footer p {
  margin: 0;
}

.site-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.error-page {
  display: grid;
  width: min(calc(100% - 3rem), 760px);
  min-height: 100vh;
  margin: 0 auto;
  align-content: center;
}

.error-page h1 {
  margin-bottom: 1.25rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.error-page > p:not(.eyebrow) {
  max-width: 600px;
  margin-bottom: 2rem;
  color: var(--ink-soft);
}

.error-page .resource-link {
  justify-self: start;
}

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-inline: 1.5rem;
  }

  .hero__content {
    max-width: 860px;
  }

  .hero__visual {
    max-width: 920px;
  }

  .hero__visual::before {
    inset-inline: 0;
  }

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

  .method-step:not(:last-child)::after {
    display: none;
  }

  .demo-placeholder {
    grid-template-columns: 1fr;
  }

  .demo-placeholder__content {
    padding: 0.5rem 0.75rem 1.25rem;
  }

  .dataset-note {
    grid-template-columns: 0.4fr 1fr;
  }

  .dataset-note a {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .site-nav {
    width: min(calc(100% - 2rem), var(--content));
  }

  .js .nav-toggle {
    display: inline-flex;
  }

  .js .site-nav__links {
    position: absolute;
    top: calc(100% + 1px);
    right: 1rem;
    left: 1rem;
    display: none;
    align-items: stretch;
    padding: 0.65rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
    flex-direction: column;
  }

  .js .site-nav__links[data-nav-open="true"] {
    display: flex;
  }

  .js .site-nav__links a {
    padding: 0.65rem 0.8rem;
  }

  .hero {
    width: 100%;
    padding: 4.5rem 1rem 6rem;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 11vw, 4rem);
    line-height: 1;
  }

  .hero__visual {
    margin-top: 3rem;
    padding: 0.4rem;
    border-radius: calc(var(--radius-md) + 6px);
  }

  .hero-atmosphere::before {
    background-size: 36px 36px;
  }

  .section {
    padding-inline: 1rem;
  }

  .section-heading--split,
  .failure-grid,
  .human-eval,
  .citation {
    grid-template-columns: 1fr;
  }

  .qualitative-case__grid {
    grid-template-columns: 1fr;
  }

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

  .method-flow,
  .data-flow {
    grid-template-columns: 1fr;
  }

  .failure-card,
  .method-step,
  .data-flow article {
    min-height: auto;
  }

  .method-step__number {
    margin-bottom: 1.4rem;
  }

  .table-block__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .human-eval article {
    min-height: 150px;
  }

  .dataset-note {
    grid-template-columns: 1fr;
  }

  .dataset-note a {
    grid-column: 1;
  }

  .citation-code,
  .citation > p {
    grid-column: 1;
  }

  .citation > p {
    margin-top: 0;
  }

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

@media (max-width: 430px) {
  .resource-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__visual img,
  .method-figure img,
  .demo-placeholder,
  .qualitative-case {
    border-radius: var(--radius-sm);
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
