:root {
  --ink: #202d49;
  --muted: #576780;
  --blue: #345cd7;
  --line: #d6deee;
  --paper: #edf1fb;
  --white: #fff;
  --teal: #12857b;
  --orange: #c45d3c;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --shadow: 0 20px 50px -30px #293f7a66;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 10% 0, #e5ecff, transparent 50%),
    linear-gradient(150deg, #edf2fb, #f4f1fa);
  font:
    15px/1.6 Arial,
    Helvetica,
    sans-serif;
}
a {
  color: var(--blue);
  text-underline-offset: 4px;
}
button,
select,
input {
  font: inherit;
}
button,
select,
summary {
  cursor: pointer;
}
button {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--ink);
  background: #fff;
  font-weight: 600;
  min-height: 42px;
}
button:hover {
  border-color: var(--blue);
  background: #edf2ff;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
.primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.primary:hover {
  background: #244bbb;
  color: white;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
canvas:focus-visible {
  outline: 3px solid #c45d3c;
  outline-offset: 4px;
}
.skip {
  position: fixed;
  left: 16px;
  top: -90px;
  background: white;
  padding: 12px;
  z-index: 30;
}
.skip:focus {
  top: 15px;
}
.top {
  max-width: 1370px;
  margin: 20px auto 0;
  padding: 18px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffffbd;
  border: 1px solid white;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.brand {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.5px;
}
.brand span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin-left: 16px;
  letter-spacing: 0;
}
.top nav {
  display: flex;
  gap: 24px;
  font-size: 13px;
}
.top nav a {
  text-decoration: none;
  color: var(--muted);
}
main {
  max-width: 1320px;
  margin: auto;
  padding: 0 24px;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 55px 0 32px;
  gap: 30px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.7px;
  font: 11px/1.6 var(--mono);
  color: var(--blue);
  margin: 0 0 13px;
}
h1 {
  font-size: clamp(42px, 5.1vw, 69px);
  letter-spacing: -3.4px;
  line-height: 1.1;
  font-weight: 550;
  margin: 0 0 17px;
}
.lede {
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}
.project-stamp {
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  padding-bottom: 5px;
}
.project-stamp span {
  font: 13px var(--mono);
  color: var(--blue);
}
.project-stamp p {
  margin: 10px 0 0;
}
.lab {
  background: #ffffffc9;
  border: 1px solid white;
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
  scroll-margin-top: 15px;
}
.lab-heading {
  display: flex;
  align-items: center;
  gap: 25px;
  justify-content: space-between;
  margin-bottom: 18px;
}
.lab-heading p {
  font-size: 12px;
  color: var(--muted);
  max-width: 430px;
  margin: 0;
}
.mode-tabs {
  display: flex;
  gap: 5px;
  background: #e9eef9;
  padding: 5px;
  border-radius: 13px;
}
.mode-tabs button {
  border: 0;
  background: transparent;
  font-size: 13px;
  padding: 9px 16px;
  white-space: nowrap;
}
.mode-tabs button[aria-pressed="true"] {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 2px 7px #20376114;
}
.mode-tabs span {
  font: 10px var(--mono);
  margin-right: 7px;
  color: var(--muted);
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
}
.viewer {
  min-width: 0;
  align-self: start;
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 17px;
  overflow: hidden;
}
.scene-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.live-dot {
  width: 7px;
  height: 7px;
  background: var(--teal);
  border-radius: 100%;
}
.units {
  margin-left: auto;
  font: 10px var(--mono);
}
.canvas-wrap {
  position: relative;
  line-height: 0;
  background: #edf2fb;
}
canvas {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 840/760;
  touch-action: manipulation;
  cursor: crosshair;
}
.scene-hint {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  line-height: 1.5;
  border: 1px solid #d5deee;
  background: #ffffffec;
  border-radius: 25px;
  padding: 7px 13px;
  white-space: nowrap;
  color: var(--muted);
  pointer-events: none;
}
.compass {
  position: absolute;
  bottom: 15px;
  left: 17px;
  font: 10px/1.7 var(--mono);
  color: var(--muted);
  pointer-events: none;
}
.legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 13px 10px;
  font-size: 10px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend i {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
}
.robot-key {
  background: var(--blue);
}
.route-key {
  background: #6a7ff0;
  height: 3px !important;
  border-radius: 0 !important;
  width: 18px !important;
}
.prediction-key {
  background: var(--teal);
}
.obstacle-key {
  background: var(--orange);
}
.transport {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 13px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.transport button {
  font-size: 12px;
  padding: 9px 12px;
}
.transport label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  font-size: 11px;
}
.transport select {
  width: 57px;
  padding: 7px 4px;
}
.transport output {
  font: 11px var(--mono);
  width: 60px;
  text-align: right;
}
.inspector {
  min-width: 0;
}
.decision {
  min-height: 112px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.decision .eyebrow {
  font-size: 10px;
  margin-bottom: 6px;
}
.decision h2 {
  font-size: 23px;
  letter-spacing: -0.6px;
  line-height: 1.25;
  margin: 0 0 7px;
}
.decision p:last-child {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.metrics span {
  font-size: 10px;
  color: var(--muted);
  display: block;
}
.metrics strong {
  font: 25px/1.6 var(--mono);
  letter-spacing: -1px;
  font-weight: 500;
}
.metrics small {
  font-size: 12px;
  letter-spacing: 0;
  color: var(--muted);
}
.controls {
  padding-top: 16px;
  font-size: 12px;
}
.controls > label,
.controls details > label {
  display: block;
  font-weight: 600;
  margin: 12px 0 7px;
}
.controls label:first-child {
  margin-top: 0;
}
.select-action {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}
.select-action select {
  min-width: 0;
  flex: 1;
}
.select-action button {
  font-size: 11px;
  padding: 9px;
}
.wide {
  width: 100%;
  margin: 9px 0 4px;
  font-size: 12px;
  background: #edf2ff;
  color: var(--blue);
}
select {
  width: 100%;
  border: 1px solid var(--line);
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  min-height: 39px;
}
.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}
.slider-label label {
  font-weight: 600;
}
.slider-label output {
  font: 11px var(--mono);
  color: var(--blue);
}
input[type="range"] {
  width: 100%;
  height: 19px;
  margin: 7px 0 0;
  accent-color: var(--blue);
}
details {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 13px;
}
summary {
  font-weight: 600;
  color: var(--blue);
}
.check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 400 !important;
}
.check input {
  accent-color: var(--blue);
  width: 17px;
  height: 17px;
}
.detail-note {
  font-size: 11px;
  color: var(--muted);
}
.edit-tools {
  display: flex;
  gap: 6px;
  margin-top: 17px;
}
.edit-tools button {
  font-size: 11px;
  flex: 1;
  padding: 8px 6px;
}
.edit-tools button[aria-pressed="true"] {
  background: #fff0e8;
  border-color: var(--orange);
  color: #9b411f;
}
.text-button {
  background: transparent;
  border: 0;
  color: var(--blue);
  padding: 8px 0;
  font-size: 12px;
}
.notice {
  font-size: 11px;
  color: var(--muted);
  margin: 3px 0 0;
  min-height: 34px;
}
.lab-foot {
  display: flex;
  justify-content: space-between;
  gap: 35px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 14px;
  font-size: 11px;
  color: var(--muted);
}
.lab-foot p {
  margin: 0;
  max-width: 610px;
}
.lab-foot p:last-child {
  text-align: right;
  font-size: 10px;
  max-width: 270px;
}
.story,
.evidence {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 70px;
  padding: 80px 8px;
  border-bottom: 1px solid var(--line);
}
h2 {
  font-size: 39px;
  font-weight: 550;
  letter-spacing: -1.5px;
  line-height: 1.2;
  margin: 0 0 22px;
}
.section-label > p:last-child,
.evidence > div > p:last-child {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.85;
  max-width: 440px;
}
.explanations article {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.explanations article:first-child {
  padding-top: 0;
}
.explanations article:last-child {
  border: 0;
}
.step-number {
  font: 12px var(--mono);
  color: var(--blue);
  padding-top: 5px;
}
h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.35px;
  margin: 0 0 9px;
}
.explanations p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  margin: 0;
}
.results-panel {
  padding: 28px;
  background: #ffffffc9;
  border: 1px solid white;
  border-radius: 20px;
  box-shadow: var(--shadow);
  align-self: start;
}
.results-panel table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
.results-panel caption {
  text-align: left;
  font: 11px var(--mono);
  color: var(--muted);
  padding-bottom: 18px;
}
.results-panel th,
.results-panel td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}
.results-panel thead th {
  color: var(--blue);
  font-size: 11px;
}
.results-panel tbody th {
  font-weight: 400;
  color: var(--muted);
}
.results-panel td {
  font-family: var(--mono);
}
.results-panel p {
  font-size: 11px;
  color: var(--muted);
}
.results-panel a {
  font-size: 12px;
}
.scope {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 65px;
  padding: 45px 8px;
}
.scope p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  margin: 0;
}
footer {
  border-top: 1px solid var(--line);
  padding: 25px 8px 40px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
footer div {
  display: flex;
  gap: 22px;
}
footer p {
  margin: 0;
}
.noscript {
  background: #fff0e8;
  padding: 20px;
}
.embedded .top,
.embedded .intro,
.embedded .story,
.embedded .evidence,
.embedded .scope,
.embedded footer {
  display: none;
}
.embedded main {
  padding: 10px;
  max-width: none;
}
.embedded .lab {
  box-shadow: none;
}
.embedded body {
  background: var(--paper);
}
@media (max-width: 1050px) {
  .top {
    margin: 12px 16px 0;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 285px;
    gap: 16px;
  }
  .lab-heading {
    gap: 15px;
  }
  .lab-heading p {
    max-width: 290px;
  }
  .transport label {
    margin-left: 0;
  }
  .story,
  .evidence {
    gap: 35px;
  }
  .project-stamp {
    display: none;
  }
}
@media (max-width: 760px) {
  main {
    padding: 0 14px;
  }
  .top {
    padding: 14px 17px;
  }
  .brand {
    font-size: 16px;
  }
  .brand span {
    display: none;
  }
  .top nav {
    gap: 14px;
    font-size: 11px;
  }
  .top nav a:first-child {
    display: none;
  }
  .intro {
    padding: 34px 6px 25px;
  }
  h1 {
    font-size: 45px;
    letter-spacing: -2.2px;
  }
  .lede {
    font-size: 15px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .lab {
    padding: 12px;
    border-radius: 18px;
  }
  .lab-heading {
    display: block;
  }
  .lab-heading p {
    margin: 11px 4px 0;
    max-width: none;
    font-size: 11px;
  }
  .mode-tabs {
    width: 100%;
    justify-content: space-between;
  }
  .mode-tabs button {
    flex: 1;
    font-size: 12px;
    padding: 8px 6px;
  }
  .workspace {
    grid-template-columns: 1fr;
    gap: 23px;
  }
  .inspector {
    padding: 0 7px;
  }
  .decision {
    min-height: 0;
  }
  .metrics {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 14px 0;
  }
  .metrics span {
    font-size: 9px;
    line-height: 1.6;
    min-height: 28px;
  }
  .metrics strong {
    font-size: 22px;
  }
  .controls {
    padding-top: 13px;
  }
  .scene-hint {
    font-size: 10px;
    padding: 6px 9px;
  }
  .units {
    font-size: 8px;
  }
  .scene-bar {
    padding: 10px;
    font-size: 10px;
  }
  .legend {
    gap: 10px;
    font-size: 9px;
  }
  .transport {
    padding: 10px;
    gap: 6px;
  }
  .transport button {
    font-size: 11px;
    padding: 8px 10px;
  }
  .transport label {
    margin-left: auto;
  }
  .transport output {
    width: 53px;
  }
  .lab-foot {
    display: block;
  }
  .lab-foot p:last-child {
    text-align: left;
    margin-top: 9px;
    max-width: none;
  }
  .story,
  .evidence,
  .scope {
    grid-template-columns: 1fr;
    gap: 27px;
    padding: 45px 6px;
  }
  .story h2,
  .evidence h2 {
    font-size: 34px;
  }
  .section-label > p:last-child {
    max-width: none;
  }
  .results-panel {
    padding: 18px;
  }
  .scope {
    gap: 30px;
  }
  .results-panel th,
  .results-panel td {
    padding: 10px 5px;
    font-size: 11px;
  }
  footer {
    display: block;
    padding: 22px 6px 30px;
  }
  footer div {
    margin-top: 16px;
  }
  .embedded main {
    padding: 4px;
  }
}
.viewer {
  display: flex;
  flex-direction: column;
}
.scene-bar {
  order: 0;
}
.transport {
  order: 1;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}
.canvas-wrap {
  order: 2;
}
.legend {
  order: 3;
}
@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .lab-heading p {
    max-width: none;
  }
  .metrics {
    grid-template-columns: repeat(4, 1fr);
  }
  .decision {
    min-height: 0;
  }
  .inspector {
    padding: 0 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Portfolio presentation: content and controls, without decorative depth. */
:root { --paper:#f3f5f6; --ink:#172b3a; --muted:#475967; --line:#c5cfd5; --shadow:none; }
body { background:var(--paper); font:16px/1.65 'Segoe UI',Arial,sans-serif; }
.top { margin:0 auto; background:#fff; border:0; border-bottom:1px solid var(--line); border-radius:0; box-shadow:none; gap:20px; }
.top nav { font-size:14px; flex-wrap:wrap; }
.top nav a { display:inline-flex; align-items:center; min-height:44px; text-decoration:underline; }
.brand { font-size:20px; }
.brand span { font-size:12px; }
.intro { padding:38px 0 28px; }
h1 { font-size:clamp(38px,4.2vw,58px); letter-spacing:-1.8px; overflow-wrap:anywhere; }
.eyebrow { font:13px/1.5 'Segoe UI',Arial,sans-serif; text-transform:none; letter-spacing:.3px; }
.project-stamp,.project-stamp span { font-size:13px; }
.lab,.results-panel { background:#fff; border:1px solid var(--line); border-radius:4px; box-shadow:none; }
.viewer,.mode-tabs { border-radius:3px; }
.viewer { background:#f7f9fa; }
.mode-tabs { background:#e8edf0; }
.mode-tabs button { min-height:44px; font-size:14px; border-radius:2px; }
.mode-tabs button[aria-pressed="true"] { box-shadow:none; outline:1px solid var(--line); }
.mode-tabs span { display:none; }
.lab-heading p,.scene-bar,.units,.legend,.compass { font-size:13px; }
.scene-hint { font-size:12px; border-radius:3px; background:#fff; max-width:calc(100% - 24px); white-space:normal; text-align:center; }
.decision .eyebrow,.decision p:last-child,.metrics span,.controls,.detail-note,.notice { font-size:13px; }
.controls select { min-height:44px; font-size:16px; }
button,select { border-radius:3px; min-height:44px; }
.transport button,.transport label,.transport output,.transport select,.select-action button,.wide,.edit-tools button,.text-button { font-size:13px; min-height:44px; }
.transport select { width:auto; min-width:65px; }
.transport output { display:flex; align-items:center; justify-content:end; }
.slider-label output { font-size:13px; }
input[type="range"] { height:36px; }
.check { min-height:36px; }
.check input { height:20px; width:20px; flex-shrink:0; }
.lab-foot,.lab-foot p:last-child,.results-panel p,.results-panel a,.results-panel caption,.results-panel thead th,footer { font-size:13px; }
.results-panel table { font-size:13px; }
.scope p,.explanations p { font-size:16px; }
.lab-jumps { display:flex; gap:8px 22px; flex-wrap:wrap; margin:0 0 16px; font-size:13px; }
.lab-jumps a { display:inline-flex; min-height:36px; align-items:center; }
.intro>div,.story>div,.evidence>div,.scope>div { min-width:0; }
.results-panel { min-width:0; max-width:100%; }
@media(max-width:1050px) {
  .intro { display:block; }
  .project-stamp { display:block; text-align:left; margin-top:14px; }
  .project-stamp p { margin-top:4px; }
}
@media(max-width:760px) {
  .top { margin:0; padding:14px 18px 8px; display:block; }
  .top nav { gap:4px 20px; margin-top:5px; font-size:14px; }
  .top nav a:first-child { display:inline-flex; }
  .brand { font-size:19px; }
  .intro { padding:28px 0 22px; }
  .lede { font-size:16px; }
  .lab { padding:12px; border-radius:3px; }
  .mode-tabs button { font-size:14px; padding:10px 8px; }
  .lab-heading p,.scene-bar,.units,.legend,.scene-hint { font-size:12px; }
  .scene-bar { flex-wrap:wrap; gap:7px; }
  .units { margin-left:0; }
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
  .metrics span { font-size:13px; min-height:0; }
  .transport button,.transport label { font-size:13px; }
  .transport label { margin-left:0; }
  .results-panel { padding:16px; overflow-x:auto; }
  .results-panel th,.results-panel td { font-size:13px; }
  .workspace,.story,.evidence,.scope { grid-template-columns:minmax(0,1fr); }
  .mode-tabs,.select-action,.edit-tools,.slider-label { flex-wrap:wrap; }
  .mode-tabs button { min-width:0; white-space:normal; overflow-wrap:anywhere; }
  .select-action select { flex-basis:180px; max-width:100%; }
  .select-action button,.edit-tools button { min-width:0; overflow-wrap:anywhere; }
  .transport output { width:auto; min-width:60px; max-width:100%; }
  .results-panel { width:100%; }
  .results-panel p,.results-panel a,.scope p,.explanations p { overflow-wrap:anywhere; }
  footer div { flex-wrap:wrap; }
}
