:root {
  color-scheme: light;
  --ink: #182033;
  --muted: #5f6878;
  --line: #d9dee8;
  --soft: #f5f7fa;
  --paper: #ffffff;
  --env: #2e7d5b;
  --ent: #2f5aa8;
  --act: #b75c1b;
  --inf: #7b3fa0;
  --env-tint: #edf6f1;
  --ent-tint: #edf2fa;
  --act-tint: #fff2e8;
  --inf-tint: #f4edf8;
  --shadow: 0 16px 38px rgba(24, 32, 51, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img, video { display: block; max-width: 100%; }
main { overflow: hidden; }
h1, h2, h3, h4, p { margin-top: 0; }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  border-bottom: 1px solid rgba(217, 222, 232, 0.9);
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}
.wordmark { color: var(--ink); font-size: 15px; font-weight: 900; }
.site-nav nav { display: flex; gap: 22px; }
.site-nav nav a { color: var(--muted); font-size: 13px; font-weight: 750; }
.site-nav nav a:hover { color: var(--ent); }

.hero, .section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0;
}
.hero { padding-top: 64px; }
.hero-copy { max-width: 1060px; margin: 0 auto 42px; text-align: center; }
.kicker, .eyebrow {
  margin-bottom: 10px;
  color: var(--ent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1 {
  margin-bottom: 3px;
  font-size: clamp(52px, 8vw, 92px);
  line-height: 0.98;
  letter-spacing: 0;
}
.paper-title {
  max-width: 1040px;
  margin: 0 auto 18px;
  font-size: clamp(24px, 3.2vw, 40px);
  font-weight: 760;
  line-height: 1.14;
}
.hero-claim {
  max-width: 1120px;
  margin: 0 auto 20px;
  color: var(--muted);
  font-size: 17px;
}
.authors { margin-bottom: 2px; font-size: 16px; font-weight: 760; }
.affiliation { margin-bottom: 24px; color: var(--muted); font-size: 14px; }
.resource-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 13px;
  background: #fff;
  font-size: 13px;
  font-weight: 780;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.button:hover { border-color: rgba(47, 90, 168, 0.55); box-shadow: 0 8px 20px rgba(24, 32, 51, 0.08); transform: translateY(-1px); }
.button.primary { border-color: var(--ent); background: var(--ent); color: #fff; }
.button small { border-radius: 999px; padding: 2px 6px; background: var(--ent-tint); color: var(--ent); font-size: 10px; }
.button.primary small { background: rgba(255, 255, 255, 0.18); color: #fff; }
.button.disabled { cursor: default; }

.overview-figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
}
figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; text-align: center; }

.thesis-band, .relation-band {
  padding: 72px max(20px, calc((100% - 1180px) / 2));
  background: #f4f6f9;
}
.section-heading { max-width: 820px; margin-bottom: 32px; }
.section-heading.centered { margin-right: auto; margin-left: auto; text-align: center; }
.section-heading h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4.1vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}
.section-heading p:not(.eyebrow) { margin-bottom: 0; color: var(--muted); font-size: 17px; }
.compact-heading { margin-bottom: 34px; }
.thesis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.thesis-grid article { min-height: 190px; padding: 28px; background: #fff; }
.thesis-grid article > span { color: var(--ent); font-size: 12px; font-weight: 900; }
.thesis-grid h3 { margin: 28px 0 8px; font-size: 20px; }
.thesis-grid p { margin: 0; color: var(--muted); font-size: 14px; }

.lifecycle-shell { border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.lifecycle-tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.lifecycle-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 58px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 10px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}
.lifecycle-tab:last-child { border-right: 0; }
.lifecycle-tab span { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 50%; font-size: 10px; }
.lifecycle-tab.active { box-shadow: inset 0 -3px var(--ent); color: var(--ent); background: var(--ent-tint); }
.lifecycle-tab.active span { border-color: var(--ent); background: var(--ent); color: #fff; }
.lifecycle-panel { display: grid; grid-template-columns: 0.9fr 1.1fr; min-height: 430px; }
.phase-copy { display: flex; flex-direction: column; justify-content: center; padding: 42px; }
.phase-time { margin-bottom: 13px; color: var(--ent); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.phase-copy h3 { margin-bottom: 13px; font-size: 29px; line-height: 1.16; }
.phase-copy > p:not(.phase-time) { color: var(--muted); }
.phase-evidence { display: grid; gap: 8px; margin: 18px 0 24px; padding: 0; list-style: none; }
.phase-evidence li { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 680; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.env { background: var(--env); }.dot.ent { background: var(--ent); }.dot.act { background: var(--act); }.dot.inf { background: var(--inf); }
.text-button, .json-button {
  align-self: flex-start;
  border: 0;
  border-bottom: 1px solid var(--ent);
  padding: 4px 0;
  background: transparent;
  color: var(--ent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}
.text-button span { margin-left: 5px; }
.phase-visual { display: flex; flex-direction: column; justify-content: center; gap: 14px; border-left: 1px solid var(--line); padding: 34px; background: var(--soft); }
.observation-window { position: relative; overflow: hidden; border-radius: 6px; aspect-ratio: 16 / 8.5; background: #111827; }
.observation-window img { width: 100%; height: 100%; object-fit: cover; }
.time-code { position: absolute; right: 9px; bottom: 9px; border-radius: 4px; padding: 4px 7px; background: rgba(10, 16, 28, 0.8); color: #fff; font-size: 11px; font-weight: 800; }
.typed-output { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.output-row { min-height: 76px; border-top: 3px solid; padding: 10px; background: #fff; }
.output-row span { display: block; margin-bottom: 5px; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.output-row strong { display: block; font-size: 12px; line-height: 1.35; }
.output-row.env { border-color: var(--env); }.output-row.env span { color: var(--env); }
.output-row.ent { border-color: var(--ent); }.output-row.ent span { color: var(--ent); }
.output-row.act { border-color: var(--act); }.output-row.act span { color: var(--act); }
.edit-ledger { display: grid; gap: 10px; }
.edit-ledger > div { display: grid; grid-template-columns: 82px 1fr; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 13px; background: #fff; }
.edit-ledger p { margin: 0; font-size: 13px; }
.op { font-size: 10px; font-weight: 900; }.op.update { color: var(--ent); }.op.add { color: var(--env); }
.episode-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.episode-row div { border: 1px solid var(--line); border-radius: 6px; padding: 12px; background: #fff; }
.episode-row small { color: var(--muted); font-size: 10px; font-weight: 800; }
.episode-row p { margin: 8px 0 0; font-size: 12px; font-weight: 750; }
.consolidated-card { border-left: 4px solid var(--inf); border-radius: 6px; padding: 18px; background: var(--inf-tint); }
.consolidated-card span { color: var(--inf); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.consolidated-card h4 { margin: 6px 0 3px; font-size: 19px; }.consolidated-card p { margin: 0; color: var(--muted); font-size: 13px; }
.tool-chain { display: grid; gap: 10px; }.tool-chain > span { color: var(--muted); text-align: center; }
.tool-chain code { border: 1px solid var(--line); border-radius: 6px; padding: 13px; background: #fff; color: var(--ent); font-size: 12px; }
.mini-plan { border-left: 4px solid var(--act); padding: 16px; background: var(--act-tint); }.mini-plan p { margin: 4px 0 0; font-size: 13px; }
.store-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 20px; gap: 10px; }
.store-strip article { min-height: 106px; border: 1px solid var(--line); border-top: 4px solid; border-radius: 6px; padding: 14px; }
.store-strip article > span { font-size: 13px; font-weight: 850; }.store-strip p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.store-strip .env { border-top-color: var(--env); }.store-strip .ent { border-top-color: var(--ent); }.store-strip .act { border-top-color: var(--act); }.store-strip .inf { border-top-color: var(--inf); }

.planning-section { width: 100%; padding-right: max(20px, calc((100% - 1180px) / 2)); padding-left: max(20px, calc((100% - 1180px) / 2)); background: #f7f8fa; }
.planning-case { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.goal-row { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 20px 24px; }
.goal-row span { color: var(--ent); font-size: 11px; font-weight: 900; text-transform: uppercase; }.goal-row strong { font-size: 18px; }
.planning-flow { display: grid; grid-template-columns: 0.92fr 1.08fr; }
.retrieval-column, .plan-column { padding: 28px; }.plan-column { border-left: 1px solid var(--line); }
.flow-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.flow-heading > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ent); color: #fff; font-size: 11px; font-weight: 900; }
.flow-heading small { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }.flow-heading h3 { margin: 0; font-size: 18px; }
.query-list { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.query-list span { border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 800; }
.query-list .env { background: var(--env-tint); color: var(--env); }.query-list .ent { background: var(--ent-tint); color: var(--ent); }.query-list .act { background: var(--act-tint); color: var(--act); }.query-list .inf { background: var(--inf-tint); color: var(--inf); }
.evidence-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.memory-card { min-height: 124px; border: 1px solid var(--line); border-left: 4px solid; border-radius: 5px; padding: 13px; }
.memory-card span { font-size: 10px; font-weight: 900; text-transform: uppercase; }.memory-card p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.memory-card.env { border-left-color: var(--env); }.memory-card.env span { color: var(--env); }.memory-card.ent { border-left-color: var(--ent); }.memory-card.ent span { color: var(--ent); }.memory-card.act { border-left-color: var(--act); }.memory-card.act span { color: var(--act); }.memory-card.inf { border-left-color: var(--inf); }.memory-card.inf span { color: var(--inf); }
.long-plan { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 20px; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: plan; }
.long-plan li { position: relative; min-height: 45px; padding: 8px 8px 8px 35px; border-bottom: 1px solid #e8ebf0; font-size: 12px; counter-increment: plan; }
.long-plan li::before { position: absolute; top: 8px; left: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--act-tint); color: var(--act); font-size: 10px; font-weight: 900; content: counter(plan); }
.plan-rationale { margin: 15px 0 0; border-left: 3px solid var(--act); padding-left: 12px; color: var(--muted); font-size: 13px; }
.plan-provenance { display: grid; gap: 7px; }
.plan-provenance[hidden] { display: none; }
.plan-provenance p { margin: 0 0 3px; }
.plan-provenance code {
  display: block;
  border-radius: 4px;
  padding: 7px 9px;
  background: var(--inf-tint);
  color: var(--inf);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.task-switch { display: flex; justify-content: center; gap: 4px; margin-bottom: 20px; }
.task-switch button { border: 1px solid var(--line); padding: 9px 16px; background: #fff; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 800; }
.task-switch button:first-child { border-radius: 6px 0 0 6px; }.task-switch button:last-child { border-radius: 0 6px 6px 0; }
.task-switch button.active { border-color: var(--ent); background: var(--ent); color: #fff; }
.robot-demo { display: grid; grid-template-columns: 1fr 0.82fr 1fr; gap: 12px; align-items: stretch; }
.robot-demo[hidden] { display: none; }
.video-panel, .compact-plan { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.panel-head { display: flex; align-items: center; justify-content: space-between; min-height: 46px; border-bottom: 1px solid var(--line); padding: 10px 13px; }
.panel-head span { font-size: 13px; font-weight: 850; }.panel-head small { color: var(--muted); font-size: 10px; font-weight: 800; }
.video-panel video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #111827; }
.compact-plan { display: flex; flex-direction: column; }.compact-plan ol { display: grid; gap: 9px; margin: 0; padding: 18px 18px 10px 46px; font-size: 13px; }.compact-plan .json-button { margin: auto 18px 18px; }

.benchmark-section { width: 100%; padding-right: max(20px, calc((100% - 1180px) / 2)); padding-left: max(20px, calc((100% - 1180px) / 2)); background: #f4f6f9; }
.benchmark-protocols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.benchmark-protocols article { border: 1px solid var(--line); border-radius: 8px; padding: 24px; background: #fff; }
.protocol-label { margin-bottom: 8px; color: var(--ent); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.benchmark-protocols h3 { margin-bottom: 16px; font-size: 20px; }
.example-question { min-height: 54px; margin-bottom: 14px; font-size: 15px; font-weight: 780; }
.choice-list { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }.choice-list span { border: 1px solid var(--line); border-radius: 4px; padding: 7px; color: var(--muted); font-size: 11px; }.choice-list .correct { border-color: rgba(46, 125, 91, 0.45); background: var(--env-tint); color: var(--env); font-weight: 850; }
.tool-trace { display: grid; gap: 6px; }.tool-trace code { border-left: 3px solid var(--inf); padding: 8px 10px; background: var(--inf-tint); color: var(--inf); font-size: 11px; }
.protocol-result { margin: 15px 0 0; color: var(--muted); font-size: 12px; }
.benchmark-stats { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 14px; border: 1px solid var(--line); background: var(--line); gap: 1px; }
.benchmark-stats div { padding: 18px 10px; background: #fff; text-align: center; }.benchmark-stats strong { display: block; font-size: 24px; }.benchmark-stats span { color: var(--muted); font-size: 11px; }

.result-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.result-metrics article { min-height: 150px; border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.result-metrics strong { display: block; margin-bottom: 14px; color: var(--ent); font-size: 36px; line-height: 1; }.result-metrics span { color: var(--muted); font-size: 13px; }
.results-figures { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }.results-figures figure { margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }

.relation-flow { display: grid; grid-template-columns: 1fr 50px 1fr; align-items: center; max-width: 1000px; margin: 0 auto; }
.relation-flow article { min-height: 180px; border: 1px solid var(--line); padding: 26px; background: #fff; }.relation-flow article > span { color: var(--ent); font-size: 11px; font-weight: 900; text-transform: uppercase; }.relation-flow strong { display: block; margin: 20px 0 8px; font-size: 19px; }.relation-flow p { margin: 0; color: var(--muted); font-size: 13px; }.plus { color: var(--ent); font-size: 26px; font-weight: 600; text-align: center; }

.resource-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.resource-grid > * { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 78px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; font-weight: 850; }.resource-grid small { margin-top: 4px; color: var(--muted); font-size: 10px; }.resource-grid a:hover { border-color: var(--ent); color: var(--ent); }
.citation { margin-top: 20px; border: 1px solid var(--line); border-radius: 8px; }.citation > div { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 12px 16px; }.citation h3 { margin: 0; font-size: 15px; }.citation button { border: 0; background: transparent; color: var(--ent); cursor: pointer; font-size: 12px; font-weight: 850; }.citation pre { overflow-x: auto; margin: 0; padding: 16px; background: var(--soft); color: #30394b; font-size: 12px; }

dialog { width: min(760px, calc(100% - 32px)); max-height: 80vh; border: 0; border-radius: 8px; padding: 0; background: #131b2c; color: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(10, 15, 25, 0.62); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.14); padding: 15px 18px; }.dialog-head small { color: #aeb8cb; font-size: 10px; font-weight: 800; text-transform: uppercase; }.dialog-head h3 { margin: 2px 0 0; font-size: 18px; }.dialog-head button { width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: transparent; color: #fff; cursor: pointer; font-size: 22px; line-height: 1; }
dialog pre { overflow: auto; max-height: 62vh; margin: 0; padding: 20px; color: #f1f5fb; font-size: 12px; line-height: 1.55; }
footer { border-top: 1px solid var(--line); padding: 25px; color: var(--muted); font-size: 12px; text-align: center; } footer p { margin: 0; }

@media (max-width: 900px) {
  .site-nav nav { display: none; }
  .hero, .section { width: min(100% - 28px, 760px); padding: 56px 0; }
  .paper-title { font-size: 27px; }
  .thesis-grid, .benchmark-protocols, .results-figures { grid-template-columns: 1fr; }
  .lifecycle-tabs { grid-template-columns: 1fr 1fr; }
  .lifecycle-tab:nth-child(2) { border-right: 0; }.lifecycle-tab:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .lifecycle-panel, .planning-flow { grid-template-columns: 1fr; }
  .phase-visual, .plan-column { border-top: 1px solid var(--line); border-left: 0; }
  .store-strip { grid-template-columns: 1fr 1fr; }
  .robot-demo { grid-template-columns: 1fr; }
  .compact-plan { min-height: 280px; }
  .benchmark-stats { grid-template-columns: 1fr 1fr; }
  .benchmark-stats div:last-child { grid-column: 1 / -1; }
  .result-metrics { grid-template-columns: 1fr; }
  .relation-flow { grid-template-columns: 1fr; gap: 10px; }.plus { transform: rotate(90deg); }
  .resource-grid { grid-template-columns: 1fr 1fr; }.resource-grid > *:last-child { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .site-nav { padding: 0 16px; }
  h1 { font-size: 54px; }
  .paper-title { font-size: 22px; }
  .hero-claim { font-size: 15px; }
  .section-heading h2 { font-size: 31px; }
  .thesis-band, .relation-band, .planning-section, .benchmark-section { padding-right: 14px; padding-left: 14px; }
  .lifecycle-tabs { grid-template-columns: 1fr; }
  .lifecycle-tab { justify-content: flex-start; border-right: 0; border-bottom: 1px solid var(--line); padding-left: 18px; }
  .phase-copy, .phase-visual, .retrieval-column, .plan-column { padding: 22px; }
  .typed-output, .episode-row, .store-strip, .evidence-stack, .long-plan, .choice-list { grid-template-columns: 1fr; }
  .goal-row { grid-template-columns: 1fr; }
  .benchmark-stats, .resource-grid { grid-template-columns: 1fr; }
  .benchmark-stats div:last-child, .resource-grid > *:last-child { grid-column: auto; }
  .result-metrics article { min-height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
