/* Static project page for Multi-Block Diffusion Language Models. */
:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #5f6b7a;
  --line: #d9dee8;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --soft: #e8f5f3;
  --engine: #2563eb;
  --engine-dark: #1d4ed8;
  --engine-soft: #eff6ff;
  --code: #f3f4f6;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open {
  overflow: hidden;
}

.container {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  padding: 56px 0 48px;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.13), transparent 35%),
    linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%);
  border-bottom: 1px solid var(--line);
}

.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

h1 {
  margin: 0;
  max-width: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.subtitle {
  margin: 18px auto 0;
  max-width: 1040px;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
}

.authors {
  margin: 22px 0 0;
  font-weight: 650;
}
.authors sup {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}
.author-link {
  color: var(--engine-dark);
  text-decoration: none;
}
.author-link:hover {
  text-decoration: underline;
}

.affiliations {
  margin-top: 4px;
  color: var(--muted);
}

.author-note {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
  opacity: 0.72;
}
.author-note sup {
  font-size: 0.7rem;
  margin-right: 2px;
}

.hero-links {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}
.hero-links a {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 650;
  transition: color 160ms ease;
}
.hero-links a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}
.hero-links span {
  margin: 0 6px;
  user-select: none;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin-top: 28px;
  max-width: 1120px;
  text-align: left;
}

.hero-metrics div {
  min-height: 124px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.hero-metrics span {
  display: block;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero-metrics strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.25;
}

.hero-metrics p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  font: inherit;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.button.secondary {
  background: white;
  color: var(--accent-dark);
}

.button.engine {
  border-color: var(--engine);
  background: var(--engine);
  color: white;
}

.button.engine.secondary {
  background: white;
  color: var(--engine-dark);
}

.button.engine-engraved {
  border-color: rgba(37, 99, 235, 0.42);
  background: #eff6ff;
  color: var(--engine-dark);
  box-shadow:
    inset 0 2px 5px rgba(37, 99, 235, 0.14),
    inset 0 -1px 0 rgba(255, 255, 255, 0.95);
}

.button.engine-engraved:hover {
  border-color: rgba(37, 99, 235, 0.62);
  background: #dbeafe;
}

.button.paper,
.button.paper:visited {
  border-color: #b91c1c;
  background: white;
  color: #b91c1c;
}

.button.paper:hover {
  border-color: #991b1b;
  background: #fff1f2;
}

.button.hf,
.button.hf:visited {
  border-color: #d97706;
  background: #fffbeb;
  color: #92400e;
}

.button.hf:hover {
  border-color: #b45309;
  background: #fef3c7;
}

.button.disabled {
  border-color: var(--line);
  background: #eef1f5;
  color: #667085;
  cursor: not-allowed;
}

.button.video-action {
  border-color: #111827;
  background: #111827;
  color: white;
}

.button.video-action:hover {
  border-color: #0f172a;
  background: #0f172a;
}

.engine-banner {
  max-width: 1040px;
  margin-top: 28px;
  padding: 20px;
  border: 1px solid rgba(37, 99, 235, 0.32);
  border-left: 6px solid var(--engine);
  border-radius: 18px;
  background: var(--engine-soft);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.12);
  text-align: left;
}

.engine-banner-main {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  justify-content: space-between;
}

.engine-banner-copy {
  min-width: 0;
}

.engine-banner strong {
  display: block;
  color: #172554;
  font-size: 1.08rem;
}

.engine-banner p {
  margin: 6px 0 0;
  color: #334155;
}

