:root {
  color-scheme: light;
  --ink: #14171a;
  --ink-soft: #30363b;
  --muted: #66717a;
  --paper: #f3f5f6;
  --surface: #ffffff;
  --line: #d9e0e4;
  --charcoal: #101316;
  --lime: #c7f45a;
  --teal: #0a9da3;
  --coral: #d7644f;
  --violet: #615bd7;
  --amber: #e9b534;
  --shadow: 0 24px 64px rgba(16, 19, 22, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  letter-spacing: 0;
}

body.modal-open {
  overflow: hidden;
}

body,
button,
select {
  font: inherit;
}

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

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

button,
select {
  cursor: pointer;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 66px;
  padding: 12px 48px;
  color: #ffffff;
  background: rgba(15, 18, 21, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 860;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.lamp-logo {
  border-radius: 7px;
  object-fit: cover;
}

.psibot-logo {
  width: 86px;
  height: 32px;
  object-fit: cover;
  object-position: center;
}

.rlinf-logo {
  width: 78px;
  height: 30px;
  border-radius: 5px;
  object-fit: contain;
}

.brand span {
  margin-left: 2px;
}

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 26px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.95rem;
  font-weight: 780;
}

nav a {
  padding: 8px 0;
}

nav a:hover,
nav a:focus-visible {
  color: var(--lime);
}

.hero {
  position: relative;
  min-height: 88svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #ffffff;
  background: var(--charcoal);
}

.task-mosaic,
.hero-shade {
  position: absolute;
  inset: 0;
}

.task-mosaic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: #050708;
}

.task-mosaic video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.08);
}

.hero-shade {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(5, 7, 8, 0.92) 0%, rgba(5, 7, 8, 0.72) 43%, rgba(5, 7, 8, 0.18) 100%),
    linear-gradient(0deg, rgba(5, 7, 8, 0.84) 0%, rgba(5, 7, 8, 0.08) 55%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(930px, calc(100% - 96px));
  margin: 0 0 132px 56px;
  padding-top: 120px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  font-size: 0.92rem;
  line-height: 1.25;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--lime);
}

.section-kicker {
  color: var(--teal);
}

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

h1 {
  margin-bottom: 14px;
  font-size: 7.4rem;
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 2.4rem;
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.28rem;
  line-height: 1.24;
  letter-spacing: 0;
}

h4 {
  margin-bottom: 6px;
  font-size: 1.02rem;
  line-height: 1.22;
  letter-spacing: 0;
}

.subtitle {
  width: min(790px, 100%);
  margin-bottom: 18px;
  font-size: 1.84rem;
  line-height: 1.15;
  font-weight: 780;
}

.summary {
  width: min(690px, 100%);
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.02rem;
}

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

.button,
.filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
}

.filter {
  border-radius: 7px;
}

.button {
  gap: 10px;
  min-height: 46px;
  padding: 10px 18px;
  color: #111315;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease;
}

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

.button[aria-disabled="true"] {
  cursor: default;
}

.resource-button {
  min-width: 128px;
}

.arxiv-button {
  padding-block: 6px;
  background: #6f1024;
  border-color: rgba(255, 255, 255, 0.34);
}

.arxiv-button:hover,
.arxiv-button:focus-visible {
  background: #8d1730;
  border-color: rgba(255, 255, 255, 0.5);
}

.code-button {
  color: #ffffff;
  background: var(--teal);
  border-color: rgba(255, 255, 255, 0.34);
}

