:root {
  color-scheme: light;
  --ink: #182333;
  --muted: #5f6b78;
  --paper: #ffffff;
  --soft: #f5f7f8;
  --line: #d9e0e6;
  --base: #3e5f8a;
  --asrr: #3fae9a;
  --shared: #d98b45;
  --coral: #e76f51;
  --context: #a89acb;
  --shadow: 0 14px 34px rgb(24 35 51 / 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
a { color: inherit; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.14; letter-spacing: 0; }
h1 { max-width: 920px; font-size: clamp(2.15rem, 4.6vw, 4.25rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3vw, 2.65rem); font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 800; }

.hero {
  position: relative;
  min-height: 630px;
  overflow: hidden;
  color: var(--paper);
  background: #111827;
}
.nav {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(1180px, calc(100% - 40px));
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 24px 0;
}
.nav__brand { font-size: 1.08rem; font-weight: 800; text-decoration: none; }
.nav__links { display: flex; flex-wrap: wrap; gap: 22px; font-size: 0.9rem; font-weight: 700; }
.nav__links a { color: rgb(255 255 255 / 0.82); text-decoration: none; }
.nav__links a:hover { color: var(--paper); }
.hero__body {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(1180px, calc(100% - 40px));
  min-height: 530px;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
  align-items: center;
  gap: clamp(36px, 6vw, 82px);
  margin: 0 auto;
  padding: 44px 0 66px;
}
.hero h1 { max-width: 680px; font-size: 5rem; }
.hero__paper-title { max-width: 680px; margin-top: 14px; font-size: 1.6rem; font-weight: 600; line-height: 1.35; }
.hero__content { min-width: 0; }
.kicker, .eyebrow {
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kicker { color: #c6dcf4; }
.eyebrow { color: var(--base); }
.hero__summary {
  max-width: 650px;
  margin-top: 24px;
  color: rgb(255 255 255 / 0.86);
  font-size: 1.1rem;
}
.hero__mosaic {
  display: grid;
  width: 100%;
  max-width: 470px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  justify-self: end;
}
.hero__tile {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 5px;
  background: #202a38;
}
.hero__tile img, .hero__tile-video { width: 100%; height: auto; object-fit: contain; background: #080d13; }
.hero__tile--simulation .hero__tile-video { aspect-ratio: 1; }
.hero__tile--robot .hero__tile-video { aspect-ratio: 8 / 3; }
.hero__tile figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: rgb(10 17 27 / 0.78);
  color: rgb(255 255 255 / 0.88);
  font-size: 0.68rem;
  font-weight: 700;
}
.hero__tile-role { flex: 0 0 auto; padding: 2px 5px; border: 1px solid currentColor; border-radius: 3px; font-size: 0.6rem; letter-spacing: 0.04em; text-transform: uppercase; }
.hero__tile-role--base { color: #b9cdec; }
.hero__tile-role--asrr { color: #71d4bf; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease;
}
.button:hover { transform: translateY(-1px); }
.button--primary { background: var(--paper); color: var(--ink); }
.button--ghost { border-color: rgb(255 255 255 / 0.55); color: var(--paper); }
.button--demo { background: var(--asrr); color: #081713; }
.button--demo:hover { background: #63c7b2; }
.button--ink { background: var(--ink); color: var(--paper); }

.section { padding: 76px 0; }
.section--light { background: var(--soft); }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.content-narrow { width: min(860px, calc(100% - 40px)); }
.content-narrow > p:not(.eyebrow), .section-heading > p:not(.eyebrow), .code-copy {
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.02rem;
}
.section-heading { max-width: 860px; margin-bottom: 32px; }

.explainer-band {
  --bg: #0f151e;
  --surface: #161f2b;
  --surface-strong: #1c2735;
  --surface-soft: #111a25;
  --text: #eef4f7;
  --muted: #9cabb7;
  --line: #344252;
  --base: #6689b8;
  --asrr: #45b9a2;
  --residual: #ef8065;
  --context: #b2a4d2;
  --focus: #f1bd70;
  --gold-current: #e5aa3a;
  --gold-visited: #f1d18a;
  --gold-future: #8f7b55;
  --success: #55c6a8;
  --danger: #ef8d74;
  --shadow: 0 18px 42px rgb(0 0 0 / 0.24);
  padding: 62px 0 68px;
  overflow: hidden;
  border-top: 1px solid #263342;
  border-bottom: 1px solid #263342;
  background: var(--bg);
  color: var(--text);
}
.explainer-band__heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.explainer-band__heading .eyebrow { color: var(--asrr); }
.explainer-band__heading > div > p:last-child { max-width: 760px; margin-top: 12px; color: var(--muted); }
.explainer-band__standalone { flex: 0 0 auto; color: var(--asrr); font-size: 0.82rem; font-weight: 800; text-decoration: none; }
.explainer-band__standalone:hover { color: var(--text); }
.explainer-band .explainer-app { height: min(760px, calc(100dvh - 36px)); min-height: 680px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); box-shadow: 0 22px 52px rgb(0 0 0 / 0.32); }
.explainer-band .app-header { min-height: 54px; grid-template-columns: minmax(0, 1fr) auto; padding: 8px 16px; }
.explainer-band .app-title { justify-content: flex-start; }
.explainer-band .stage-viewport { min-height: 0; }
.explainer-band .media-dialog { color: var(--text); }

.paper-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.paper-figure img { width: 100%; height: auto; object-fit: contain; }
.paper-figure--method { margin-bottom: 26px; }
.paper-table { max-width: 1080px; margin: 0 auto; }
.paper-figure figcaption, .video-card figcaption {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.feature-grid, .metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feature-card, .metric-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.feature-card i { color: var(--coral); font-size: 1.15rem; }
.feature-card h3 { margin-top: 12px; }
.feature-card p { margin-top: 9px; color: var(--muted); font-size: 0.92rem; }
.metric-grid { margin-bottom: 28px; }
.metric-card__label {
  display: block;
  min-height: 2.7em;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}
.metric-card strong { display: block; margin: 11px 0 8px; color: var(--asrr); font-size: clamp(1.45rem, 2.4vw, 2.05rem); line-height: 1.05; }
.metric-card span:last-child { color: var(--muted); font-size: 0.88rem; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 9px 24px rgb(24 35 51 / 0.07);
}
table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 0.86rem; }
caption { padding: 14px 15px; color: var(--muted); font-size: 0.87rem; font-weight: 700; text-align: left; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { background: #eaf0f4; color: var(--ink); font-size: 0.76rem; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.analysis-grid { display: grid; grid-template-columns: minmax(300px, 0.72fr) minmax(520px, 1.28fr); gap: 20px; align-items: stretch; }
.analysis-grid .paper-figure { display: flex; flex-direction: column; }
.analysis-grid .paper-figure img { flex: 1; min-height: 300px; padding: 14px; }
.cost-block { display: grid; grid-template-columns: minmax(230px, 0.55fr) minmax(600px, 1.45fr); gap: 28px; align-items: center; margin-top: 28px; }
.cost-block__text p { margin-top: 12px; color: var(--muted); }
.table-wrap--compact { box-shadow: none; }
.cost-table { min-width: 680px; }
.cost-table strong { color: #226447; }

.method-video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.video-group h3 { margin-bottom: 14px; }
.video-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.video-card { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); }
.video-card video { width: 100%; aspect-ratio: 16 / 10; background: #101722; object-fit: contain; }
.video-card figcaption { min-height: 48px; }
.status { font-weight: 800; }
.status--base { color: var(--base); }
.status--asrr { color: #237864; }

.robot-task-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.robot-task { min-width: 0; }
.task-heading { display: flex; min-height: 44px; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.task-heading strong { color: #237864; font-size: 0.9rem; white-space: nowrap; }
.video-card--robot + .video-card--robot { margin-top: 14px; }
.video-shell { position: relative; }
.video-card--robot video { aspect-ratio: 16 / 9; }
.speed-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgb(24 35 51 / 0.88);
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 800;
}

.code-layout { display: grid; grid-template-columns: minmax(280px, 0.8fr) minmax(430px, 1.2fr); gap: 42px; align-items: center; }
.code-block {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid #30384a;
  border-radius: 8px;
  background: #111827;
  color: #e5edf8;
  font-size: 0.88rem;
  line-height: 1.55;
  box-shadow: var(--shadow);
}
.code-block--compact { margin-top: 20px; box-shadow: none; }
.footer { padding: 28px 0; border-top: 1px solid #2d3644; background: #111827; color: rgb(255 255 255 / 0.72); font-size: 0.88rem; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }

@media (max-width: 980px) {
  .hero__body { grid-template-columns: minmax(0, 1fr) minmax(310px, 0.7fr); gap: 30px; }
  .feature-grid, .metric-grid, .robot-task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-grid, .cost-block, .code-layout { grid-template-columns: 1fr; }
  .cost-block { align-items: start; }
  .explainer-band .explainer-app { height: auto; min-height: 0; overflow: visible; }
}

@media (max-width: 720px) {
  .hero { min-height: 0; }
  .hero h1 { font-size: 4rem; }
  .hero__paper-title { font-size: 1.4rem; }
  .nav { align-items: flex-start; flex-direction: column; gap: 12px; }
  .nav__links { gap: 10px 16px; }
  .hero__body { min-height: 0; grid-template-columns: 1fr; gap: 34px; padding: 42px 0 52px; }
  .hero__mosaic { max-width: 560px; justify-self: start; }
  .section { padding: 58px 0; }
  .feature-grid, .metric-grid, .method-video-grid, .robot-task-grid { grid-template-columns: 1fr; }
  .analysis-grid .paper-figure img { min-height: 0; }
  .explainer-band { padding: 50px 0 56px; }
  .explainer-band__heading { align-items: flex-start; flex-direction: column; gap: 12px; }
}

@media (max-width: 470px) {
  .container, .nav, .hero__body { width: min(100% - 26px, 1180px); }
  .video-pair { grid-template-columns: 1fr; }
  .button { width: 100%; }
  .task-heading { align-items: flex-start; flex-direction: column; }
  .hero__tile figcaption { align-items: flex-start; flex-direction: column; gap: 3px; }
}

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