.engine-banner-label {
  margin-bottom: 4px;
  color: var(--engine-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.engine-banner-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.engine-banner-actions .button {
  white-space: nowrap;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav .container {
  display: flex;
  flex-wrap: nowrap;
  gap: 18px;
  align-items: center;
  overflow-x: auto;
  padding: 11px 0;
  scrollbar-width: thin;
}

.nav a {
  flex: 0 0 auto;
  color: var(--muted);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  white-space: nowrap;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  width: 120px;
  margin-right: auto;
  opacity: 0.86;
}

.nav-logo:hover {
  opacity: 1;
}

.nav-logo img {
  display: block;
  width: 100%;
  height: auto;
}

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

.nav a.is-current {
  color: var(--accent-dark);
}

.definition-summary {
  margin: 24px 0;
  padding: 0;
  overflow: hidden;
  border: 2px solid #d7dee9;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.definition-summary-head {
  display: block;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #f8fffd 0%, #f8fbff 100%);
}

.definition-summary-head span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(15, 118, 110, 0.22);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.definition-summary-head strong {
  display: block;
  color: #111827;
  font-size: 1.08rem;
  line-height: 1.42;
}

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

.definition-card {
  padding: 18px 20px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.definition-card p {
  margin: 10px 0 0;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.58;
}

.definition-card-label {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.model-definition {
  border-left: 5px solid var(--accent);
  border-right: 1px solid var(--line);
  background: #f8fffd;
}

.model-definition .definition-card-label {
  background: var(--soft);
  color: var(--accent-dark);
}

.inference-definition {
  border-left: 5px solid var(--engine);
  background: #f8fbff;
}

.inference-definition .definition-card-label {
  background: var(--engine-soft);
  color: var(--engine-dark);
}

main {
  padding: 34px 0 80px;
}

section {
  margin: 26px 0;
  padding: 34px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

section.compact {
  box-shadow: none;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h3 {
  margin: 24px 0 10px;
  font-size: 1.125rem;
  font-weight: 600;
}

p {
  margin: 0 0 16px;
}

ul, ol {
  padding-left: 1.4rem;
}

li {
  margin: 8px 0;
}

strong {
  font-weight: 750;
}

.note {
  padding: 18px 20px;
  border-left: 5px solid var(--accent);
  background: var(--soft);
  border-radius: 14px;
  color: #134e4a;
}

.figure {
  margin: 26px 0 6px;
  text-align: center;
}

.figure img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: white;
}

.figure.noborder img {
  border: none;
  border-radius: 0;
}

.figure-narrow {
  width: 72%;
}

figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fbfcfe;
}

.card h3 {
  margin-top: 0;
}

.video-section {
  border-color: rgba(17, 24, 39, 0.22);
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%),
    var(--panel);
}

.video-kicker {
  background: #f1f5f9;
  color: #111827;
}

.video-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  margin-bottom: 22px;
}

.video-section-head h2 {
  margin-bottom: 10px;
}

.video-section-head .button {
  white-space: nowrap;
}

.video-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.video-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  background: #0f172a;
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.16);
}

.video-player {
  min-width: 0;
  background: #020617;
}

.video-player video,
.video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  object-fit: contain;
}

.video-card video {
  pointer-events: none;
}

.video-feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  color: white;
}

.video-feature-copy span {
  color: #93c5fd;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.video-feature-copy h3 {
  margin: 0;
  color: white;
  font-size: 1.5rem;
  line-height: 1.2;
}

.video-feature-copy p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.58;
}

.video-feature-copy .video-note {
  padding: 12px 14px;
  border: 1px solid rgba(147, 197, 253, 0.24);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.68);
  color: #dbeafe;
  font-size: 0.94rem;
}

.video-note strong {
  color: white;
}

.video-feature-copy .button.secondary {
  align-self: flex-start;
  margin-top: 4px;
  border-color: #93c5fd;
  background: transparent;
  color: white;
}

.video-feature-copy .button.secondary:hover {
  background: rgba(147, 197, 253, 0.12);
}

.engine-proof {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.26);
  border-radius: 18px;
  background: #f8fbff;
  overflow: auto;
}

.engine-proof-copy h3 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 1.28rem;
  line-height: 1.28;
}

.engine-proof-copy p {
  color: #334155;
  font-size: 0.96rem;
  line-height: 1.58;
}

.engine-proof-table-wrap {
  float: right;
  width: min(480px, 48%);
  margin: 0 0 12px 20px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: white;
}

.engine-proof-table {
  min-width: 0;
  margin-top: 0;
  font-size: 0.88rem;
}

.engine-proof-table caption {
  padding: 12px 14px;
  color: #475569;
  text-align: left;
  font-weight: 750;
}

