:root {
  color-scheme: light;
  --ink: #101828;
  --muted: #667085;
  --line: #d8dee8;
  --paper: #fbfcfe;
  --soft: #edf4f7;
  --green: #00a6a6;
  --amber: #e0a33a;
  --rose: #b23a48;
  --blue: #2468b2;
  --violet: #7257c7;
  --shadow: 0 18px 50px rgba(20, 33, 61, 0.13);
}

* {
  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.5;
}

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

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

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 66px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(216, 222, 232, 0.8);
  background: rgba(251, 252, 254, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--ink), var(--green));
  font-size: 12px;
  letter-spacing: 0;
}

nav {
  display: flex;
  gap: 22px;
  color: #445066;
  font-size: 14px;
  font-weight: 650;
}

nav a:hover {
  color: var(--green);
}

.hero {
  position: relative;
  min-height: calc(100vh - 66px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #08101f;
}

.particle-field {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0.78;
  pointer-events: none;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(8, 16, 31, 0.94), rgba(8, 16, 31, 0.58) 44%, rgba(8, 16, 31, 0.16)),
    linear-gradient(0deg, rgba(8, 16, 31, 0.96), rgba(8, 16, 31, 0.02) 52%);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  opacity: 0.88;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(900px, calc(100% - 48px));
  margin: 0 auto;
  padding: 76px 0 170px;
  color: #fff;
}

.venue,
.eyebrow {
  margin: 0 0 14px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(58px, 12vw, 142px);
  line-height: 0.9;
  letter-spacing: 0;
}

.subtitle {
  max-width: 760px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 650;
  line-height: 1.12;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 760;
}

.button.primary {
  color: #08101f;
  background: #fff;
}

