:root {
  --ink: #10273b;
  --ink-soft: #345066;
  --paper: #f2f7fa;
  --white: #ffffff;
  --mist: #dce9ef;
  --cobalt: #2252cc;
  --mineral: #3e8fa3;
  --coral: #c84e3a;
  --line: rgba(16, 39, 59, 0.17);
  --display: "STIX Two Text", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --page: min(1240px, calc(100vw - 48px));
  --shadow: 0 22px 60px rgba(16, 39, 59, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  background:
    linear-gradient(rgba(16, 39, 59, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 39, 59, 0.026) 1px, transparent 1px),
    var(--paper);
  background-size: 40px 40px;
}

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

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

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

button {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--cobalt);
  transform: translateY(-180%);
  transition: transform 150ms ease;
}

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

.site-header {
  position: relative;
  z-index: 20;
  width: var(--page);
  min-height: 112px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.site-header--compact {
  min-height: 88px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: -0.06em;
}

.wordmark-text {
  max-width: 158px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.04;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav a {
  padding: 12px 2px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  border-color: currentColor;
}

.nav-toggle {
  display: none;
  min-width: 48px;
  min-height: 48px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}

.hero,
.papers-section,
.status-section,
.provenance-section,
.paper-record,
.not-found {
  width: var(--page);
  margin-inline: auto;
}

.hero {
  min-height: 650px;
  padding: 88px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  gap: 7vw;
  align-items: end;
}

.hero-copy {
  min-width: 0;
  max-width: 850px;
}

.overline {
  margin: 0 0 18px;
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.hero h1 {
  max-width: 900px;
  margin-bottom: 34px;
  font-size: clamp(4rem, 9.2vw, 8.6rem);
}

.hero h1 em {
  position: relative;
  color: var(--cobalt);
  font-weight: 400;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0.09em;
  left: 0;
  height: 0.08em;
  background: var(--coral);
  transform: rotate(-1.5deg);
}

.hero-lede {
  max-width: 720px;
  margin-bottom: 36px;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 1.8vw, 1.4rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 50px;
  padding: 13px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.button--primary {
  color: var(--white);
  background: var(--cobalt);
  border: 1px solid var(--cobalt);
}

.button--primary:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.button--quiet {
  border: 1px solid var(--line);
}

.button--quiet:hover {
  border-color: var(--ink);
}

.scope-note {
  max-width: 340px;
  padding: 24px 0 0 24px;
  border-top: 3px solid var(--coral);
  border-left: 1px solid var(--line);
}

.scope-note-label {
  display: block;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scope-note p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.trace-section {
  padding: 0 0 110px;
}

.trace {
  width: min(1380px, calc(100vw - 24px));
  margin-inline: auto;
  padding: 34px max(36px, calc((100vw - var(--page)) / 2));
  color: var(--white);
  background: var(--ink);
  box-shadow: var(--shadow);
}

.trace-copy {
  max-width: 630px;
  display: flex;
  gap: 40px;
  align-items: baseline;
}

.trace-copy .overline {
  flex: 0 0 auto;
  color: #78d1de;
}

.trace-copy p:last-child {
  color: #d2e0e8;
  font-size: 13px;
}

.trace-canvas {
  position: relative;
  height: 240px;
  margin-top: 28px;
}

.trace-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.trace-line {
  fill: none;
  stroke-linecap: round;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.trace-line--shared {
  stroke: #78d1de;
}

.trace-line--branch {
  stroke: #f18069;
}

.js .trace-line {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: trace-draw 1.45s cubic-bezier(0.65, 0, 0.35, 1) 180ms forwards;
}

@keyframes trace-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.trace-nodes {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trace-node {
  position: absolute;
  z-index: 2;
  width: 134px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper);
  border-left: 4px solid #78d1de;
  transform: translate(-50%, -50%);
}

.trace-node span,
.trace-node small {
  display: block;
}

.trace-node span {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
}

.trace-node small {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trace-node--context {
  top: 50%;
  left: 5%;
}

.trace-node--condensed {
  top: 50%;
  left: 30%;
}

.trace-node--representation {
  top: 50%;
  left: 55.5%;
}

.trace-node--geometry,
.trace-node--quantum,
.trace-node--kinetic {
  right: 0;
  border-color: var(--coral);
  transform: translate(0, -50%);
}

.trace-node--geometry {
  top: 15%;
}

.trace-node--quantum {
  top: 50%;
}

.trace-node--kinetic {
  top: 85%;
}

.papers-section {
  padding: 30px 0 130px;
}

.section-heading {
  margin-bottom: 52px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.45fr);
  gap: 10vw;
  align-items: end;
}

.section-heading h2 {
  max-width: 720px;
  margin-bottom: 0;
  font-size: clamp(2.8rem, 5vw, 5.4rem);
}

.section-heading > p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.paper-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  align-items: start;
}

.paper-card {
  grid-column: span 6;
  min-height: 0;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}

.paper-card[data-paper-slug="synthesis"] {
  grid-column: span 12;
  min-height: 0;
  color: var(--white);
  background: var(--cobalt);
}

.paper-card-link {
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  grid-template-areas:
    "index index"
    "body cover"
    "action action";
  column-gap: 24px;
  text-decoration: none;
}

.paper-card:not(.paper-card--cover) .paper-card-link {
  grid-template-columns: 1fr;
  grid-template-areas:
    "index"
    "body"
    "action";
}

.paper-card:hover {
  border-color: var(--cobalt);
  box-shadow: 0 18px 42px rgba(16, 39, 59, 0.08);
  transform: translateY(-3px);
}

.paper-card {
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.paper-card-index {
  grid-area: index;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.paper-card-cover {
  grid-area: cover;
  align-self: start;
  justify-self: end;
  width: 96px;
  height: auto;
  aspect-ratio: 2550 / 3300;
  margin: 24px 0 0;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(16, 39, 59, 0.18);
  transform: rotate(2deg);
}

.paper-card-body {
  grid-area: body;
  min-width: 0;
  padding-top: 28px;
}

.paper-card h3 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 2.9vw, 3.1rem);
}

.paper-card p {
  max-width: 580px;
  color: var(--ink-soft);
}

.paper-card[data-paper-slug="synthesis"] p {
  color: #dfe7ff;
}

.artifact-state {
  display: inline-block;
  margin-top: 10px;
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.paper-card[data-paper-slug="synthesis"] .artifact-state {
  color: #fff2b6;
}

.paper-card-action {
  grid-area: action;
  margin-top: 24px;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid currentColor;
  font-size: 13px;
  font-weight: 700;
}

.paper-card-action svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.status-section {
  width: 100%;
  padding: 110px max(24px, calc((100vw - min(1240px, calc(100vw - 48px))) / 2));
  color: var(--white);
  background: var(--ink);
}

.section-heading--light .overline {
  color: #78d1de;
}

.section-heading--light > p {
  color: #c7d6de;
}

.status-list {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.16);
  list-style: none;
}

.status-list li {
  min-height: 260px;
  padding: 24px;
  background: var(--ink);
}

.status-list p {
  margin: 32px 0 0;
  color: #c7d6de;
  font-size: 13px;
}

.status-chip {
  display: inline-block;
  padding: 6px 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--white);
  color: var(--ink);
}

.status-chip--proved {
  background: #78d1de;
}

.status-chip--conditional {
  background: #fff2b6;
}

.status-chip--computational {
  background: #bbc8ff;
}

.status-chip--obstructed {
  color: var(--white);
  background: var(--coral);
}

.status-chip--open {
  background: #dde6eb;
}

.provenance-section {
  padding: 130px 0;
  display: grid;
  grid-template-columns: minmax(240px, 0.38fr) 1fr;
  gap: 9vw;
}

.provenance-section h2 {
  font-size: clamp(2.7rem, 5vw, 5rem);
}

.provenance-grid {
  border-top: 1px solid var(--ink);
}

.provenance-grid a {
  min-height: 116px;
  padding: 22px 0;
  display: grid;
  grid-template-columns: 110px 1fr 24px;
  gap: 18px;
  align-items: center;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.provenance-grid a:hover strong {
  color: var(--cobalt);
}

.provenance-grid span {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.provenance-grid strong {
  font-family: var(--display);
  font-size: 23px;
  line-height: 1.15;
}

.provenance-grid svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.site-footer {
  width: var(--page);
  min-height: 180px;
  margin-inline: auto;
  padding: 42px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  border-top: 1px solid var(--line);
}

.wordmark--footer .wordmark-text {
  max-width: none;
}

.site-footer p {
  max-width: 480px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.paper-record {
  padding: 88px 0 110px;
}

.paper-hero {
  max-width: 1050px;
}

.paper-hero-meta {
  margin-bottom: 78px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.paper-hero-meta a {
  color: var(--cobalt);
}

.paper-hero-meta span::before {
  content: "/";
  margin-right: 12px;
  color: var(--ink-soft);
}

.paper-hero h1 {
  margin-bottom: 34px;
  font-size: clamp(3.25rem, 5.4vw, 5.5rem);
  line-height: 1;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.paper-abstract {
  max-width: 800px;
  color: var(--ink-soft);
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
}

.paper-scope {
  max-width: 850px;
  margin-top: 60px;
  padding: 22px 0;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 28px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.paper-scope span {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.paper-scope p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.artifact-section {
  margin-top: 130px;
}

.artifact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.artifact-grid--pending {
  margin-top: 14px;
}

.artifact-link {
  min-height: 112px;
  padding: 22px;
  display: flex;
  gap: 18px;
  align-items: center;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  text-decoration: none;
}

.artifact-link:hover {
  border-color: var(--cobalt);
}

.artifact-link > svg {
  width: 26px;
  flex: 0 0 26px;
  fill: none;
  stroke: var(--cobalt);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.artifact-link strong,
.artifact-link small {
  display: block;
}

.artifact-link strong {
  font-family: var(--display);
  font-size: 20px;
}

.artifact-link small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.artifact-footnote {
  color: var(--ink-soft);
  font-size: 13px;
}

.pending-panel {
  max-width: 760px;
  padding: 32px;
  color: var(--white);
  background: var(--cobalt);
}

.pending-panel strong {
  font-family: var(--display);
  font-size: 28px;
}

.pending-panel p {
  margin: 14px 0 0;
  color: #dfe7ff;
}

.equation-section {
  margin-top: 110px;
  padding: 70px 6vw;
  text-align: center;
  color: var(--white);
  background: var(--ink);
}

.equation-section .overline {
  color: #78d1de;
}

.equation {
  margin: 30px 0;
  padding-bottom: 8px;
  max-width: 100%;
  overflow-x: auto;
  overflow-wrap: anywhere;
  font-family: var(--display);
  font-size: clamp(1.35rem, 4vw, 3rem);
}

.equation-section > p:last-child {
  max-width: 680px;
  margin: 0 auto;
  color: #c7d6de;
  font-size: 13px;
}

.math-rendered {
  display: none;
}

.math-ready .math-fallback {
  display: none;
}

.math-ready .math-rendered {
  display: inline;
}

.paper-pagination {
  margin-top: 90px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}

.paper-pagination > a {
  min-height: 140px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--paper);
  text-decoration: none;
}

.paper-pagination > a:hover {
  color: var(--cobalt);
}

.paper-pagination span {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.paper-pagination strong {
  max-width: 440px;
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.2;
}

.paper-pagination-next {
  text-align: right;
  align-items: flex-end;
}

.not-found {
  min-height: 620px;
  padding: 110px 0;
}

.not-found h1 {
  max-width: 900px;
  margin-bottom: 34px;
  font-size: clamp(3.8rem, 8vw, 8rem);
}

@media (max-width: 980px) {
  :root {
    --page: min(100% - 36px, 860px);
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 72px;
  }

  .scope-note {
    max-width: 560px;
  }

  .trace-canvas {
    height: 520px;
  }

  .trace-lines {
    display: none;
  }

  .trace-nodes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .trace-node,
  .trace-node--geometry,
  .trace-node--quantum,
  .trace-node--kinetic {
    position: static;
    width: auto;
    min-height: 84px;
    transform: none;
  }

  .trace-node::after {
    content: "";
    display: block;
    width: 32px;
    height: 2px;
    margin-top: 10px;
    background: #78d1de;
  }

  .trace-node--geometry::after,
  .trace-node--quantum::after,
  .trace-node--kinetic::after {
    background: var(--coral);
  }

  .paper-card {
    grid-column: span 6;
  }

  .paper-card[data-paper-slug="synthesis"] {
    grid-column: span 12;
  }

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

  .status-list li:last-child {
    grid-column: span 2;
  }

  .provenance-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  :root {
    --page: calc(100% - 28px);
  }

  body {
    background-size: 28px 28px;
  }

  .site-header {
    min-height: 84px;
  }

  .site-header--compact {
    min-height: 76px;
  }

  .wordmark-text {
    display: none;
  }

  .wordmark-mark {
    width: 42px;
    height: 42px;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .site-nav {
    position: absolute;
    top: 70px;
    right: 0;
    left: 0;
    padding: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    color: var(--white);
    background: var(--ink);
    box-shadow: var(--shadow);
  }

  .site-nav a {
    min-height: 48px;
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .nav-open .site-nav {
    display: flex;
  }

  .hero {
    padding: 56px 0 72px;
    gap: 52px;
  }

  .hero h1 {
    margin-bottom: 26px;
    font-size: clamp(2.8rem, 14.5vw, 4.5rem);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .scope-note {
    padding-left: 18px;
  }

  .trace-section {
    padding-bottom: 76px;
  }

  .trace {
    width: calc(100% - 12px);
    padding: 28px 20px;
  }

  .trace-copy {
    display: block;
  }

  .trace-canvas {
    height: auto;
  }

  .trace-nodes {
    position: static;
    grid-template-columns: 1fr;
  }

  .section-heading {
    margin-bottom: 34px;
    grid-template-columns: 1fr;
    gap: 22px;
  }

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

  .papers-section {
    padding-bottom: 84px;
  }

  .paper-card {
    grid-column: span 12;
  }

  .paper-card h3 {
    font-size: 2.5rem;
  }

  .paper-card-cover {
    width: 80px;
  }

  .status-section {
    padding-block: 78px;
  }

  .status-list {
    grid-template-columns: 1fr;
  }

  .status-list li,
  .status-list li:last-child {
    min-height: 180px;
    grid-column: auto;
  }

  .provenance-section {
    padding: 88px 0;
  }

  .provenance-grid a {
    grid-template-columns: 1fr 22px;
  }

  .provenance-grid span {
    grid-column: 1 / -1;
  }

  .site-footer {
    min-height: 220px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }

  .wordmark--footer .wordmark-text {
    display: block;
  }

  .paper-record {
    padding: 58px 0 78px;
  }

  .paper-hero-meta {
    margin-bottom: 54px;
  }

  .paper-hero h1 {
    font-size: clamp(2.5rem, 12vw, 3.2rem);
  }

  .paper-scope {
    margin-top: 40px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .artifact-section {
    margin-top: 84px;
  }

  .artifact-grid,
  .paper-pagination {
    grid-template-columns: 1fr;
  }

  .equation-section {
    margin-top: 74px;
    padding: 50px 18px;
  }

}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .paper-pagination {
    display: none;
  }

  body {
    background: white;
  }

  .hero,
  .paper-record {
    width: 100%;
    padding: 24px;
  }
}