.engine-proof-table th,
.engine-proof-table td {
  padding: 8px 9px;
  vertical-align: top;
}

.engine-proof-table th {
  color: #334155;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.engine-proof-table td:nth-child(2),
.engine-proof-table td:nth-child(3) {
  color: #111827;
  font-weight: 800;
}

.engine-proof-table .diffulex-row td {
  background: #eff6ff;
}

.engine-proof-table .diffulex-row td:first-child {
  border-left: 4px solid var(--engine);
}

.video-group {
  margin-top: 26px;
}

.video-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.video-group-head h3 {
  margin: 0;
}

.video-group-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

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

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

.video-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.video-card:hover,
.video-card:focus-visible {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.14);
  outline: none;
  transform: translateY(-2px);
}

.video-card-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.video-card-title {
  margin: 0;
  color: #111827;
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.25;
}

.video-card-copy > span:not(.video-card-title) {
  flex: 0 0 auto;
  color: var(--engine-dark);
  font-size: 0.9rem;
  font-weight: 750;
}

.contribution-section {
  border-color: rgba(15, 118, 110, 0.26);
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fffd 100%),
    var(--panel);
}

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

.contribution-card {
  position: relative;
  min-height: 260px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  overflow: hidden;
}

.contribution-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--engine));
}

.contribution-index {
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.contribution-card h3 {
  margin: 20px 0 10px;
  color: #111827;
}

.contribution-card p {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.58;
}

.training-section {
  border-color: rgba(15, 118, 110, 0.28);
  background:
    linear-gradient(180deg, #f8fffd 0%, #ffffff 58%),
    var(--panel);
}

.engine-section {
  border-color: rgba(37, 99, 235, 0.3);
  background:
    linear-gradient(180deg, #f6f9ff 0%, #ffffff 58%),
    var(--panel);
}

.section-kicker,
.engine-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.engine-kicker {
  background: var(--engine-soft);
  color: var(--engine-dark);
}

.section-lede,
.engine-lede {
  max-width: 940px;
  font-size: 1.04rem;
  color: #334155;
}

.repo-flow,
.engine-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.repo-flow > div,
.engine-split > div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fbfcfe;
}

.repo-flow h3,
.engine-split h3 {
  margin-top: 0;
}

.repo-flow .engine-target {
  border-color: rgba(37, 99, 235, 0.28);
  background: #f8fbff;
}

.repo-flow .engine-target h3 {
  color: var(--engine-dark);
}

.repo-flow .button {
  margin-top: 4px;
}

.engine-grid {
  margin: 20px 0 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.engine-card {
  background: white;
}

.engine-card h3,
.engine-section a {
  color: var(--engine-dark);
}

.engine-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.demo-section {
  border-color: rgba(79, 70, 229, 0.24);
  background:
    linear-gradient(180deg, #f8fbff 0%, #ffffff 58%),
    var(--panel);
}

.demo-kicker {
  background: #eef2ff;
  color: #3730a3;
}

.decode-demo {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  overflow: hidden;
}

.demo-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #f8fffd 0%, #f8fbff 100%);
}

.demo-topbar h3 {
  margin: 4px 0 4px;
  color: #111827;
  font-size: 1.18rem;
}

.demo-topbar p {
  margin: 0;
  color: #475569;
}

.demo-step-label {
  color: #3730a3;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.demo-controls button {
  min-width: 92px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: #ffffff;
  color: #3730a3;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 750;
  cursor: pointer;
}

.demo-controls button:hover:not(:disabled) {
  border-color: #4f46e5;
  background: #eef2ff;
}

.demo-controls button:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

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

.decode-panel {
  padding: 20px;
  min-width: 0;
}

.single-panel {
  border-right: 1px solid var(--line);
}

.decode-panel-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
}

.decode-panel-head strong {
  color: #111827;
}

.panel-tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.single-tag {
  background: #f1f5f9;
  color: #334155;
}

.multi-tag {
  background: var(--engine-soft);
  color: var(--engine-dark);
}

.panel-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.panel-summary div {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.panel-summary span {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.panel-summary strong {
  display: block;
  color: #1f2937;
  font-size: 0.95rem;
  line-height: 1.35;
}

.block-track {
  display: grid;
  grid-template-columns: 0.72fr repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.decode-block {
  position: relative;
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.decode-block::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.block-name,
.block-status {
  position: relative;
  z-index: 2;
  display: block;
}

.block-name {
  color: #0f172a;
  font-weight: 850;
}

.block-status {
  margin-top: 6px;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.35;
}

.block-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--fill, 0%);
  height: 8px;
  background: currentColor;
  opacity: 0.72;
  transition: width 220ms ease;
}

.state-prefix {
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.28);
  background: #ecfdf5;
}

.state-active {
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.34);
  background: #eff6ff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.state-ready {
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.34);
  background: #f0fdf4;
}

.state-store {
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.36);
  background:
    linear-gradient(135deg, #fffbeb 0%, #fffbeb 48%, #eff6ff 48%, #eff6ff 100%);
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.1);
}

