@font-face {
  font-family: "Source Sans 3";
  src: url("source-sans-3.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}
/* Palette from lerobot/visualize_dataset (src/app/globals.css). */
:root {
  color-scheme: light dark;
  --bg: light-dark(#ffffff, #0b0f19);
  --surface-0: light-dark(#ffffff, #0b0f19);
  --surface-1: light-dark(#f9fafb, #101623);
  --surface-2: light-dark(#f3f4f6, #141c2e);
  --fg: light-dark(#111827, #e5e7eb);
  --fg-soft: light-dark(#374151, #d1d5db);
  --fg-muted: light-dark(#6b7280, #9ca3af);
  --fg-faint: light-dark(#9ca3af, #6b7280);
  --line: light-dark(#e5e7eb, #1f2937);
  --line-subtle: light-dark(#f3f4f6, #141c2e);
  --line-strong: light-dark(#d1d5db, #374151);
  --fill: light-dark(rgba(17, 24, 39, 0.04), rgba(255, 255, 255, 0.05));
  --fill-strong: light-dark(rgba(17, 24, 39, 0.08), rgba(255, 255, 255, 0.1));
  --accent: #ff9d00;
  --accent-soft: rgba(255, 157, 0, 0.16);
  --accent-ring: rgba(255, 157, 0, 0.5);
  --accent-fg: light-dark(#a86200, #ffb13d);
  --critical-fg: light-dark(#b91c1c, #f87171);
  --scrollbar: light-dark(rgba(17, 24, 39, 0.14), rgba(255, 255, 255, 0.06));
  --scrollbar-hover: light-dark(
    rgba(17, 24, 39, 0.24),
    rgba(255, 255, 255, 0.12)
  );
  --ink: var(--fg);
  --muted: var(--fg-muted);
  --paper: var(--bg);
  --mint: var(--accent-soft);
  --green: var(--accent);
  --mono: "Source Sans 3", system-ui, sans-serif;
  --radius: 6px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 14px;
}
.shell {
  max-width: 1280px;
  margin: auto;
  padding: 0 42px;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface-0);
  color: var(--ink);
  border-radius: 7px;
  padding: 8px 11px;
  transition:
    background 0.12s,
    transform 0.12s;
}
button:hover:not(:disabled) {
  background: var(--surface-1);
  border-color: var(--line);
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent-ring);
  outline-offset: 3px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
}
.brand strong {
  font-weight: 700;
}
.brand > span:last-child {
  font-size: 15px;
  color: var(--fg-muted);
}
.brand-mark {
  font-size: 27px;
}
.divider {
  height: 18px;
  width: 1px;
  background: var(--surface-1);
  margin: 0 5px;
}
.source-link {
  font-size: 12px;
  color: var(--fg-muted);
}
.source-link span {
  margin-left: 8px;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 39px 0 30px;
  gap: 30px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--fg-muted);
  font-weight: 500;
  margin: 0 0 12px;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 15px;
  font-weight: 500;
}
h1 span {
  color: var(--fg-muted);
}
.subtitle {
  max-width: 580px;
  line-height: 1.65;
  color: var(--fg-muted);
  font-size: 14px;
  margin-bottom: 0;
}
.runtime-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 270px;
  padding-bottom: 2px;
}
.runtime-tags span {
  font-family: var(--mono);
  font-size: 9px;
  border: 1px solid var(--line);
  padding: 7px 9px;
  border-radius: 4px;
  white-space: nowrap;
}
.runtime-tags i {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--surface-1);
  border-radius: 50%;
  margin-right: 4px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr);
  gap: 22px;
}
.simulation,
.mission,
.wrist-panel,
.controls {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-0);
}
.panel-heading {
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  font-size: 11px;
}
.view-label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.mono {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.7px;
  color: var(--fg-muted);
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--surface-1);
}
.live-dot.connected {
  background: var(--surface-1);
  box-shadow: 0 0 0 3px var(--fill-strong);
}
.viewport {
  position: relative;
  background: var(--surface-1);
  aspect-ratio: 4/3;
  outline: none;
  overflow: hidden;
}
.viewport:focus {
  box-shadow: inset 0 0 0 3px var(--fill-strong);
}
.viewport:focus:after {
  pointer-events: none;
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  border: 3px solid var(--line);
}
.viewport > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.view-stamp {
  position: absolute;
  top: 15px;
  left: 15px;
  font-family: var(--mono);
  font-size: 9px;
  color: white;
  letter-spacing: 1px;
  background: #11182780;
  padding: 6px 8px;
  border-radius: 3px;
  pointer-events: none;
}
.view-stamp span {
  margin-left: 13px;
  opacity: 0.7;
}
.view-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 21px 15px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  background: linear-gradient(transparent, #11182780);
  font-size: 9px;
  pointer-events: none;
}
.view-bottom .mono {
  color: #fff;
}
.start-overlay {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--surface-0) 70%, transparent);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.start-overlay[hidden] {
  display: none;
}
.start-overlay > div {
  padding: 27px;
  background: var(--surface-0);
  box-shadow: 0 12px 60px var(--fill-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 310px;
}
.overlay-icon {
  display: block;
  margin-bottom: 13px;
  font-size: 28px;
  color: var(--fg-muted);
}
.start-overlay h2 {
  font-family: "Source Sans 3", sans-serif;
  font-size: 25px;
  letter-spacing: -0.9px;
  margin-bottom: 8px;
  font-weight: 500;
}
.start-overlay p {
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 23px;
}
.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  padding: 13px 17px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.primary:hover:not(:disabled) {
  background: var(--surface-1);
  color: white;
}
.start-overlay small {
  display: block;
  margin-top: 13px;
  font-size: 8px;
  color: var(--fg-muted);
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}
.toolbar button {
  font-size: 10px;
  padding: 7px 9px;
}
.toolbar button span {
  margin-left: 4px;
}
.seed-control {
  display: flex;
  align-items: center;
  gap: 7px;
}
.seed-control label {
  font-size: 10px;
  color: var(--fg-muted);
  margin-right: 2px;
}
#seed {
  width: 55px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 5px;
  font-family: var(--mono);
  font-size: 10px;
  background: var(--surface-1);
  appearance: textfield;
}
#seed::-webkit-inner-spin-button {
  appearance: none;
}
.joint-panel {
  padding: 17px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.section-title h2 {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 0;
}
.section-title > span {
  font-size: 9px;
  color: var(--fg-muted);
}
.joint-sliders {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px 20px;
  margin-top: 20px;
}
.joint label {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--fg-muted);
  gap: 8px;
}
.joint output {
  font-family: var(--mono);
  color: var(--fg-muted);
  white-space: nowrap;
}
.joint input {
  display: block;
  width: 100%;
  height: 3px;
  margin: 12px 0 3px;
  accent-color: var(--accent);
  cursor: pointer;
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 17px;
}
.mission {
  background: var(--surface-1);
  padding: 18px 19px;
  border-color: var(--line);
}
.mission-main {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 17px 0 15px;
}
#cube-count {
  font-family: "Source Sans 3", sans-serif;
  font-size: 39px;
  line-height: 1;
  letter-spacing: -2px;
  white-space: nowrap;
}
#cube-count > span {
  color: var(--fg-muted);
  font-size: 23px;
  letter-spacing: -1px;
  margin-left: 4px;
}
.mission-main strong {
  font-size: 11px;
  font-weight: 550;
}
.mission-main p {
  font-size: 10px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin: 4px 0 0;
  max-width: 180px;
}
.progress-track {
  height: 3px;
  border-radius: 3px;
  background: var(--surface-1);
}
#progress {
  height: 100%;
  background: var(--surface-1);
  width: 0;
  transition: width 0.3s;
}
.wrist-panel .panel-heading {
  height: 37px;
  font-size: 10px;
}
.wrist-view {
  position: relative;
  aspect-ratio: 16/8.5;
  background: var(--surface-1);
  overflow: hidden;
}
.wrist-view img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wrist-badge {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1px;
  color: white;
  padding: 4px 6px;
  border-radius: 3px;
  background: #11182780;
}
.controls {
  padding: 17px 18px;
  flex: 1;
}
.precision {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: var(--fg-muted);
  white-space: nowrap;
}
.precision input {
  accent-color: var(--accent);
  width: 12px;
  height: 12px;
  margin: 0;
}
.control-intro {
  font-size: 9px;
  color: var(--fg-muted);
  margin: 9px 0 16px;
}
.movement-layout {
  display: flex;
  justify-content: center;
  gap: 20px;
  align-items: center;
}
.keypad {
  text-align: center;
}
.keypad > div {
  display: flex;
  gap: 5px;
  margin-top: 5px;
}
.keypad button,
.vertical button {
  width: 57px;
  min-height: 47px;
  padding: 7px 5px;
  background: var(--surface-1);
  border-color: var(--line);
}
.keypad button > span,
.vertical button > span {
  display: block;
  font-size: 8px;
  color: var(--fg-muted);
  margin-top: 4px;
}
kbd {
  font: 11px var(--mono);
  font-weight: 500;
}
.keypad > button {
  margin: auto;
}
.vertical {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.wrist-controls {
  display: flex;
  gap: 16px;
  margin-top: 18px;
  justify-content: space-between;
}
.wrist-controls > div {
  display: flex;
  align-items: center;
  gap: 4px;
}
.wrist-controls span {
  font-size: 9px;
  color: var(--fg-muted);
  margin-right: 4px;
}
.wrist-controls button {
  padding: 4px 9px;
  background: var(--surface-1);
}
.wrist-controls kbd {
  font-size: 10px;
}
button.pressed {
  background: var(--surface-1);
  border-color: var(--line) !important;
  box-shadow: inset 0 1px 3px var(--fill-strong);
}
.gripper {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 17px;
  background: var(--surface-1);
  border-color: var(--line);
  padding: 10px;
  font-size: 10px;
}
.gripper strong {
  font-size: 10px;
  font-weight: 500;
}
.gripper kbd {
  font-size: 8px;
  color: var(--fg-muted);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  padding: 3px 4px;
  border-radius: 3px;
  margin-left: auto;
}
.gripper-icon {
  font-size: 16px;
  color: var(--fg-muted);
}
.tip {
  font-size: 9px;
  line-height: 1.65;
  color: var(--fg-muted);
  margin: 13px 0 0;
  display: flex;
  gap: 8px;
}
.tip > span {
  font-size: 16px;
  color: var(--fg-muted);
}
.status {
  text-align: center;
  font-size: 10px;
  color: var(--fg-muted);
  margin: 18px 0 0;
  min-height: 16px;
}
.status.error {
  color: var(--critical-fg);
}
.about {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 70px;
  padding: 44px 0 36px;
  border-top: 1px solid var(--line);
  margin-top: 35px;
}
.about h2 {
  font-family: "Source Sans 3", sans-serif;
  font-weight: 500;
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: -1px;
  margin: 0;
}
.about > div > p:not(.eyebrow) {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.85;
  margin: 0 0 12px;
}
.about a {
  font-size: 11px;
  color: var(--fg-muted);
  display: inline-block;
}
.about a > span {
  margin-left: 9px;
}
details {
  margin-top: 18px;
  font-size: 11px;
  color: var(--fg-muted);
}
summary {
  cursor: pointer;
}
pre {
  font: 10px/1.8 var(--mono);
  background: var(--surface-1);
  padding: 15px;
  white-space: pre-wrap;
  border-radius: 6px;
  color: var(--fg-soft);
}
details p {
  font-size: 10px;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 0 28px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  color: var(--fg-muted);
}
footer > div {
  display: flex;
  align-items: center;
  gap: 18px;
}
.footer-dot {
  margin: 0 7px;
}
footer button {
  font-size: 9px;
  background: transparent;
  padding: 4px 7px;
}
footer button[hidden] {
  display: none;
}
@media (min-width: 1400px) {
  .shell {
    max-width: 1280px;
  }
}
@media (max-width: 960px) {
  .shell {
    padding: 0 22px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 15px;
  }
  h1 {
    font-size: 37px;
  }
  .runtime-tags {
    max-width: 210px;
  }
  .joint-sliders {
    gap: 15px 12px;
  }
  .toolbar {
    padding: 11px 8px;
  }
  .toolbar button span {
    display: none;
  }
  .keypad button,
  .vertical button {
    width: 49px;
  }
  .movement-layout {
    gap: 12px;
  }
  .vertical {
    padding-left: 12px;
  }
  .controls {
    padding: 16px 12px;
  }
  .wrist-controls {
    gap: 5px;
  }
  .wrist-controls button {
    padding: 4px 7px;
  }
}
@media (max-width: 720px) {
  .shell {
    padding: 0 17px;
  }
  .topbar {
    height: 70px;
  }
  .source-link {
    font-size: 10px;
  }
  .intro {
    padding: 29px 0 23px;
    display: block;
  }
  h1 {
    font-size: 34px;
  }
  .subtitle {
    font-size: 13px;
  }
  .runtime-tags {
    max-width: none;
    justify-content: flex-start;
    margin-top: 17px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
  }
  .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .mission {
    padding: 15px;
    grid-column: 1;
  }
  .wrist-panel {
    grid-column: 2;
  }
  .mission-main {
    gap: 11px;
  }
  #cube-count {
    font-size: 33px;
  }
  .mission-main p {
    font-size: 9px;
  }
  .wrist-view {
    aspect-ratio: auto;
    height: calc(100% - 37px);
    min-height: 94px;
  }
  .controls {
    grid-column: 1/-1;
    padding: 20px;
  }
  .movement-layout {
    gap: 30px;
  }
  .keypad button,
  .vertical button {
    width: 65px;
  }
  .wrist-controls {
    justify-content: center;
    gap: 30px;
  }
  .joint-sliders {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .about {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 30px 0;
    margin-top: 25px;
  }
  .about h2 br {
    display: none;
  }
  .about h2 {
    font-size: 24px;
  }
  .brand {
    font-size: 15px;
    gap: 7px;
  }
  .brand > span:last-child {
    font-size: 12px;
  }
  .start-overlay > div {
    padding: 22px;
    max-width: 280px;
  }
  .control-intro {
    text-align: center;
  }
  footer {
    align-items: flex-start;
  }
  .status {
    line-height: 1.5;
  }
  .runtime-tags span {
    font-size: 8px;
  }
}

.brand-mark {
  width: 35px;
  height: 27px;
  object-fit: contain;
}

.status:empty {
  display: none;
}
.about {
  padding-top: 28px;
}

#disconnect {
  width: 100%;
  margin-top: 12px;
}
#disconnect[hidden] {
  display: none;
}

/* Controls use the visualizer's neutral fills and orange accent. */
button {
  background: var(--fill);
  color: var(--fg-soft);
  border-color: var(--line);
}
button:hover:not(:disabled) {
  background: var(--fill-strong);
  color: var(--fg);
  border-color: var(--line-strong);
}
.primary {
  background: var(--accent);
  color: #111827;
  border-color: var(--accent);
}
.primary:hover:not(:disabled) {
  background: var(--accent);
  color: #111827;
  filter: brightness(1.06);
}
a:hover {
  color: var(--accent-fg);
}
pre {
  background: var(--surface-1);
  color: var(--fg-soft);
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: var(--scrollbar);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-hover);
  background-clip: padding-box;
}

.simulation,
.wrist-panel,
.controls,
.mission {
  background: var(--surface-1);
  border-radius: var(--radius);
}
.keypad button,
.vertical button,
.wrist-controls button,
.gripper {
  background: var(--fill);
  border-color: var(--line);
}
button.pressed {
  background: var(--accent-soft) !important;
  border-color: var(--accent) !important;
  color: var(--accent-fg);
}
.joint-slider input {
  accent-color: var(--accent);
}
.mission {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mission strong {
  font-size: 13px;
  font-weight: 500;
}
#cube-count {
  color: var(--fg);
  font-size: 30px;
  white-space: nowrap;
}
#cube-count span {
  color: var(--fg-muted);
  font-size: 20px;
}

.viewport canvas,
.wrist-view canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.viewport canvas[hidden],
.wrist-view canvas[hidden],
.viewport img[hidden],
.wrist-view img[hidden] {
  display: none;
}