.button.ghost {
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.hero-stats {
  position: absolute;
  z-index: 2;
  right: 28px;
  bottom: 28px;
  left: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
}

.hero-stats div {
  min-height: 100px;
  padding: 20px;
  color: #fff;
  background: rgba(8, 16, 31, 0.42);
}

.hero-stats strong {
  display: block;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.hero-stats span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.paper-strip {
  display: grid;
  gap: 6px;
  padding: 26px 32px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.paper-strip p {
  margin: 0;
  color: #48556a;
  font-size: 14px;
}

.paper-strip .author-line {
  color: #263246;
  font-size: 16px;
  font-weight: 650;
}

.paper-strip sup {
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
}

.affiliations {
  margin-top: 6px !important;
}

.section {
  padding: 96px 32px;
}

.band {
  background: var(--soft);
}

.section-heading,
.abstract-shell,
.motivation-grid,
.method-layout,
.results-shell,
.result-controls,
.analysis-grid,
.case-board {
  width: min(1180px, 100%);
  margin: 0 auto;
}

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

.abstract-shell {
  display: grid;
  grid-template-columns: 0.72fr 1fr 1fr;
  gap: 28px;
  align-items: start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 34px 0;
}

.abstract-shell .eyebrow {
  margin: 0;
}

.abstract-shell h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
}

.abstract-shell p {
  margin: 0;
}

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

.section-heading h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

.motivation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.motivation-grid article,
.phase-card,
.rollout-card,
.metric-card,
.case-board {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(20, 33, 61, 0.03);
}

.motivation-grid article {
  min-height: 280px;
  padding: 28px;
}

.problem-index {
  color: var(--rose);
  font-size: 13px;
  font-weight: 850;
}

h3 {
  margin: 18px 0 10px;
  font-size: 22px;
  line-height: 1.2;
}

p {
  color: var(--muted);
}

.method-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 24px;
  align-items: start;
}

.figure-panel {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.figure-panel img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  background: #fff;
}

figcaption {
  padding: 16px 18px 18px;
  color: #596579;
  font-size: 14px;
}

.method-controls {
  display: grid;
  gap: 18px;
}

.phase-card,
.rollout-card {
  padding: 22px;
}

.phase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.phase-header h3,
.rollout-card h3 {
  margin-top: 0;
}

output,
.badge {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

output {
  color: #fff;
  background: var(--green);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.phase-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 8px;
}

.phase-track span {
  min-height: 30px;
  border-radius: 6px;
  background: #e7edf5;
  color: #4d596e;
  font-size: 11px;
  font-weight: 760;
  text-align: center;
  line-height: 30px;
}

.rollout-controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.rollout-controls label {
  display: grid;
  gap: 6px;
  color: #4b5668;
  font-size: 13px;
  font-weight: 750;
}

.rollout-controls input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}

.rollout-tree {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.design-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  align-items: center;
}

.design-node,
.exec-node {
  min-height: 34px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.design-node {
  color: #fff;
  background: var(--blue);
}

.exec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
  gap: 6px;
}

.exec-node {
  color: #2f3b4f;
  background: #edf2f7;
  border: 1px solid #dbe3ee;
}

.small-copy {
  margin-bottom: 0;
  font-size: 13px;
}

.results-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.result-controls {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  min-width: 240px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fb;
}

.segmented button,
.case-tabs button {
  min-height: 42px;
  border: 0;
  cursor: pointer;
  color: #4f5b6d;
  background: transparent;
  font-weight: 800;
}

.segmented button.active {
  color: #fff;
  background: var(--ink);
}

.metric-highlight {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.metric-highlight strong {
  font-size: 34px;
}

.metric-highlight span {
  color: var(--muted);
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  padding: 18px;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid #e7ecf3;
  text-align: left;
}

th {
  color: #4a5568;
  font-size: 12px;
  text-transform: uppercase;
}

td:last-child {
  color: var(--green);
  font-weight: 850;
}

.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 24px;
}

.metric-card {
  padding: 22px;
}

.metric-card h3 {
  margin-top: 0;
}

.metric-card img {
  margin-top: 12px;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
}

.structure-mix {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.mix-row {
  display: grid;
  gap: 7px;
}

.mix-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #425066;
  font-size: 13px;
  font-weight: 800;
}

.mix-bars {
  display: grid;
  gap: 5px;
}

.mix-bar {
  display: grid;
  grid-template-columns: var(--single) var(--reflection) var(--ensemble);
  height: 18px;
  overflow: hidden;
  border-radius: 6px;
  background: #edf2f7;
}

.mix-bar span:nth-child(1) {
  background: var(--blue);
}

.mix-bar span:nth-child(2) {
  background: var(--green);
}

.mix-bar span:nth-child(3) {
  background: var(--amber);
}

.mix-label {
  color: #6a7587;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.case-tabs {
  width: min(1180px, 100%);
  margin: 0 auto 16px;
  display: flex;
  gap: 8px;
}

.case-tabs button {
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.case-tabs button.active {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
}

.case-board {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 0;
  overflow: hidden;
}

.case-board > article {
  padding: 28px;
  border-right: 1px solid var(--line);
}

.case-board h3 {
  margin-top: 0;
}

.case-compare {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.case-compare > div {
  min-height: 260px;
  padding: 28px;
}

.case-compare > div + div {
  border-left: 1px solid var(--line);
}

.case-facts {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
}

.case-facts div {
  border-top: 1px solid #e7ecf3;
  padding-top: 12px;
}

.case-facts dt {
  color: #526074;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.case-facts dd {
  margin: 4px 0 0;
  color: #253047;
  font-weight: 700;
}

.case-detail {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding: 24px 28px;
  background:
    linear-gradient(90deg, rgba(0, 166, 166, 0.11), rgba(224, 163, 58, 0.09)),
    #fff;
}

.case-detail h4 {
  margin-top: 0;
}

.case-detail p {
  max-width: 920px;
  margin-bottom: 0;
}

.io-section {
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 166, 166, 0.14), transparent 32%),
    radial-gradient(circle at 82% 20%, rgba(224, 163, 58, 0.13), transparent 28%),
    #f8fbfd;
}

.io-board {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 18px;
}

.io-board article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 34px rgba(20, 33, 61, 0.08);
  padding: 24px;
}

.io-board h3 {
  margin-top: 12px;
}