.state-bubble {
  color: #be123c;
  border-color: rgba(225, 29, 72, 0.34);
  background: repeating-linear-gradient(
    135deg,
    #fff1f2 0,
    #fff1f2 10px,
    #ffe4e6 10px,
    #ffe4e6 20px
  );
  box-shadow: 0 10px 22px rgba(225, 29, 72, 0.12);
}

.state-waiting,
.state-future {
  color: #64748b;
  border-color: #e2e8f0;
  background: #f8fafc;
}

.state-future {
  opacity: 0.68;
}

.state-dummy {
  color: #7c3aed;
  border-color: rgba(124, 58, 237, 0.28);
  background: repeating-linear-gradient(
    135deg,
    #f5f3ff 0,
    #f5f3ff 10px,
    #ede9fe 10px,
    #ede9fe 20px
  );
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.timeline-step {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.timeline-step.is-done {
  border-color: rgba(15, 118, 110, 0.22);
  background: #ecfdf5;
  color: #0f766e;
}

.timeline-step.is-active {
  border-color: #4f46e5;
  background: #eef2ff;
  color: #3730a3;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.14);
}

.timeline-step.bubble-step.is-active {
  border-color: rgba(225, 29, 72, 0.4);
  background: #fff1f2;
  color: #be123c;
}

.timeline-step.overlap-step.is-active {
  border-color: rgba(37, 99, 235, 0.4);
  background: #eff6ff;
  color: var(--engine-dark);
}

.panel-note {
  min-height: 54px;
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.45;
}

.demo-takeaway {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: #f8fbff;
  color: #172554;
  font-weight: 750;
}

pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 14px;
  background: var(--code);
  border: 1px solid var(--line);
  line-height: 1.5;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.94em;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}

th {
  background: #f8fafc;
}

.result-highlights,
.throughput-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.result-highlight,
.throughput-strip div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfe;
}

.result-highlight.is-primary {
  border-color: rgba(15, 118, 110, 0.35);
  background: #f0fdfa;
}

.result-highlight span,
.throughput-strip span {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.result-highlight strong,
.throughput-strip strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 1.12rem;
  line-height: 1.35;
}

.result-highlight p {
  margin: 8px 0 0;
  color: #475569;
  font-size: 0.94rem;
  line-height: 1.5;
}