.code-button:hover,
.code-button:focus-visible {
  background: #087f85;
  border-color: rgba(255, 255, 255, 0.5);
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.arxiv-logo {
  width: 70px;
  height: auto;
  max-width: none;
}

.github-mark {
  width: 20px;
  height: 20px;
}

section {
  padding: 92px 72px;
  scroll-margin-top: 66px;
}

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

.intro-grid,
.section-heading,
.module-showcase,
.pipeline-showcase,
.pipeline,
.metric-row,
.task-results,
.table-wrap,
.controls,
.video-sections,
.citation pre {
  width: min(1180px, 100%);
  margin-inline: auto;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(420px, 1.14fr);
  gap: 42px;
  align-items: center;
}

.intro-title h2 {
  max-width: 640px;
  font-size: 2.35rem;
  line-height: 1.12;
}

.intro-copy {
  padding-top: 30px;
}

.intro-copy p,
.pipeline-node p,
.video-copy p,
caption {
  color: var(--muted);
}

.intro-copy p {
  max-width: 690px;
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.7;
}

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

.module-showcase {
  display: grid;
  grid-template-columns: minmax(270px, 0.45fr) minmax(420px, 1fr);
  gap: 26px;
  align-items: center;
  margin-top: 44px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(16, 19, 22, 0.08);
}

.module-copy {
  padding: 10px 8px 10px 12px;
}

.module-copy h3 {
  margin-bottom: 14px;
}

.module-copy p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.module-showcase img {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(16, 19, 22, 0.08);
  border-radius: 7px;
}

.pipeline-section {
  background:
    linear-gradient(180deg, #f3f5f6 0%, #edf2f3 100%);
}

.pipeline-showcase {
  margin-bottom: 18px;
}

.pipeline-figure {
  display: grid;
  justify-items: center;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(199, 244, 90, 0.2), rgba(10, 157, 163, 0.12)),
    #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(16, 19, 22, 0.11);
}

.pipeline-figure img {
  width: min(100%, 1080px);
  margin-inline: auto;
  background: #fffdf8;
  border: 1px solid rgba(16, 19, 22, 0.08);
  border-radius: 6px;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.pipeline-node {
  min-height: 210px;
  display: grid;
  align-content: start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(16, 19, 22, 0.08);
}

.pipeline-node span {
  width: fit-content;
  margin-bottom: 28px;
  padding: 5px 8px;
  color: #ffffff;
  background: var(--charcoal);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 920;
}

.pipeline-node.prior span {
  background: var(--teal);
}

.pipeline-node.policy span {
  background: var(--violet);
}

.pipeline-node.rl span {
  color: #111315;
  background: var(--lime);
}

.pipeline-node h3 {
  margin-bottom: 12px;
}

.pipeline-node p {
  margin-bottom: 0;
}

.metric-row,
.task-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-row {
  margin-bottom: 18px;
}

.metric-row article,
.task-results article {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 20px;
  border-radius: 8px;
}

.metric-row article {
  background: var(--paper);
  border: 1px solid var(--line);
}

.metric-row strong {
  font-size: 1.9rem;
  line-height: 1;
}

.metric-row span {
  color: var(--muted);
  font-weight: 740;
}

.task-results {
  margin-bottom: 24px;
}

.task-results article {
  color: #ffffff;
  background: var(--charcoal);
}

.task-results article:nth-child(2) {
  background: var(--teal);
}

.task-results article:nth-child(3) {
  background: var(--coral);
}

.task-results article:nth-child(4) {
  background: var(--violet);
}

.task-results strong {
  font-size: 1.05rem;
}

.task-results span {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 740;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(16, 19, 22, 0.08);
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

caption {
  padding: 18px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-weight: 720;
}

th,
td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

thead th {
  color: var(--ink-soft);
  background: #edf2f3;
  font-size: 0.86rem;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

tbody th {
  width: 250px;
  color: var(--ink);
}

td span {
  display: inline-flex;
  margin: 0 8px 4px 0;
  color: var(--ink-soft);
  font-weight: 760;
}

.highlight-row th,
.highlight-row td {
  background: #f3fbdf;
}

.rollout-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

#video-count {
  min-width: 112px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: center;
  font-weight: 850;
}

.controls {
  display: grid;
  gap: 12px;
  margin-bottom: 30px;
}

.control-row,
.control-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.control-row {
  justify-content: space-between;
}

.filter {
  padding: 8px 12px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
}

.filter:hover,
.filter:focus-visible,
.filter.active {
  color: #ffffff;
  background: var(--charcoal);
  border-color: var(--charcoal);
}

.select-filter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 0 0 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-weight: 760;
  overflow: hidden;
}

.select-filter select {
  min-height: 42px;
  padding: 0 36px 0 12px;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-weight: 820;
}

.video-sections {
  display: grid;
  gap: 42px;
}

.rollout-task {
  display: grid;
  gap: 14px;
}

.rollout-task-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.rollout-task-heading h3 {
  margin-bottom: 0;
}

.rollout-task-heading span {
  color: var(--muted);
  font-weight: 820;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.video-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 14px 38px rgba(16, 19, 22, 0.08);
}

.video-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0f1418;
  border-bottom: 1px solid var(--line);
}

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

.rollout-video:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: -3px;
}

