/*
 * PixCell publication site
 *
 * An editorial sibling of the live PixCell instrument: warm paper, precise
 * hairlines, book typography, quiet controls, and figures that remain the
 * primary evidence. Measurement colors are semantic rather than decorative.
 */

:root {
  color-scheme: light;
  --paper: #fbfaf6;
  --surface: #ffffff;
  --surface-alt: #f3f2ed;
  --surface-raised: #f7f6f1;
  --ink: #17191c;
  --ink-soft: #363b41;
  --muted: #626a72;
  --faint: #686f76;
  --rule: #dddcd6;
  --rule-strong: #bfc1bd;
  --accent: #a31f34;
  --accent-dark: #82182a;
  --accent-soft: #f6eaed;
  --measure: #8b5900;
  --measure-soft: #f7eedc;
  --verified: #267c5a;
  --verified-soft: #eaf4ef;
  --display: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --serif: 'STIX Two Text', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --header-height: 72px;
  --radius: 4px;
  --radius-large: 6px;
  --page: 1520px;
  --content: 1320px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

button {
  color: inherit;
}

::selection {
  color: var(--ink);
  background: rgba(163, 31, 52, 0.14);
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 9px 12px;
  color: var(--surface);
  background: var(--ink);
  border-radius: var(--radius);
  transform: translateY(-160%);
  transition: transform 140ms ease;
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(251, 250, 246, 0.96);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(14px);
}

.site-header-inner {
  width: min(100%, var(--page));
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: auto auto;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
}

.site-brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.brand-mark,
.footer-brand img {
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.brand-mark {
  height: 42px;
}

.footer-brand img {
  height: 35px;
}

.site-brand span,
.footer-brand span {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.site-brand span {
  font-size: 1.65rem;
}

.footer-brand span {
  font-size: 1.45rem;
}

.site-utilities {
  display: flex;
  align-items: center;
  gap: 18px;
}

.primary-link,
.action {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 8px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.primary-link,
.action-primary {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

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

/* Shared typography */

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

h1,
h2,
.citation-inner h2 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.035em;
}

/* Hero */

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100svh - var(--header-height));
  overflow: hidden;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(23, 25, 28, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 28, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  border-bottom: 1px solid var(--rule);
}

.hero::after {
  content: '';
  position: absolute;
  top: 62px;
  right: -60px;
  width: min(44vw, 720px);
  height: 250px;
  pointer-events: none;
  opacity: 0.72;
  background-image: radial-gradient(circle, rgba(163, 31, 52, 0.22) 1px, transparent 1.45px);
  background-size: 12px 12px;
  -webkit-mask-image: linear-gradient(105deg, transparent 5%, #000 55%, transparent 100%);
  mask-image: linear-gradient(105deg, transparent 5%, #000 55%, transparent 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100%, var(--page));
  margin: 0 auto;
  padding: clamp(52px, 5vw, 72px) 28px 54px;
}

.hero-heading-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, 0.72fr);
  gap: clamp(54px, 7vw, 108px);
  align-items: end;
}

.hero-copy {
  max-width: 820px;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(4.1rem, 7vw, 7.4rem);
  line-height: 0.87;
}

.paper-dek {
  max-width: 700px;
  margin-bottom: 24px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.68rem);
  font-style: italic;
  line-height: 1.25;
}

.hero-summary {
  max-width: 720px;
  margin-bottom: 25px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 1.04rem;
  line-height: 1.65;
}

.authors {
  margin-bottom: 3px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.03rem;
  font-weight: 500;
}

.authors sup,
.affiliation sup {
  position: relative;
  top: -0.12em;
  font-family: var(--sans);
  font-size: 0.62em;
  line-height: 0;
}

.affiliation {
  margin-bottom: 28px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.82rem;
}

.publication-actions {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-launch {
  min-width: min(100%, 280px);
  min-height: 54px;
  padding: 10px 14px;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.action-launch > span {
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.action-launch small {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.action:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--surface);
}

.action small {
  margin-left: 6px;
  color: inherit;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.action-pending {
  color: var(--faint);
  border-style: dashed;
  background: transparent;
  cursor: default;
}

.hero-program {
  align-self: end;
  min-width: 0;
  background: rgba(255, 255, 255, 0.82);
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--rule-strong);
}

.hero-program header,
.hero-program footer {
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero-program header {
  border-bottom: 1px solid var(--rule);
}

.hero-program header > span,
.hero-program footer,
.hero-program header div > span {
  color: var(--muted);
}

.hero-program h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-transform: none;
}

.hero-program pre {
  margin: 0;
  padding: 20px 15px;
  overflow-x: auto;
  color: var(--ink-soft);
  background:
    linear-gradient(90deg, rgba(163, 31, 52, 0.045) 1px, transparent 1px);
  background-size: 32px 100%;
  font-family: var(--mono);
  font-size: clamp(0.66rem, 0.82vw, 0.78rem);
  line-height: 1.85;
  tab-size: 2;
}

.hero-program code,
.hero-program code span {
  display: block;
}

.hero-program code b {
  color: var(--accent);
  font-weight: 500;
}

.hero-program footer {
  border-top: 1px solid var(--rule);
  letter-spacing: 0.045em;
  text-transform: none;
}

.channel-figure {
  margin: clamp(54px, 6vw, 86px) 0 0;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}

/* Measured reconstruction sequence */

.reconstruction-figure {
  margin: clamp(32px, 2.5vw, 42px) 0 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-large);
}

.reconstruction-figure .figure-label-row button {
  padding: 0;
  color: var(--accent);
  background: transparent;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  cursor: pointer;
}

.reconstruction-figure .figure-label-row button:hover {
  color: var(--ink);
}

.reconstruction-stage {
  position: relative;
  padding: clamp(18px, 3vw, 38px);
  background-color: #fff;
  background-image:
    linear-gradient(rgba(23, 25, 28, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 28, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
}

.stage-readout {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  max-width: calc(100% - 36px);
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.stage-readout span,
.stage-readout strong {
  display: block;
}

.stage-readout span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stage-readout strong {
  margin-top: 2px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
}

.sequence-image-frame {
  position: relative;
  min-height: clamp(280px, 34vw, 510px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.sequence-image-frame > img {
  width: 100%;
  height: auto;
  max-height: 510px;
  object-fit: contain;
  opacity: 1;
  transition: opacity 130ms ease;
}

.sequence-image-frame > canvas {
  width: 100%;
  height: auto;
  max-height: 510px;
  object-fit: contain;
}

.sequence-image-frame > canvas[hidden] {
  display: none;
}

.sequence-image-frame > img.is-live-hidden {
  display: none;
}

.sequence-image-frame > img.is-changing {
  opacity: 0.12;
}

.overlay-legend {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 12px;
  padding: 7px 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: 0.65rem;
  transition: opacity 130ms ease;
}

.reconstruction-figure:not([data-kind='overlay']):not([data-kind='live']) .overlay-legend {
  opacity: 0;
  pointer-events: none;
}

.overlay-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.overlay-legend i {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
}

.legend-overlap { background: #810000; }
.legend-extra { background: #ff9297; }
.legend-missing { background: #111; }

.sequence-controls {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) minmax(112px, 1.15fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.sequence-step {
  position: relative;
  min-width: 0;
  min-height: 62px;
  padding: 10px 9px;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 3px;
  color: var(--muted);
  background: var(--surface);
  border: 0;
  border-right: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.72rem;
  text-align: left;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease;
}

.sequence-step:last-child {
  border-right: 0;
}

.sequence-step span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
}

.sequence-step::after {
  content: '';
  position: absolute;
  left: 9px;
  right: 100%;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transition: right 170ms ease;
}

.sequence-step:hover,
.sequence-step.is-active {
  color: var(--ink);
  background: var(--surface-raised);
}

.sequence-step.is-active::after {
  right: 9px;
}

.sequence-step-final {
  min-width: 112px;
  margin-left: 12px;
  color: var(--accent);
  border-left: 1px solid var(--rule-strong);
  background: var(--surface-raised);
}

/* Live named-parameter workbench */

.parameter-workbench {
  background: var(--surface-raised);
  border-bottom: 1px solid var(--rule);
}

.parameter-workbench > header,
.parameter-workbench > footer {
  min-height: 46px;
  padding: 9px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.parameter-workbench > header {
  border-bottom: 1px solid var(--rule);
}

.parameter-workbench > header span,
.parameter-workbench > header strong {
  display: block;
}

.parameter-workbench > header span {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.parameter-workbench > header strong {
  margin-top: 2px;
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 500;
}

.parameter-workbench[data-ready='true'] > header strong {
  color: var(--verified);
}

.parameter-workbench button {
  min-height: 31px;
  padding: 5px 8px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.61rem;
  letter-spacing: 0.045em;
  cursor: pointer;
}

.parameter-workbench button:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
}

.parameter-workbench button:disabled {
  color: var(--faint);
  background: transparent;
  border-color: var(--rule);
  cursor: default;
}

.parameter-workbench fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 0;
  transition: opacity 180ms ease, filter 180ms ease;
}

.parameter-workbench fieldset:disabled {
  opacity: 0.38;
  filter: grayscale(1);
}

.parameter-workbench fieldset > label {
  min-width: 0;
  padding: 13px 15px 14px;
  display: grid;
  gap: 11px;
  border-right: 1px solid var(--rule);
}

.parameter-workbench fieldset > label:last-child {
  border-right: 0;
}

.parameter-workbench label > span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.parameter-workbench output {
  flex: 0 0 auto;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-variant-numeric: tabular-nums;
}

.parameter-workbench input[type='range'] {
  width: 100%;
  height: 16px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: ew-resize;
}

.parameter-workbench input[type='range']::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--rule-strong);
}

.parameter-workbench input[type='range']::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  margin-top: -5.5px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 50%;
}

.parameter-workbench input[type='range']::-moz-range-track {
  height: 2px;
  background: var(--rule-strong);
  border: 0;
}

.parameter-workbench input[type='range']::-moz-range-thumb {
  width: 13px;
  height: 13px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 50%;
}

.parameter-workbench input[type='range']:disabled {
  cursor: default;
}

.parameter-workbench > footer {
  color: var(--muted);
  border-top: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 0.74rem;
  line-height: 1.4;
}

.parameter-workbench > footer > span {
  max-width: 780px;
}

.reconstruction-figure figcaption {
  padding: 12px 15px 14px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.reconstruction-figure figcaption strong {
  color: var(--ink);
  font-weight: 600;
}

.figure-label-row {
  min-height: 42px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.figure-label-row span {
  color: var(--muted);
}

.figure-label-row a {
  color: var(--accent);
}

.figure-label-row a:hover {
  color: var(--ink);
}

.channel-scroll {
  padding: clamp(8px, 1.2vw, 16px) 0;
  overflow-x: auto;
  scrollbar-color: var(--rule-strong) transparent;
  scrollbar-width: thin;
}

.channel-scroll img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

.channel-figure figcaption {
  margin-top: 8px;
  padding: 11px 0 0;
  color: var(--muted);
  border-top: 1px solid var(--rule-strong);
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.55;
}

/* Benchmark evidence */

.benchmark-section {
  padding: clamp(76px, 8vw, 120px) 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.benchmark-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 46px;
}

.benchmark-header h2 {
  max-width: 820px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 5vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

/* Sections */

.section {
  padding: clamp(78px, 8vw, 132px) 28px;
  border-bottom: 1px solid var(--rule);
}

.section-inner {
  width: min(100%, var(--content));
  margin: 0 auto;
}

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

.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.15fr);
  gap: clamp(50px, 8vw, 118px);
  align-items: start;
}

.summary-grid h2 {
  max-width: 610px;
  margin: 0;
  font-size: clamp(2.75rem, 5vw, 5rem);
  line-height: 0.98;
}

.summary-prose {
  max-width: 650px;
}

.principle-grid {
  margin-top: clamp(58px, 7vw, 96px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.principle-grid article {
  min-height: 184px;
  padding: 18px 22px;
  background: transparent;
  border-right: 1px solid var(--rule);
}

.principle-grid article:first-child {
  padding-left: 0;
}

.principle-grid article:last-child {
  padding-right: 0;
  border-right: 0;
}

.principle-index {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.principle-grid h3 {
  margin: 37px 0 10px;
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.principle-grid p {
  max-width: 39ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.chapter {
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
  background: var(--paper);
}

.chapter-alt {
  background: var(--surface-raised);
}

/* Evidence */

.figure-card {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.figure-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: transparent;
  mix-blend-mode: multiply;
}

.figure-card figcaption {
  margin-top: 10px;
  padding: 10px 0 1px;
  color: var(--muted);
  border-top: 1px solid var(--rule-strong);
  font-size: 0.78rem;
  line-height: 1.55;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: clamp(70px, 8vw, 106px) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.metric-strip > div {
  min-height: 145px;
  padding: 16px 18px;
  background: transparent;
  border-right: 1px solid var(--rule);
}

.metric-strip > div:first-child {
  padding-left: 0;
}

.metric-strip > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.metric-strip span,
.metric-strip small {
  display: block;
}

.metric-strip span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.metric-strip strong {
  display: block;
  margin: 24px 0 7px;
  font-family: var(--display);
  font-size: clamp(1.65rem, 2.8vw, 2.65rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}

.metric-strip small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

/* Citation and footer */

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

.citation-inner {
  display: grid;
  grid-template-columns: minmax(250px, 0.65fr) minmax(0, 1fr);
  gap: clamp(54px, 8vw, 120px);
  align-items: start;
}

.citation-inner > *,
.bibtex-container {
  min-width: 0;
}

.citation-inner h2 {
  margin: 0 0 14px;
  font-size: clamp(2.5rem, 4vw, 4.25rem);
  line-height: 1;
}

.citation-inner header > p:last-child {
  max-width: 390px;
  color: var(--muted);
  font-size: 0.86rem;
}

.bibtex-container {
  position: relative;
}

.bibtex-container pre {
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
}

.bibtex-container code {
  font: inherit;
}

#bibtex-copy {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  padding: 6px 8px;
  color: var(--muted);
  background: var(--surface-raised);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

#bibtex-copy:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.copy-status {
  min-height: 1.4em;
  margin: 8px 0 0;
  color: var(--verified);
  font-size: 0.72rem;
}

.site-footer {
  padding: 34px 28px 38px;
  background: var(--paper);
}

.site-footer-inner {
  width: min(100%, var(--content));
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(200px, 0.6fr) minmax(300px, 1fr);
  gap: 40px;
  align-items: center;
}

.footer-brand img {
  height: 28px;
}

.footer-brand span {
  font-size: 1.2rem;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.footer-note {
  text-align: right;
}

/* Responsive */

@media (max-width: 1180px) {
  .site-header-inner {
    gap: 18px;
  }

  .hero-heading-grid {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.7fr);
    gap: 46px;
  }

  .hero-copy h1 {
    font-size: clamp(4rem, 7.7vw, 6.3rem);
  }

}

@media (max-width: 920px) {
  :root {
    --header-height: 66px;
  }

  .site-header-inner,
  .hero-inner,
  .section,
  .benchmark-section,
  .site-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .brand-mark {
    height: 34px;
  }

  .site-brand span {
    font-size: 1.4rem;
  }

  .site-utilities {
    gap: 12px;
  }

  .hero-heading-grid,
  .summary-grid,
  .citation-inner {
    grid-template-columns: 1fr;
  }

  .hero-program {
    width: min(100%, 720px);
  }

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

  .parameter-workbench fieldset > label {
    border-bottom: 1px solid var(--rule);
  }

  .parameter-workbench fieldset > label:nth-child(2n) {
    border-right: 0;
  }

  .parameter-workbench fieldset > label:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .principle-grid,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .principle-grid article,
  .metric-strip > div {
    min-height: 0;
  }

  .principle-grid article,
  .principle-grid article:first-child,
  .principle-grid article:last-child {
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .principle-grid article:last-child {
    border-bottom: 0;
  }

  .principle-grid h3 {
    margin-top: 24px;
  }

  .benchmark-header {
    align-items: start;
    flex-direction: column;
  }

  .metric-strip {
    gap: 0;
    border: 1px solid var(--rule);
  }

  .metric-strip > div {
    border: 0;
    border-bottom: 1px solid var(--rule);
    border-radius: 0;
  }

  .metric-strip > div:last-child {
    border-bottom: 0;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-note {
    text-align: left;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 60px;
  }

  .site-header-inner,
  .hero-inner,
  .section,
  .benchmark-section,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-mark {
    height: 28px;
  }

  .site-brand {
    gap: 8px;
  }

  .site-brand span {
    font-size: 1.28rem;
  }

  .header-paper {
    display: none;
  }

  .primary-link {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.72rem;
  }

  .hero-inner {
    padding-top: 54px;
    padding-bottom: 34px;
  }

  .hero-heading-grid {
    gap: 38px;
  }

  .hero-copy h1 {
    font-size: clamp(3.55rem, 18vw, 5rem);
    line-height: 0.9;
  }

  .paper-dek {
    font-size: 1.14rem;
  }

  .hero-summary {
    font-size: 0.94rem;
  }

  .publication-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .secondary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .action-launch {
    width: 100%;
  }

  .action {
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
    font-size: 0.7rem;
    text-align: center;
  }

  .action-pending:last-child {
    display: none;
  }

  .reconstruction-figure {
    margin-top: 48px;
  }

  .sequence-image-frame {
    min-height: 230px;
  }

  .sequence-controls {
    grid-template-columns: none;
    grid-auto-columns: 92px;
    grid-auto-flow: column;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .overlay-legend {
    position: static;
    justify-content: center;
    margin-top: 8px;
    border: 0;
  }

  .hero-program {
    display: none;
  }

  .parameter-workbench > header,
  .parameter-workbench > footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .parameter-workbench > header button,
  .parameter-workbench > footer button {
    width: 100%;
  }

  .parameter-workbench fieldset > label {
    padding: 12px;
  }

  .channel-figure {
    margin-top: 48px;
  }

  .channel-scroll img {
    width: 840px;
    max-width: none;
  }

  .channel-figure figcaption {
    font-size: 0.72rem;
  }

  .figure-label-row {
    align-items: flex-start;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 0.58rem;
  }

  .section {
    padding-top: 74px;
    padding-bottom: 74px;
  }

  .benchmark-section {
    padding-top: 74px;
    padding-bottom: 74px;
  }

  .benchmark-header h2 {
    font-size: clamp(2.65rem, 13vw, 4.3rem);
  }

  .summary-grid h2 {
    font-size: clamp(2.65rem, 13vw, 4.3rem);
  }

  .metric-strip {
    margin: 60px 0;
  }

  .citation-inner {
    gap: 36px;
  }

  .bibtex-container pre {
    padding: 58px 15px 18px;
    font-size: 0.67rem;
  }
}

/* Compact landing composition */

.hero-inner {
  width: min(100%, 1640px);
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100svh - var(--header-height));
  display: grid;
  grid-template-columns: minmax(350px, 0.64fr) minmax(680px, 1.36fr);
  gap: clamp(20px, 2.4vw, 40px);
  align-items: center;
  padding: clamp(26px, 3vw, 40px) clamp(18px, 2vw, 28px) 28px;
}

.hero-heading-grid {
  display: contents;
}

.hero-copy {
  max-width: 540px;
}

.hero-copy h1 {
  max-width: 560px;
  margin-bottom: 23px;
  font-size: clamp(3.25rem, 4.75vw, 4.85rem);
  line-height: 0.96;
}

.hero-summary {
  max-width: 520px;
  margin-bottom: 26px;
  font-size: 0.98rem;
  line-height: 1.6;
}

.publication-actions {
  gap: 15px;
}

.action-launch {
  min-width: 148px;
  min-height: 44px;
  padding: 9px 16px;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0;
}

.secondary-actions {
  gap: 17px;
}

.resource-link {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 140ms ease;
}

a.resource-link:hover {
  color: var(--accent);
}

.resource-link img {
  width: 19px;
  height: 19px;
  object-fit: contain;
}

.resource-link small {
  color: var(--faint);
  font-size: 0.64rem;
  font-weight: 500;
}

.hero-method-film {
  position: relative;
  min-width: 0;
  width: 100%;
  margin: 0;
  align-self: center;
  justify-self: stretch;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-top: 2px solid var(--ink);
  box-shadow: 0 18px 48px rgba(23, 25, 28, 0.12);
}

.hero-method-film-stage {
  position: relative;
  min-width: 0;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: #fff;
}

.hero-method-film-stage video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 2 / 1;
  display: block;
  object-fit: contain;
  object-position: center center;
  background: #fff;
}

.hero-method-film-timeline {
  min-height: 26px;
  display: flex;
  align-items: center;
  background: var(--surface);
}

.hero-method-film-scrubber {
  --hero-film-progress: 0%;
  min-width: 0;
  flex: 1 1 auto;
  width: auto;
  height: 18px;
  margin: 0;
  padding: 0;
  display: block;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: ew-resize;
  touch-action: pan-y;
}

.hero-method-film-scrubber::-webkit-slider-runnable-track {
  height: 3px;
  background: linear-gradient(
    to right,
    var(--accent) 0,
    var(--accent) var(--hero-film-progress),
    var(--rule) var(--hero-film-progress),
    var(--rule) 100%
  );
}

.hero-method-film-scrubber::-webkit-slider-thumb {
  width: 11px;
  height: 11px;
  margin-top: -4px;
  appearance: none;
  -webkit-appearance: none;
  opacity: 0;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 50%;
  transition: opacity 120ms ease, transform 120ms ease;
}

.hero-method-film-scrubber:hover::-webkit-slider-thumb,
.hero-method-film-scrubber:active::-webkit-slider-thumb,
.hero-method-film-scrubber:focus-visible::-webkit-slider-thumb {
  opacity: 1;
}

.hero-method-film-scrubber:active::-webkit-slider-thumb {
  transform: scale(1.12);
}

.hero-method-film-scrubber::-moz-range-track {
  height: 3px;
  background: var(--rule);
}

.hero-method-film-scrubber::-moz-range-progress {
  height: 3px;
  background: var(--accent);
}

.hero-method-film-scrubber::-moz-range-thumb {
  width: 9px;
  height: 9px;
  opacity: 0;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 50%;
  transition: opacity 120ms ease, transform 120ms ease;
}

.hero-method-film-scrubber:hover::-moz-range-thumb,
.hero-method-film-scrubber:active::-moz-range-thumb,
.hero-method-film-scrubber:focus-visible::-moz-range-thumb {
  opacity: 1;
}

.hero-method-film-scrubber:active::-moz-range-thumb {
  transform: scale(1.12);
}

.hero-method-film-control {
  flex: 0 0 auto;
  align-self: stretch;
  min-width: 52px;
  padding: 0 10px;
  color: var(--accent);
  background: transparent;
  border: 0;
  border-left: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}

.hero-method-film-control:hover {
  color: var(--ink);
}

.benchmark-section {
  padding: 42px 28px 46px;
}

.benchmark-header,
.benchmark-paper-figure {
  width: min(100%, 980px);
  margin-inline: auto;
}

.benchmark-header {
  align-items: start;
  margin-bottom: 20px;
}

.section-heading {
  margin: 0 0 20px;
}

.benchmark-header .section-heading {
  margin: 0;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 3.2vw, 2.65rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}

.section-heading p {
  max-width: 1020px;
  margin: 7px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.84rem;
  line-height: 1.55;
}

.section.research-contracts-section {
  position: relative;
  overflow: clip;
  padding: 42px 28px 48px;
  background: linear-gradient(180deg, var(--paper) 0%, #f8f7f2 100%);
}

.contracts-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
}

.contracts-header .section-heading {
  min-width: 0;
  margin: 0;
}

.contracts-bounty-intro {
  max-width: 1040px;
  margin: 20px 0 0;
  padding: 15px 18px 16px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.38);
  border-top: 1px solid var(--rule-strong);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule-strong);
  border-left: 3px solid var(--accent);
  font-family: var(--serif);
  font-size: 0.94rem;
  line-height: 1.6;
}

.contracts-auth-session {
  margin: 10px 0 -8px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
}

.contracts-auth-session a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(163, 31, 52, 0.32);
  text-underline-offset: 3px;
}

.contracts-auth-session a:hover {
  text-decoration-color: currentColor;
}

.contracts-field-node.is-live-contract {
  box-shadow:
    0 0 0 4px rgba(163, 31, 52, 0.08),
    0 8px 20px rgba(67, 23, 29, 0.1);
}

.contract-live-meta {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.62rem;
}

.contract-live-status {
  padding: 4px 7px;
  border: 1px solid rgba(163, 31, 52, 0.34);
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contract-claimed-count {
  color: var(--muted);
}

.contract-holder-tools {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--rule);
}

.contract-holder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contract-release {
  display: grid;
  justify-items: start;
  gap: 7px;
  margin-top: 13px;
}

.contract-release-trigger,
.contract-release-choice {
  appearance: none;
  min-height: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-family: var(--mono);
  font-size: 0.58rem;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 3px;
  cursor: pointer;
}

.contract-release-trigger:hover,
.contract-release-trigger:focus-visible,
.contract-release-choice:hover,
.contract-release-choice:focus-visible,
.contract-release-choice.is-danger {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.contract-release-trigger:focus-visible,
.contract-release-choice:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.contract-release-confirm:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
}

.contract-release-confirm p {
  flex-basis: 100%;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.69rem;
  line-height: 1.45;
}

.contract-release-choice:disabled {
  color: var(--muted);
  cursor: wait;
  opacity: 0.65;
}

.contract-release-status:empty {
  min-height: 0;
}

.contract-holder-action,
.contract-secondary-action,
.contract-artifact-remove,
.contract-holder-submit {
  min-height: 34px;
  padding: 6px 10px;
  color: var(--accent);
  background: transparent;
  border: 1px solid rgba(163, 31, 52, 0.38);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.62rem;
  cursor: pointer;
}

.contract-holder-action:hover,
.contract-secondary-action:hover,
.contract-artifact-remove:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.contract-holder-action:disabled,
.contract-secondary-action:disabled,
.contract-holder-submit:disabled {
  color: var(--muted);
  background: var(--surface);
  border-color: var(--rule);
  cursor: wait;
}

.contract-holder-panel {
  margin-top: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--rule);
}

.contract-result-form,
.contract-token-output {
  display: grid;
  gap: 11px;
}

.contract-form-field {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.contract-form-field textarea,
.contract-form-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 10px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.75rem;
  line-height: 1.45;
}

.contract-form-field textarea {
  min-height: 88px;
  resize: vertical;
}

.contract-form-field textarea:focus,
.contract-form-field input:focus {
  border-color: var(--accent);
  outline: 1px solid var(--accent);
  outline-offset: 1px;
}

.contract-character-count {
  justify-self: end;
  color: var(--muted);
  font-size: 0.56rem;
}

.contract-artifacts {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.contract-artifacts legend {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.contract-artifacts legend span {
  color: var(--muted);
}

.contract-artifact-list {
  display: grid;
  gap: 8px;
}

.contract-artifact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 7px;
}

.contract-artifact-remove {
  min-height: 35px;
  color: var(--muted);
  border-color: var(--rule-strong);
}

.contract-secondary-action {
  width: fit-content;
  margin-top: 8px;
}

.contract-holder-submit {
  width: fit-content;
  min-height: 38px;
  padding-inline: 14px;
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.contract-holder-submit:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.contract-request-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.61rem;
  line-height: 1.4;
}

.contract-request-status[data-state='success'] {
  color: #2f6247;
}

.contract-request-status[data-state='error'] {
  color: var(--accent);
}

.contract-request-status a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contract-submission-history {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}

.contract-submission-history h4 {
  margin: 0 0 7px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
}

.contract-submission-history > p {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.72rem;
}

.contract-submission-history ol {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  list-style: none;
}

.contract-submission-history li {
  padding: 7px 0;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.58rem;
}

.contract-submission-history li:first-child {
  border-top: 0;
}

.contract-submission-history li p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 0.7rem;
  line-height: 1.35;
}

.contract-token-output {
  margin-top: 10px;
}

.contract-token-warning {
  margin: 0;
  padding: 9px 10px;
  color: var(--accent);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  font-family: var(--mono);
  font-size: 0.61rem;
  line-height: 1.45;
}

.contract-token-output textarea {
  word-break: break-all;
}

button.contract-claim-action {
  font-family: inherit;
  cursor: pointer;
}

.contract-claim-action.is-complete,
.contract-claim-action.is-taken,
.contract-claim-action:disabled {
  color: var(--ink-soft);
  background: var(--surface);
  border-color: var(--rule-strong);
  cursor: default;
}

#research-contracts .contract-claim-action.is-complete:hover,
#research-contracts .contract-claim-action.is-taken:hover,
#research-contracts button.contract-claim-action:disabled:hover {
  color: var(--ink-soft);
  background: var(--surface);
  border-color: var(--rule-strong);
}

.contracts-registry-link {
  min-height: 34px;
  padding: 5px 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  border-bottom: 1px solid var(--rule-strong);
  font-family: var(--mono);
  font-size: 0.65rem;
  transition: color 140ms ease, border-color 140ms ease;
}

.contracts-registry-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contracts-registry-link img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.contracts-field-layout {
  min-height: 510px;
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, 0.88fr);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}

.contracts-field {
  position: relative;
  min-width: 0;
  min-height: 510px;
  overflow: hidden;
  border-right: 1px solid var(--rule-strong);
}

#contracts-field-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.contracts-field-node {
  position: absolute;
  z-index: 5;
  top: var(--field-y);
  left: var(--field-x);
  width: 142px;
  height: 142px;
  min-height: 142px;
  padding: 17px 13px 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  color: var(--ink);
  background: rgba(251, 250, 246, 0.96);
  border: 1px solid rgba(23, 25, 28, 0.34);
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(251, 250, 246, 0.74);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.contracts-field-node::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  width: 11px;
  height: 9px;
  background: var(--paper);
  border-right: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
  transform: translateX(-50%);
}

.contracts-field:not(.is-keyboard-nav) .contracts-field-node:hover,
.contracts-field-node[aria-pressed='true'] {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translate(-50%, -50%) scale(1.045);
}

.contracts-field-node > span,
.contracts-field-node > strong {
  position: relative;
  z-index: 1;
  display: block;
}

.contracts-field-node-head {
  display: flex !important;
  justify-content: center;
  gap: 7px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.48rem;
  letter-spacing: 0.035em;
  line-height: 1;
}

.contracts-field-node-head span + span::before {
  content: '·';
  margin-right: 7px;
  color: var(--rule-strong);
}

.contracts-field-node-title {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 0.79rem;
  font-weight: 600;
  line-height: 1.08;
}

.contracts-field-node-reward {
  margin-top: 9px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1;
}

.contracts-field-node-terms {
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.48rem;
  line-height: 1;
}

.contracts-field-node[aria-pressed='true'] .contracts-field-node-head,
.contracts-field-node[aria-pressed='true'] .contracts-field-node-reward,
.contracts-field:not(.is-keyboard-nav) .contracts-field-node:hover .contracts-field-node-head,
.contracts-field:not(.is-keyboard-nav) .contracts-field-node:hover .contracts-field-node-reward {
  color: var(--accent);
}

.contracts-vvuq-hub {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: 128px;
  height: 128px;
  padding: 17px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: rgba(251, 250, 246, 0.97);
  border: 1px solid var(--accent);
  border-radius: 50%;
  box-shadow:
    0 0 0 8px rgba(251, 250, 246, 0.82),
    inset 0 0 0 7px var(--paper),
    inset 0 0 0 8px rgba(163, 31, 52, 0.28);
  transform: translate(-50%, -50%);
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.contracts-vvuq-hub:hover {
  color: var(--accent);
  background: var(--accent-soft);
  transform: translate(-50%, -50%) scale(1.025);
}

.vvuq-lock {
  position: relative;
  width: 24px;
  height: 20px;
  margin: 11px 0 7px;
  display: block;
  background: var(--accent);
  border-radius: 2px;
}

.vvuq-lock::before {
  content: '';
  position: absolute;
  left: 4px;
  top: -12px;
  width: 16px;
  height: 14px;
  border: 2px solid var(--accent);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.vvuq-lock::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 6px;
  width: 4px;
  height: 8px;
  background: var(--paper);
  border-radius: 50% 50% 1px 1px;
  transform: translateX(-50%);
}

.vvuq-wordmark {
  font-family: var(--display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
}

.vvuq-wordmark span {
  color: var(--accent);
}

.vvuq-model-label {
  font-family: var(--mono);
  text-transform: uppercase;
}

.vvuq-model-label {
  margin-top: 5px;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
}

.contract-dossier {
  min-width: 0;
  padding: clamp(24px, 2.5vw, 34px);
  background: rgba(255, 255, 255, 0.44);
}

.contract-record {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.contract-record[hidden] {
  display: none;
}

.contract-record-number {
  margin-top: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.contract-record h3 {
  margin: 10px 0 9px;
  font-family: var(--display);
  font-size: clamp(1.85rem, 2.35vw, 2.7rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.contract-record-question {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 0.96rem;
  font-style: italic;
  line-height: 1.5;
}

.contract-record-gate {
  margin-top: 18px;
  padding: 12px 0 13px;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
}

.contract-record-gate > span,
.contract-record-tabs button {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.contract-record-gate p,
.contract-record-panels p {
  margin: 7px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.8rem;
  line-height: 1.5;
}

.contract-record-tabs {
  margin-top: 10px;
  display: flex;
  gap: 16px;
}

.contract-record-tabs button {
  min-height: 32px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  cursor: pointer;
}

.contract-record-tabs button[aria-selected='true'] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.contract-record-panels {
  min-height: 5.9em;
}

.contract-record-panels p:focus-visible {
  outline-offset: 2px;
}

.contract-claim-action {
  width: fit-content;
  min-width: 112px;
  min-height: 44px;
  margin-top: 14px;
  padding: 9px 20px;
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 140ms ease, border-color 140ms ease;
}

.contract-claim-action:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.contract-terms-link {
  width: fit-content;
  margin-top: 14px;
  align-self: flex-start;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 140ms ease, border-color 140ms ease;
}

.contract-terms-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.contract-terms-link + .contract-claim-action {
  margin-top: 10px;
}

.section {
  padding-top: clamp(64px, 6vw, 92px);
  padding-bottom: clamp(64px, 6vw, 92px);
}

.research-section {
  padding: 42px 28px 48px;
}

.section-note {
  max-width: 1060px;
  margin: 14px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.78rem;
  font-style: italic;
  line-height: 1.55;
}

.figure-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.figure-pair .figure-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.figure-pair .figure-card figcaption {
  flex: 1;
}

.figure-card figcaption strong {
  color: var(--ink);
  font-weight: 600;
}

.paper-figure-frame {
  min-width: 0;
}

.figure-card .paper-figure-frame > img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

.figure-stack {
  display: grid;
  gap: clamp(30px, 4vw, 48px);
}

.figure-stack .figure-card {
  width: min(100%, 1080px);
  margin: 0 auto;
}

.figure-stack .figure-card:first-child {
  width: min(100%, 890px);
}

.dataset-curriculum-figure {
  width: min(100%, 1080px);
  margin: 0 auto 22px;
}

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

.release-card {
  min-width: 0;
  padding: clamp(20px, 2.5vw, 30px);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.release-card:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(23, 25, 28, 0.07);
  transform: translateY(-2px);
}

.release-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
}

.release-kicker img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.release-card h3 {
  margin: 12px 0 8px;
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.8vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.release-card h3 small {
  color: var(--faint);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.release-card p {
  max-width: 64ch;
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.84rem;
  line-height: 1.55;
}

.release-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 20px 0 16px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.release-stats > div {
  min-width: 0;
  padding: 11px 12px 12px 0;
}

.release-stats > div + div {
  padding-left: 12px;
  border-left: 1px solid var(--rule);
}

.release-stats dt {
  color: var(--faint);
  font-size: 0.6rem;
  font-weight: 650;
  letter-spacing: 0.045em;
  line-height: 1.2;
  text-transform: uppercase;
}

.release-stats dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1.2vw, 0.88rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.release-cta {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 650;
}

.training-figure {
  width: min(100%, 1080px);
  margin: 26px auto 0;
}

.research-copy {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 0.92rem;
  line-height: 1.62;
}

.research-copy p {
  margin: 0 0 0.9em;
}

.research-copy p:last-child {
  margin-bottom: 0;
}

.retarget-diagonal {
  display: grid;
  grid-template-columns: minmax(270px, 0.72fr) minmax(0, 1.28fr);
  grid-template-areas:
    'copy-a figure-a'
    'figure-b copy-b';
  gap: 24px clamp(36px, 5vw, 72px);
  align-items: center;
}

.retarget-copy-a {
  grid-area: copy-a;
}

.retarget-figure-a {
  grid-area: figure-a;
}

.retarget-copy-b {
  grid-area: copy-b;
}

.retarget-figure-b {
  grid-area: figure-b;
  width: min(100%, 540px);
  justify-self: end;
}

.citation-section {
  padding-top: 38px;
  padding-bottom: 38px;
}

.citation-disclosure {
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}

.citation-heading {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
}

.citation-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.citation-heading button {
  padding: 8px 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 0.75rem;
  cursor: pointer;
}

.citation-disclosure .bibtex-container {
  max-width: 900px;
  margin: 0 0 22px;
}

#bibtex-copy {
  letter-spacing: 0.01em;
  text-transform: none;
}

.site-footer-inner {
  grid-template-columns: auto minmax(200px, 1fr);
}

.site-footer-inner > p {
  text-align: right;
}

@media (max-width: 1100px) {
  .hero-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-summary {
    max-width: 650px;
  }

  .hero-method-film {
    width: 100%;
  }

}

@media (max-width: 960px) {
  .contracts-field-layout {
    grid-template-columns: 1fr;
  }

  .contracts-field {
    min-height: 480px;
    border-right: 0;
    border-bottom: 1px solid var(--rule-strong);
  }

  .contract-dossier {
    min-height: 0;
  }

  .contract-record-number {
    margin-top: 0;
  }

}

@media (max-width: 900px) {
  .benchmark-section,
  .section.research-contracts-section,
  .research-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .retarget-diagonal {
    grid-template-columns: 1fr;
    grid-template-areas:
      'copy-a'
      'figure-a'
      'copy-b'
      'figure-b';
    gap: 18px;
  }

  .retarget-copy-a,
  .retarget-copy-b {
    max-width: 730px;
  }

  .retarget-copy-b {
    margin-top: 12px;
  }

  .retarget-figure-b {
    width: min(100%, 620px);
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .figure-pair,
  .release-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .hero-inner {
    gap: 28px;
    padding-top: 32px;
    padding-bottom: 24px;
  }

  .hero-copy h1 {
    font-size: clamp(3rem, 14vw, 4rem);
  }

  .secondary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
  }

  .resource-link {
    justify-content: flex-start;
  }

  .hero-method-film {
    box-shadow: 0 12px 30px rgba(23, 25, 28, 0.1);
  }

  .benchmark-header {
    gap: 14px;
  }

  .benchmark-section,
  .section.research-contracts-section,
  .research-section {
    padding: 34px 16px 40px;
  }

  .contracts-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 16px;
  }

  .contracts-registry-link {
    align-self: end;
  }

  .contracts-bounty-intro {
    margin-top: 16px;
    padding: 13px 14px 14px;
    font-size: 0.86rem;
  }

  .contracts-field-layout {
    margin-top: 16px;
  }

  .contracts-field {
    min-height: 420px;
  }

  .contracts-field-node {
    width: 118px;
    height: 118px;
    min-height: 118px;
    padding: 13px 9px 11px;
  }

  .contracts-field-node:nth-child(1),
  .contracts-field-node:nth-child(3) {
    left: 21%;
  }

  .contracts-field-node:nth-child(2),
  .contracts-field-node:nth-child(4) {
    left: 79%;
  }

  .contracts-field-node:nth-child(1),
  .contracts-field-node:nth-child(2) {
    top: 76%;
  }

  .contracts-field-node:nth-child(3),
  .contracts-field-node:nth-child(4) {
    top: 24%;
  }

  .contracts-field-node-head {
    gap: 5px;
    font-size: 0.42rem;
  }

  .contracts-field-node-head span + span::before {
    margin-right: 5px;
  }

  .contracts-field-node-title {
    margin-top: 6px;
    font-size: 0.69rem;
  }

  .contracts-field-node-reward {
    margin-top: 7px;
    font-size: 0.54rem;
  }

  .contracts-field-node-terms {
    margin-top: 5px;
    font-size: 0.41rem;
  }

  .contracts-vvuq-hub {
    width: 104px;
    height: 104px;
    padding: 14px 9px 10px;
    box-shadow:
      0 0 0 6px rgba(251, 250, 246, 0.82),
      inset 0 0 0 5px var(--paper),
      inset 0 0 0 6px rgba(163, 31, 52, 0.28);
  }

  .vvuq-lock {
    width: 23px;
    height: 19px;
    margin: 11px 0 6px;
  }

  .vvuq-lock::before {
    left: 4px;
    top: -11px;
    width: 15px;
    height: 13px;
  }

  .vvuq-lock::after {
    top: 5px;
    height: 7px;
  }

  .vvuq-wordmark {
    font-size: 0.84rem;
  }

  .vvuq-model-label {
    margin-top: 3px;
    font-size: 0.45rem;
  }

  .contract-dossier {
    padding: 24px 18px 20px;
  }

  .contract-record h3 {
    font-size: 2.4rem;
  }

  .section-heading {
    margin-bottom: 16px;
  }

  .section-heading h2 {
    font-size: 2.25rem;
  }

  .section-heading p {
    font-size: 0.82rem;
  }

  .citation-heading {
    min-height: 58px;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
  }

  .site-footer-inner > p {
    text-align: left;
  }
}

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

@media print {
  .site-header,
  .publication-actions,
  #bibtex-copy {
    display: none !important;
  }

  .hero {
    background: #fff;
  }

  .chapter {
    content-visibility: visible;
  }

  .contracts-registry-link,
  .contract-claim-action,
  .hero-method-film-control,
  .hero-method-film-timeline {
    display: none !important;
  }

  .contracts-field-layout {
    display: block;
    border: 0;
  }

  .contracts-field {
    display: none;
  }

  .contract-dossier {
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .contract-record,
  .contract-record[hidden] {
    min-height: 0;
    padding-top: 18px;
    display: flex;
    border-top: 1px solid var(--rule-strong);
    break-inside: avoid;
  }

  .contract-record-number {
    margin-top: 0;
  }

  .contract-record-panels p[hidden] {
    display: block;
  }

}