.result-table-wrap {
  margin: 20px 0 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.result-table {
  margin-top: 0;
  min-width: 760px;
}

.result-table caption {
  padding: 14px 16px;
  color: #475569;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 700;
}

.result-table th,
.result-table td {
  vertical-align: top;
}

.result-table tr.is-best td {
  background: #f0fdfa;
}

.result-table tr.is-best td:first-child {
  border-left: 4px solid var(--accent);
  font-weight: 750;
}

.paper-table-wrap {
  margin: 22px 0 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.paper-table {
  min-width: 980px;
  margin-top: 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.paper-table caption {
  padding: 14px 16px;
  color: #475569;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.45;
}

.paper-table th,
.paper-table td {
  padding: 8px 10px;
  vertical-align: middle;
  white-space: nowrap;
}

.paper-table thead th {
  color: #111827;
  text-align: center;
  font-weight: 850;
}

.paper-table tbody td:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.paper-table tbody td:first-child {
  color: #111827;
  font-weight: 650;
}

.paper-group-row th {
  padding: 12px 10px 7px;
  border-top: 2px solid #111827;
  background: white;
  color: #111827;
  text-align: left;
  font-size: 1rem;
  font-style: italic;
}

.paper-group-row span {
  color: #475569;
  font-weight: 600;
}

.paper-table .training-free-row td {
  background: #eef9ef;
}

.paper-table .mbd-row td {
  background: #eaf3ff;
}

.paper-table .mbd-row td:first-child {
  border-left: 4px solid var(--engine);
  font-weight: 850;
}

.main-results-table {
  min-width: 1260px;
}

.throughput-table {
  min-width: 1120px;
}

.table-stack {
  margin: 22px 0 26px;
}

.table-stack > .paper-table-wrap {
  margin: 0;
}

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

.ablation-split .paper-table-wrap {
  margin: 0;
}

.ablation-split .paper-table {
  min-width: 0;
}

.transfer-table {
  min-width: 860px;
}

.ablation-table {
  min-width: 500px;
}

.citation-box {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #111827;
}

.citation-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #374151;
  color: #e5e7eb;
}

.citation-box-head span {
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.citation-box button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #4b5563;
  border-radius: 999px;
  background: #1f2937;
  color: #f9fafb;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  cursor: pointer;
}

.citation-box button:hover {
  background: #374151;
}

.citation-box pre {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #111827;
  color: #f9fafb;
}

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

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
}

.video-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: calc(100vh - 56px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: #020617;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.video-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
}

.video-modal-head h2 {
  margin: 0;
  color: white;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.video-modal-close {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  cursor: pointer;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.video-modal video {
  display: block;
  width: 100%;
  max-height: calc(100vh - 132px);
  background: #020617;
}

footer {
  padding: 36px 0;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
  background: white;
}

/* Landing page navigation cards */
.landing-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.landing-nav-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 260px;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.landing-nav-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.landing-nav-card .card-kicker {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-nav-card h2 {
  margin: 0 0 10px;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.landing-nav-card p {
  margin: 0;
  color: #475569;
  font-size: 0.96rem;
  line-height: 1.55;
}

/* Videos card: dark / neutral */
.landing-nav-card.videos {
  border-top: 5px solid #111827;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}
.landing-nav-card.videos .card-kicker {
  background: #f1f5f9;
  color: #111827;
}
.landing-nav-card.videos:hover {
  border-color: #111827;
}

/* MBD-LMs card: green accent */
.landing-nav-card.mbd {
  border-top: 5px solid var(--accent);
  background: linear-gradient(180deg, #f8fffd 0%, #ffffff 100%);
}
.landing-nav-card.mbd .card-kicker {
  background: var(--soft);
  color: var(--accent-dark);
}
.landing-nav-card.mbd:hover {
  border-color: var(--accent);
}

/* Diffulex card: blue accent */
.landing-nav-card.diffulex {
  border-top: 5px solid var(--engine);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.landing-nav-card.diffulex .card-kicker {
  background: var(--engine-soft);
  color: var(--engine-dark);
}
.landing-nav-card.diffulex:hover {
  border-color: var(--engine);
}

/* Side table-of-contents */
.side-toc {
  position: fixed;
  left: 6px;
  top: 140px;
  z-index: 50;
  opacity: 0.42;
  transition: opacity 220ms ease;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  scrollbar-width: none;
}
.side-toc:hover {
  opacity: 1;
}
.side-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}
.side-toc li {
  margin: 0;
  padding: 0;
}
.side-toc a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0 4px 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 540;
  line-height: 1.3;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease;
  border-left: 2px solid transparent;
  margin-left: -1px;
}
.side-toc a:hover {
  color: var(--text);
}
.side-toc a.is-visible {
  color: var(--accent-dark);
  border-left-color: var(--accent);
  font-weight: 680;
}
.side-toc .toc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
}
.side-toc a.is-visible .toc-num {
  color: var(--accent);
}

@media (max-width: 1200px) {
  .side-toc {
    display: none;
  }
}

.model-table {
  min-width: 620px;
  font-size: 0.9rem;
}
.model-table th,
.model-table td {
  padding: 6px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.model-table thead th {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--code);
}
.model-table code {
  font-size: 0.82rem;
  white-space: nowrap;
}

/* Unified backend diagrams */
.backend-diagrams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}
.backend-card-wide {
  grid-column: 1 / -1;
}
.backend-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 18px 18px;
  background: white;
}
.backend-card h4 {
  margin: 16px 0 6px;
  font-size: 0.98rem;
  font-weight: 700;
}
.backend-card p {
  margin: 0;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.5;
}
.backend-diagram {
  padding: 16px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e8ecf1;
}
.bd-row {
  display: flex;
  gap: 4px;
  align-items: stretch;
}
.bd-row-wide {
  gap: 6px;
}
.bd-buffer {
  display: flex;
  gap: 3px;
  align-items: stretch;
  padding: 22px 8px 8px;
  border: 2px dashed #94a3b8;
  border-radius: 10px;
  position: relative;
  background: #fafbfc;
}
.bd-buf-1 {
  flex: 0.6;
}
.bd-buf-4 {
  flex: 1;
}
.bd-buffer-label {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.6rem;
  font-weight: 650;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.bd-arrow {
  display: flex;
  align-items: center;
  color: #94a3b8;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.bd-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 650;
  text-align: center;
  line-height: 1.3;
  min-height: 48px;
}
.bd-box small {
  font-size: 0.66rem;
  font-weight: 500;
  opacity: 0.8;
}
.bd-prefix {
  background: #ccfbf1;
  color: #0f766e;
  border: 1.5px solid #5eead4;
}
.bd-active {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1.5px solid #93c5fd;
}
.bd-dummy {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1.5px dashed #cbd5e1;
}
.bd-tocache {
  background: #fef3c7;
  color: #b45309;
  border: 1.5px solid #fcd34d;
}
.bd-cached {
  background: #dcfce7;
  color: #15803d;
  border: 1.5px solid #86efac;
}
.bd-mapping {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  font-size: 0.76rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}
.bd-mapping strong {
  color: #1d4ed8;
}

@media (max-width: 800px) {
  .backend-diagrams {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  h1 {
    white-space: nowrap;
  }
}

@media (max-width: 800px) {
  section {
    padding: 24px;
  }
  .engine-banner-main {
    align-items: stretch;
    flex-direction: column;
  }
  .engine-banner-actions,
  .engine-banner-actions .button {
    width: 100%;
  }
  .definition-grid {
    grid-template-columns: 1fr;
  }
  .video-section-head,
  .video-feature {
    grid-template-columns: 1fr;
  }
  .engine-proof {
    overflow: visible;
  }
  .engine-proof-table-wrap {
    float: none;
    width: 100%;
    margin: 0 0 16px;
  }
  .video-head-actions,
  .video-head-actions .button,
  .video-section-head .button {
    width: 100%;
  }
  .video-head-actions {
    justify-content: stretch;
  }
  .video-group-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .video-grid,
  .video-grid.three-up {
    grid-template-columns: 1fr;
  }
  .hero-metrics,
  .contribution-grid,
  .result-highlights,
  .throughput-strip,
  .ablation-split {
    grid-template-columns: 1fr;
  }
  .model-definition {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .repo-flow,
  .engine-split {
    grid-template-columns: 1fr;
  }
  .demo-topbar {
    grid-template-columns: 1fr;
  }
  .demo-controls {
    justify-content: flex-start;
  }
  .demo-controls button {
    flex: 1 1 120px;
  }
  .demo-stage {
    grid-template-columns: 1fr;
  }
  .single-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .panel-summary {
    grid-template-columns: 1fr;
  }
  .block-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .figure-narrow {
    width: 100%;
  }
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .video-modal {
    padding: 12px;
  }
  .video-modal-dialog {
    max-height: calc(100vh - 24px);
  }
  .video-modal video {
    max-height: calc(100vh - 104px);
  }
  .landing-nav {
    grid-template-columns: 1fr;
  }
}