.expand-video {
  width: fit-content;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  color: #111315;
  background: var(--lime);
  border: 0;
  border-radius: 7px;
  font-size: 0.84rem;
  font-weight: 900;
}

.expand-video:hover,
.expand-video:focus-visible {
  background: #ffffff;
}

.video-copy {
  padding: 14px;
}

.video-copy p {
  margin-bottom: 0;
  overflow-wrap: anywhere;
  font-size: 0.84rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  color: #ffffff;
  background: var(--teal);
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 850;
}

.tags span:first-child {
  background: var(--charcoal);
}

.citation pre {
  overflow-x: auto;
  padding: 28px;
  color: #f5f9fb;
  background: var(--charcoal);
  border-left: 7px solid var(--lime);
  border-radius: 8px;
  font-size: 0.9rem;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(7, 9, 11, 0.82);
}

.video-modal[hidden] {
  display: none;
}

.modal-panel {
  width: min(1080px, 100%);
  overflow: hidden;
  color: #ffffff;
  background: #101316;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}

.modal-close {
  position: absolute;
  top: 22px;
  right: 22px;
  min-height: 40px;
  padding: 0 14px;
  color: #111315;
  background: var(--lime);
  border: 0;
  border-radius: 7px;
  font-weight: 900;
}

#modal-video {
  width: 100%;
  max-height: 72vh;
  background: #000000;
}

.modal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}

.modal-meta span {
  color: var(--lime);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.modal-meta h3 {
  margin: 4px 0 0;
}

.modal-meta a {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 7px;
  font-weight: 820;
}

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 72px;
  color: #ffffff;
  background: var(--charcoal);
}

footer span:first-child {
  color: var(--lime);
  font-weight: 900;
}

.load-error {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px;
  color: var(--coral);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 760;
}

@media (max-width: 1180px) {
  .site-header {
    padding-inline: 30px;
  }

  section {
    padding: 78px 32px;
  }

  .hero-copy {
    width: min(820px, calc(100% - 64px));
    margin-left: 32px;
  }

  h1 {
    font-size: 6.1rem;
  }

  h2 {
    font-size: 2.2rem;
  }

  .subtitle {
    font-size: 1.58rem;
  }

  .pipeline {
    grid-template-columns: 1fr;
  }

  .module-showcase,
  .intro-grid {
    grid-template-columns: 1fr;
  }

  .intro-copy {
    padding-top: 0;
  }

  .metric-row,
  .task-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .site-header {
    position: absolute;
    padding-inline: 18px;
  }

  nav {
    display: none;
  }

  .hero {
    min-height: 94svh;
  }

  .task-mosaic {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(0, 1fr));
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(5, 7, 8, 0.9) 0%, rgba(5, 7, 8, 0.68) 100%),
      linear-gradient(0deg, rgba(5, 7, 8, 0.84) 0%, rgba(5, 7, 8, 0.08) 60%);
  }

  .hero-copy {
    width: calc(100% - 36px);
    margin: 0 18px 96px;
    padding-top: 160px;
  }

  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 1.65rem;
  }

  .intro h2 {
    font-size: 1.75rem;
    line-height: 1.16;
  }

  .intro-grid {
    gap: 18px;
  }

  .intro-copy p {
    font-size: 0.96rem;
    line-height: 1.62;
  }

  h3 {
    font-size: 1.16rem;
  }

  .subtitle {
    font-size: 1.16rem;
  }

  .summary {
    font-size: 0.96rem;
  }

  .hero-actions,
  .control-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .select-filter,
  .select-filter select {
    width: 100%;
  }

  section {
    padding: 62px 18px;
  }

  .pipeline-figure {
    padding: 8px;
  }

  .metric-row,
  .task-results,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-node {
    min-height: 0;
    padding: 22px;
  }

  .control-group {
    align-items: stretch;
  }

  .filter {
    flex: 1 1 auto;
  }

  .rollout-heading,
  .rollout-task-heading,
  .modal-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .video-modal {
    padding: 14px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
  }

  footer {
    padding-inline: 18px;
  }
}