.io-tag {
  display: inline-flex;
  border: 1px solid rgba(0, 166, 166, 0.28);
  border-radius: 999px;
  padding: 5px 9px;
  color: #087879;
  background: rgba(0, 166, 166, 0.08);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.digit-grid {
  display: grid;
  grid-template-columns: repeat(3, 48px);
  width: max-content;
  overflow: hidden;
  margin: 18px 0 12px;
  border: 1px solid #aeb9c9;
  border-radius: 8px;
}

.digit-grid span {
  display: grid;
  width: 48px;
  height: 44px;
  place-items: center;
  border-right: 1px solid #aeb9c9;
  border-bottom: 1px solid #aeb9c9;
  color: #263246;
  font-weight: 850;
}

.digit-grid span:nth-child(3n) {
  border-right: 0;
}

.digit-grid span:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.io-designer,
.io-trace {
  grid-column: 2;
}

.io-question,
.io-answer {
  grid-column: 1;
}

.io-answer {
  grid-row: span 1;
}

.workflow-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.workflow-line span,
.workflow-line strong {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  padding: 8px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  text-align: center;
}

.workflow-line strong {
  background: var(--green);
}

pre {
  overflow-x: auto;
  margin: 16px 0 0;
  border-radius: 8px;
  padding: 16px;
  color: #d7ecff;
  background: #0b1324;
  font-size: 13px;
  line-height: 1.55;
}

.trace-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.trace-grid div {
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.trace-grid strong {
  color: #263246;
}

.trace-grid p {
  margin: 8px 0 0;
  font-size: 14px;
}

.judge-cell {
  grid-column: 1 / -1;
  background: rgba(0, 166, 166, 0.08) !important;
}

.answer-number {
  margin: 6px 0 10px;
  color: var(--green);
  font-size: clamp(64px, 9vw, 112px);
  font-weight: 900;
  line-height: 0.95;
}

.trajectory-viewer {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.traj-card {
  min-width: 0;
  border: 1px solid rgba(139, 152, 174, 0.45);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 42px rgba(20, 33, 61, 0.09);
}

.traj-wide {
  grid-column: 1 / -1;
}

.traj-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #e1e7ef;
  background:
    linear-gradient(90deg, rgba(0, 166, 166, 0.11), rgba(36, 104, 178, 0.08)),
    #fff;
}

.traj-head h3 {
  margin: 0;
  font-size: 18px;
  text-align: right;
}

.traj-card pre {
  max-height: 520px;
  margin: 0;
  border-radius: 0;
  border: 0;
}

.traj-wide pre {
  max-height: 640px;
}

.judge-output pre {
  background: #071b1f;
}

.badge.muted {
  color: #7a3f48;
  background: #fae9ec;
}

.badge.strong {
  color: #0c6769;
  background: #dff4f2;
}

h4 {
  margin: 18px 0 8px;
  font-size: 18px;
}

footer {
  padding: 28px 32px;
  border-top: 1px solid var(--line);
  text-align: center;
}

footer p {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 920px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 20px;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: 820px;
  }

  .hero-content {
    width: min(100% - 32px, 760px);
    padding-bottom: 280px;
  }

  .hero-stats,
  .abstract-shell,
  .motivation-grid,
  .method-layout,
  .analysis-grid,
  .case-board,
  .case-compare,
  .io-board,
  .trace-grid,
  .trajectory-viewer {
    grid-template-columns: 1fr;
  }

  .traj-wide {
    grid-column: auto;
  }

  .io-designer,
  .io-trace,
  .io-question,
  .io-answer {
    grid-column: auto;
  }

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

  .hero-stats {
    right: 16px;
    left: 16px;
  }

  .case-board > article,
  .case-compare > div + div {
    border-right: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .result-controls {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .section {
    padding: 68px 18px;
  }

  .paper-strip,
  footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero-stats div {
    min-height: 84px;
    padding: 16px;
  }

  .phase-header,
  .metric-highlight {
    align-items: flex-start;
    flex-direction: column;
  }
}
