:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #696969;
  --line: #00000030;
  --surface: #fffffff7;
  --page: #f6f6f6;
  --highlight: #fff;
  --raised: #ebebeb;
  --field: #fff;
  --on-ink: #fff;
  --soft-ink: #333;
  --track-fill: #202020;
  --track: #909090;
  --orbit: #00000020;
  --halo: #0000000b;
  --primary-hover: #393939;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  min-height: 100%;
  background: var(--page);
}
body {
  margin: 0;
  color: var(--ink);
  font:
    16px/1.5 'Segoe UI',
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
.camera-view summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
}
button svg,
.slider-hint svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(125deg, #fff 12%, #f8f8f8 55%, #fff 85%);
}
.backdrop::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 52%;
  width: min(78vw, 1000px);
  min-width: 380px;
  height: 70vh;
  transform: translate(-50%, -50%) rotate(-18deg);
  filter: blur(72px);
  background:
    radial-gradient(ellipse at 43% 46%, #111111a6 0 12%, #25252559 30%, transparent 62%),
    radial-gradient(ellipse at 66% 58%, #08080880 0 8%, transparent 49%);
}
.ink {
  position: absolute;
  width: 840px;
  height: 740px;
  filter: blur(56px);
  opacity: 0.92;
  background:
    radial-gradient(ellipse at 52% 32%, #050505 0 12%, transparent 36%),
    radial-gradient(ellipse at 72% 64%, #080808 0 16%, transparent 43%),
    radial-gradient(ellipse at 30% 58%, #303030 0 9%, transparent 35%);
}
.ink-one {
  right: -330px;
  top: -255px;
  transform: rotate(-20deg);
}
.ink-two {
  left: -420px;
  bottom: -250px;
  transform: rotate(155deg);
  opacity: 0.88;
}
.ink-dots {
  position: absolute;
  inset: -25px;
  opacity: 0.58;
  filter: blur(5px);
  background-image:
    radial-gradient(circle at 5% 6%, #222 0 5px, transparent 12px),
    radial-gradient(circle at 2% 40%, #111 0 9px, transparent 20px),
    radial-gradient(circle at 7% 66%, #555 0 4px, transparent 14px),
    radial-gradient(circle at 1% 86%, #111 0 14px, transparent 29px),
    radial-gradient(circle at 15% 94%, #555 0 6px, transparent 16px),
    radial-gradient(circle at 36% 99%, #333 0 7px, transparent 18px),
    radial-gradient(circle at 55% 12%, #555 0 7px, transparent 24px),
    radial-gradient(circle at 63% 4%, #222 0 4px, transparent 12px),
    radial-gradient(circle at 76% 20%, #555 0 3px, transparent 14px),
    radial-gradient(circle at 92% 27%, #333 0 10px, transparent 25px),
    radial-gradient(circle at 98% 49%, #333 0 9px, transparent 19px),
    radial-gradient(circle at 96% 75%, #222 0 13px, transparent 27px),
    radial-gradient(circle at 88% 96%, #333 0 5px, transparent 18px);
}
.shell {
  width: min(1280px, calc(100% - 96px));
  margin: 28px auto 0;
}
.surface {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow:
    0 6px 28px #00000005,
    inset 0 1px 0 var(--highlight);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.topbar {
  display: flex;
  align-items: center;
  gap: 27px;
  padding: 16px 24px;
  border-radius: 23px;
  min-height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--ink);
  text-decoration: none;
}
.brand img {
  flex-shrink: 0;
}
.brand > span {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.05em;
}
.brand-caption {
  font-size: 11px;
  letter-spacing: 0.25em;
  border-left: 1px solid var(--line);
  padding-left: 27px;
}
.connection {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 30px;
  font-size: 13px;
  white-space: nowrap;
}
.status-dot {
  width: 8px;
  height: 8px;
  border: 1.5px solid #797979;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.online {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 0 0 4px #00000007;
}
.logout {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  background: none;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 8px 0 8px 24px;
}
.logout svg {
  width: 21px;
  height: 21px;
}
.logout:hover {
  color: var(--muted);
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 49px 5px 34px;
}
.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.19em;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}
h1 {
  margin: 0;
  font-size: clamp(40px, 4.7vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.062em;
  font-weight: 650;
}
h1 > span {
  color: var(--muted);
}
.intro-copy {
  color: var(--muted);
  margin: 14px 0 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.mode-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 9px 14px;
  background: var(--surface);
}
.mode-label > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--soft-ink);
}
.mode-label > b {
  font-weight: 400;
}
.demo-actions {
  display: flex;
  justify-content: flex-end;
  margin: -10px 0 14px;
}
.demo-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
}
.demo-button:hover {
  background: var(--raised);
}
:root[data-control-mode='demo'] .notice {
  border-style: dashed;
}
.dashboard {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 20px;
}
.camera-view summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.camera-view summary:hover { background: var(--raised); }
.camera-view[open] summary { margin-bottom: 12px; }
#noticeMessage { margin: 0; }
#noticeMessage:not([hidden]) + .camera-view { margin-top: 12px; }
.camera-preview {
  aspect-ratio: 4 / 3;
  width: min(100%, 720px);
  background: var(--raised);
  border-radius: 11px;
  overflow: hidden;
}
.camera-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.camera-preview img[data-aim="ready"] { cursor: crosshair; }
.camera-view p { margin: 10px 0; }
.camera-settings { display: flex; flex-wrap: wrap; gap: 12px; }
.camera-settings label { display: grid; gap: 4px; }
.camera-settings input {
  width: 100px;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
}
.navigation {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-radius: 25px;
  padding: 27px 30px 23px;
}
h2 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.045em;
  line-height: 1.15;
  font-weight: 650;
}
.muted {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 0;
}
.direction-pad {
  position: relative;
  width: min(100%, 312px);
  aspect-ratio: 1;
  margin: 15px auto 9px;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #00000008, #00000002 56%, transparent 70%);
}
.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--orbit);
  pointer-events: none;
}
.orbit-one {
  inset: 0;
}
.orbit-two {
  inset: 17px;
}
.orbit-three {
  inset: 40px;
}
.pad-center {
  position: absolute;
  inset: 40%;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--highlight), var(--raised));
  padding: 0;
  z-index: 2;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transform: translate(var(--stick-x, 0px), var(--stick-y, 0px));
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.pad-center img {
  pointer-events: none;
  -webkit-user-drag: none;
}
.pad-center.steering {
  cursor: grabbing;
  transition: box-shadow 0.18s ease;
  box-shadow:
    0 0 0 6px var(--halo),
    0 4px 15px #00000030;
}
.pad-center:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.direction {
  position: absolute;
  width: 26%;
  height: 26%;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--highlight) 15%, var(--raised));
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  box-shadow:
    0 7px 15px var(--line),
    inset 0 1px var(--highlight);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease,
    opacity 0.16s ease;
  user-select: none;
  touch-action: none;
}
.direction svg {
  width: 33px;
  height: 33px;
  stroke-width: 1.7;
  pointer-events: none;
}
.up {
  left: 37%;
  top: 8%;
}
.down {
  left: 37%;
  bottom: 8%;
}
.left {
  left: 8%;
  top: 37%;
}
.right {
  right: 8%;
  top: 37%;
}
.direction:hover:enabled {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px var(--line);
}
.direction:active:enabled,
.direction.held {
  background: var(--ink);
  color: var(--on-ink);
  transform: scale(0.96);
  box-shadow: 0 3px 9px var(--line);
}
.direction:disabled {
  opacity: 0.35;
  box-shadow: 0 2px 5px #00000006;
}
.pad-hint {
  margin: 20px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.pad-hint > span {
  margin: 0 6px;
}
.precision {
  display: flex;
  flex-direction: column;
  gap: 15px;
  container-type: inline-size;
}
.axis-cards {
  display: grid;
  grid-template-columns: minmax(100px, 0.6fr) minmax(0, 1.4fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 15px;
  flex: 1;
}
.axis-vertical {
  grid-column: 1;
  grid-row: 1 / 3;
}
.axis-sweep {
  grid-column: 2;
  grid-row: 1;
}
.axis-pan {
  grid-column: 2;
  grid-row: 2;
}
.precision .axis-header {
  flex-direction: column;
  gap: 14px;
}
.precision .axis-title {
  min-width: 0;
  gap: 10px;
}
.precision .axis-heading {
  font-size: 18px;
}
.precision .angle {
  font-size: 30px;
}
.precision .axis-description {
  margin-left: 0;
}
.axis-vertical {
  display: flex;
  flex-direction: column;
}
.precision .axis-vertical .slider-row {
  flex: 1;
  min-height: 280px;
  grid-template-columns: 1fr;
  grid-template-rows: 36px minmax(160px, 1fr) 36px;
  justify-items: center;
  gap: 12px;
}
.axis-vertical .plus {
  grid-row: 1;
  grid-column: 1;
}
.axis-vertical .minus {
  grid-row: 3;
  grid-column: 1;
}
.axis-vertical .slider-wrap {
  grid-row: 2;
  grid-column: 1;
  align-self: stretch;
  width: 100%;
  min-height: 0;
}
.axis-vertical input[type='range'] {
  position: absolute;
  left: calc(50% - 22px);
  top: 0;
  width: 44px;
  height: 100%;
  writing-mode: vertical-lr;
  direction: rtl;
  cursor: ns-resize;
}
.axis-vertical .range-labels {
  position: absolute;
  top: 10.5px;
  bottom: 10.5px;
  left: calc(50% + 22px);
  flex-direction: column-reverse;
}
.axis-vertical input[type='range']::-webkit-slider-runnable-track {
  width: 7px;
  height: 100%;
  background: linear-gradient(to top, var(--track-fill) var(--fill), var(--track) var(--fill));
}
.axis-vertical input[type='range']::-moz-range-track {
  width: 7px;
  height: 100%;
  background: linear-gradient(to top, var(--track-fill) var(--fill), var(--track) var(--fill));
}
.axis-vertical input[type='range']::-webkit-slider-thumb {
  margin-top: 0;
  margin-left: -7px;
}
.axis-vertical .axis-description {
  margin-top: 18px;
}
@container (max-width: 520px) {
  .precision .axis-card {
    padding: 19px 12px;
  }
  .precision .axis-icon {
    display: none;
  }
  .precision .axis-heading {
    font-size: 16px;
  }
  .precision .angle {
    font-size: 27px;
  }
  .precision .axis-cards {
    gap: 12px;
  }
  .precision .axis-card:not(.axis-vertical) .slider-row {
    gap: 8px;
  }
  .axis-card:not(.axis-vertical) .slider-wrap {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .axis-card:not(.axis-vertical) .minus {
    grid-row: 2;
    grid-column: 1;
  }
  .axis-card:not(.axis-vertical) .plus {
    grid-row: 2;
    grid-column: 3;
  }
  .precision .axis-description {
    font-size: 10px;
  }
}
@media (max-width: 700px) {
  .precision .axis-vertical .slider-row {
    grid-template-rows: 44px minmax(160px, 1fr) 44px;
  }
}
.axis-card {
  padding: 22px 24px 19px;
  border-radius: 25px;
  transition: opacity 0.2s;
}
.axis-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.axis-title {
  display: flex;
  gap: 13px;
  align-items: center;
}
.axis-icon {
  width: 32px;
  height: 32px;
  padding: 1.5px;
  border: 1px solid transparent;
  border-radius: 8px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--soft-ink);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.axis-heading {
  font-size: 19px;
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
.servo-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 9px;
  color: var(--muted);
  margin: 5px 0 0;
}
.angle {
  color: var(--ink);
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.slider-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  gap: 13px;
  align-items: start;
  margin-top: 22px;
}
.step {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: linear-gradient(140deg, var(--highlight), var(--raised));
  box-shadow: 0 3px 5px #00000009;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  transition:
    background 0.15s,
    color 0.15s;
}
.step svg {
  display: block;
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.step:hover:enabled {
  background: var(--ink);
  color: var(--on-ink);
}
.step:disabled {
  opacity: 0.3;
}
.slider-wrap {
  min-width: 0;
  position: relative;
}
input[type='range'] {
  --fill: 0%;
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 36px;
  margin: 0;
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
  border-radius: 20px;
}
input[type='range']:focus {
  outline: none;
}
input[type='range']::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 10px;
  background: linear-gradient(to right, var(--track-fill) var(--fill), var(--track) var(--fill));
}
input[type='range']::-moz-range-track {
  height: 7px;
  border-radius: 10px;
  background: linear-gradient(to right, var(--track-fill) var(--fill), var(--track) var(--fill));
}
input[type='range']::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 21px;
  height: 21px;
  margin-top: -7px;
  border: 2px solid var(--highlight);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 2px 5px #00000028;
  transition: box-shadow 0.15s;
}
input[type='range']::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: 2px solid var(--highlight);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 2px 5px #00000028;
  transition: box-shadow 0.15s;
}
input[type='range']:hover:enabled::-webkit-slider-thumb,
input[type='range']:focus-visible::-webkit-slider-thumb {
  box-shadow:
    0 0 0 7px var(--halo),
    0 2px 5px #00000028;
}
input[type='range']:hover:enabled::-moz-range-thumb,
input[type='range']:focus-visible::-moz-range-thumb {
  box-shadow:
    0 0 0 7px var(--halo),
    0 2px 5px #00000028;
}
input[type='range']:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.axis-description {
  font-size: 11px;
  color: var(--muted);
  margin: 11px 0 0 40px;
}
.slider-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.slider-hint svg {
  width: 17px;
  height: 22px;
  flex-shrink: 0;
  stroke-width: 1.2;
}
.hint-divider {
  padding: 0 4px;
}
.notice {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 13px 18px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--muted);
}
.login {
  max-width: 420px;
  margin: 12px auto 48px;
  padding: 32px;
  border-radius: 25px;
}
.login-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--highlight), var(--raised));
  margin-bottom: 26px;
}
.login h2 {
  font-size: 29px;
}
form {
  display: flex;
  flex-direction: column;
  margin-top: 30px;
}
label {
  font-size: 12px;
  margin-bottom: 8px;
  font-weight: 600;
}
input[type='password'] {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--field);
  width: 100%;
  font-size: 14px;
}
input[type='password']::placeholder {
  color: var(--muted);
}
.remember-me {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 18px 0 0;
  min-height: 44px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
.remember-me input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--ink);
  cursor: pointer;
}
.remember-me small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.form-error {
  min-height: 20px;
  font-size: 12px;
  margin: 8px 0;
}
.primary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 11px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
}
.primary:hover:enabled {
  background: var(--primary-hover);
}
.primary:disabled {
  opacity: 0.5;
}
.primary > span {
  font-size: 19px;
}
.login-note {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  margin: 24px 0 0;
}
.startup {
  text-align: center;
  padding: 70px 0;
  color: var(--muted);
  font-size: 14px;
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 27px;
  border-top: 1px solid var(--line);
  padding: 19px 4px 24px;
  font-size: 9px;
  color: var(--muted);
}
footer > span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.footer-divider {
  color: var(--muted);
}
.footer-note {
  letter-spacing: 0.015em;
}
@media (min-width: 1500px) {
  .shell {
    margin-top: 40px;
  }
  .intro {
    padding-top: 60px;
    padding-bottom: 40px;
  }
  .navigation {
    padding-top: 32px;
    padding-bottom: 28px;
  }
  .direction-pad {
    width: 350px;
    margin-top: 24px;
    margin-bottom: 20px;
  }
  .axis-card {
    padding-top: 28px;
    padding-bottom: 25px;
  }
  .axis-heading {
    font-size: 22px;
  }
  .angle {
    font-size: 37px;
  }
  .slider-row {
    margin-top: 27px;
  }
}
@media (max-width: 950px) {
  .shell {
    width: calc(100% - 48px);
  }
  .brand-caption {
    display: none;
  }
  .intro {
    padding-top: 36px;
  }
  .navigation {
    padding: 24px 20px;
  }
  .axis-card {
    padding: 23px 18px;
  }
  .axis-icon {
    display: none;
  }
  .axis-heading {
    font-size: 17px;
  }
  .angle {
    font-size: 28px;
  }
  .axis-description {
    margin-left: 0;
  }
  .slider-row {
    gap: 8px;
  }
  .mode-label {
    display: none;
  }
}
@media (max-width: 700px) {
  .shell {
    width: calc(100% - 32px);
    margin-top: 16px;
  }
  .topbar {
    padding: 13px 16px;
    border-radius: 18px;
    gap: 15px;
    min-height: 65px;
  }
  .brand {
    gap: 9px;
  }
  .brand > span {
    font-size: 23px;
  }
  .brand img {
    width: 29px;
    height: 29px;
  }
  .connection {
    font-size: 11px;
    gap: 7px;
  }
  .logout {
    padding-left: 14px;
  }
  .logout > span {
    display: none;
  }
  .intro {
    padding: 33px 3px 27px;
  }
  .intro .eyebrow {
    font-size: 8px;
  }
  .intro-copy {
    font-size: 14px;
    margin-top: 12px;
  }
  .dashboard {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .navigation {
    padding: 25px 24px;
  }
  .navigation h2 {
    font-size: 30px;
  }
  .direction-pad {
    width: min(100%, 280px);
    margin: 15px auto;
  }
  .axis-card {
    padding: 23px 24px;
  }
  .axis-icon {
    display: block;
  }
  .axis-heading {
    font-size: 20px;
  }
  .angle {
    font-size: 32px;
  }
  .slider-row {
    gap: 13px;
  }
  .axis-description {
    margin-left: 40px;
  }
  .slider-hint {
    padding: 3px 0;
    font-size: 10px;
  }
  .pad-hint {
    margin-top: 17px;
  }
  .footer-note {
    display: none;
  }
  .login {
    margin-top: 0;
    padding: 27px;
  }
  .ink-one {
    right: -540px;
    top: -170px;
  }
  .ink-two {
    left: -530px;
    bottom: -240px;
  }
  .ink-dots {
    opacity: 0.32;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 700px) {
  input[type='password'] {
    font-size: 16px;
  }
  .slider-row {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }
  .step {
    width: 44px;
    height: 44px;
  }
  input[type='range'] {
    height: 44px;
  }
}

/* Light and dark themes share layout and typography. Theme rules set the palette and contrast. */
:root:not([data-theme='dark']) {
  --page: #e9e9e7;
  --ink: #1c1c1c;
  --muted: #5e5e61;
  --line: #00000026;
  --surface: #ffffffed;
  --raised: #e5e5e3;
  --field: #f3f3f1;
  --track: #8e8e90;
}
:root:not([data-theme='dark']) .backdrop {
  background:
    radial-gradient(ellipse at 8% 0%, #ffffff 0, transparent 58%),
    linear-gradient(135deg, #ececea 0%, #dedfdd 46%, #fafaf8 100%);
}
:root:not([data-theme='dark']) .backdrop::after {
  opacity: 0.45;
}
:root:not([data-theme='dark']) .ink {
  opacity: 0.64;
}
:root:not([data-theme='dark']) .ink-dots {
  opacity: 0.46;
}
:root:not([data-theme='dark']) .surface {
  border-color: #ffffff;
  box-shadow:
    0 16px 40px #2020200d,
    0 2px 4px #20202008,
    inset 0 -1px 0 #0000000a;
}
:root:not([data-theme='dark']) .topbar {
  background: #ffffffc9;
  box-shadow:
    0 5px 24px #20202008,
    inset 0 1px 0 #fff;
}
:root:not([data-theme='dark']) .brand-caption {
  color: #555558;
}
:root:not([data-theme='dark']) .connection {
  background: #f0f0ee;
  border-color: #00000012;
}
:root:not([data-theme='dark']) .intro-copy {
  color: #535356;
}
:root:not([data-theme='dark']) .mode-label {
  background: #ffffffc9;
  border-color: #00000021;
}
:root:not([data-theme='dark']) .navigation,
:root:not([data-theme='dark']) .login {
  background: linear-gradient(155deg, #fff, #f9f9f7);
}
:root:not([data-theme='dark']) .axis-card {
  background: #fffffff5;
}
:root:not([data-theme='dark']) .axis-icon {
  background: #efefed;
  border-color: #0000000d;
}
:root:not([data-theme='dark']) .direction-pad {
  background: radial-gradient(circle, #f8f8f6 0 23%, #dfdfdd 42%, #efefed 67%, #fafaf8 72%);
  box-shadow:
    inset 0 0 0 1px #bdbdbb,
    0 1px 0 #fff;
}
:root:not([data-theme='dark']) .orbit {
  border-color: #00000017;
}
:root:not([data-theme='dark']) .pad-center {
  background: #fff;
  border-color: #a8a8a8;
  box-shadow: 0 2px 8px #00000012;
}
:root:not([data-theme='dark']) .direction {
  background: linear-gradient(145deg, #fff, #ededeb);
  color: #27272a;
  border-color: #a8a8aa;
  box-shadow:
    0 5px 10px #00000018,
    inset 0 1px 0 #fff;
}
:root:not([data-theme='dark']) .direction:hover:enabled {
  background: #fff;
  color: #171717;
  border-color: #858585;
  box-shadow: 0 8px 16px #00000020;
}
:root:not([data-theme='dark']) .direction:active:enabled,
:root:not([data-theme='dark']) .direction.held {
  background: #d9d9d6;
  color: #171717;
  border-color: #8c8c8e;
  box-shadow:
    inset 0 2px 4px #00000012,
    0 0 0 4px #00000012;
}
:root:not([data-theme='dark']) .direction:disabled {
  opacity: 1;
  background: #e5e5e3;
  color: #89898b;
  border-color: #b9b9b7;
  box-shadow: inset 0 1px 0 #fff;
}
:root:not([data-theme='dark']) .step {
  background: #f1f1ef;
  border-color: #929294;
  box-shadow: 0 2px 3px #0000000a;
}
:root:not([data-theme='dark']) .step:hover:enabled {
  background: #242426;
  border-color: #151515;
  color: #fff;
}
:root:not([data-theme='dark']) .step:disabled {
  opacity: 1;
  color: #888;
  background: #f1f1ef;
  border-color: #c5c5c3;
  box-shadow: none;
}
:root:not([data-theme='dark']) input[type='range']:disabled {
  opacity: 0.55;
}
:root:not([data-theme='dark']) input[type='password'] {
  border-color: #a5a5a7;
  box-shadow: inset 0 1px 3px #00000008;
}
:root:not([data-theme='dark']) .login-mark {
  background: #eaeae7;
  border-color: #cacac7;
}
:root:not([data-theme='dark']) .theme-toggle {
  background: #dadbd8;
  border-color: #a9aaa7;
  box-shadow: inset 0 2px 5px #00000012;
}
:root:not([data-theme='dark']) .theme-toggle:hover {
  background: #d1d2cf;
  border-color: #888985;
  box-shadow:
    inset 0 2px 5px #00000012,
    0 0 0 4px var(--halo);
}
:root:not([data-theme='dark']) .notice {
  background: #ffffffed;
  border-color: #b9b9b9;
  color: #48484b;
}
:root:not([data-theme='dark']) footer {
  border-top-color: #00000024;
  color: #535356;
}
/* Dark surfaces and light controls retain their depth without inverting text or shadows. */
:root[data-theme='dark'] {
  color-scheme: dark;
  --page: #101012;
  --ink: #ededee;
  --muted: #b3b3b9;
  --line: #ffffff24;
  --surface: #1a1a1ee8;
  --highlight: #343438;
  --raised: #222226;
  --field: #111114d9;
  --on-ink: #141416;
  --soft-ink: #d4d4d8;
  --track-fill: #e4e4e7;
  --track: #53535b;
  --orbit: #ffffff12;
  --halo: #ffffff18;
  --primary-hover: #d0d0d5;
}
:root[data-theme='dark'] .backdrop {
  background: linear-gradient(125deg, #101012 12%, #17171a 55%, #0c0c0e 85%);
}
:root[data-theme='dark'] .ink {
  filter: invert(1) blur(56px);
  opacity: 0.23;
}
:root[data-theme='dark'] .backdrop::after {
  filter: invert(1) blur(72px);
  opacity: 0.42;
}
:root[data-theme='dark'] .ink-dots {
  filter: invert(1) blur(5px);
  opacity: 0.3;
}
:root[data-theme='dark'] img[src$='aperture.svg'] {
  filter: invert(1);
}
:root[data-theme='dark'] .direction-pad {
  background: radial-gradient(circle, #ffffff08, #ffffff02 56%, transparent 70%);
}
/* The switch has its own snapshot so the thumb slides above the page crossfade. */
.theme-toggle {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 64px;
  height: 36px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ffffff30;
  border-radius: 999px;
  background: #29292e;
  box-shadow: inset 0 2px 5px #00000030;
  transition:
    background-color 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}
.theme-toggle:hover {
  border-color: #ffffff66;
  box-shadow:
    inset 0 2px 5px #00000030,
    0 0 0 4px var(--halo);
}
.theme-toggle:active {
  transform: scale(0.95);
}
.theme-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, #e5e5e3);
  color: #242426;
  box-shadow:
    0 2px 5px #00000026,
    inset 0 1px 0 #fff;
  transform: translateX(0);
  transition: transform 0.5s cubic-bezier(0.22, 1.3, 0.36, 1);
  view-transition-name: theme-thumb;
}
:root[data-theme='dark'] .theme-thumb {
  transform: translateX(28px);
}
.theme-toggle svg {
  position: absolute;
  inset: 5px;
  width: 18px;
  height: 18px;
  stroke-width: 1.5;
  transition:
    opacity 0.28s ease,
    transform 0.5s cubic-bezier(0.22, 1.3, 0.36, 1);
}
.theme-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}
.theme-moon {
  opacity: 0;
  transform: rotate(-70deg) scale(0.5);
}
:root[data-theme='dark'] .theme-sun {
  opacity: 0;
  transform: rotate(100deg) scale(0.5);
}
:root[data-theme='dark'] .theme-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}
:root:not([data-theme='dark']) .theme-toggle:hover .theme-sun {
  transform: rotate(35deg) scale(1.08);
}
:root[data-theme='dark'] .theme-toggle:hover .theme-moon {
  transform: rotate(-12deg) scale(1.05);
}
.theme-stars {
  position: absolute;
  top: 10px;
  left: 12px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffffffe6;
  box-shadow:
    8px 9px 0 -0.5px #ffffffa6,
    -3px 14px 0 -0.5px #ffffff80;
  opacity: 0;
  transform: translateX(12px) scale(0.3) rotate(-40deg);
  transition:
    opacity 0.4s ease,
    transform 0.55s cubic-bezier(0.22, 1.3, 0.36, 1);
}
:root[data-theme='dark'] .theme-stars {
  opacity: 1;
  transform: translateX(0) scale(1) rotate(0);
}
:root.theme-snapshot .theme-thumb,
:root.theme-snapshot .theme-toggle svg,
:root.theme-snapshot .theme-stars,
:root.theme-snapshot .theme-toggle {
  transition: none;
}
::view-transition {
  pointer-events: none;
}
::view-transition-group(root) {
  animation: none;
}
::view-transition-old(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-new(root) {
  animation: helios-theme-in 0.42s ease both;
  mix-blend-mode: normal;
}
::view-transition-group(theme-thumb) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.22, 1.15, 0.36, 1);
}
::view-transition-old(theme-thumb) {
  animation: helios-thumb-out 0.4s ease both;
  mix-blend-mode: normal;
}
::view-transition-new(theme-thumb) {
  animation: helios-thumb-in 0.5s ease both;
  mix-blend-mode: normal;
}
@keyframes helios-theme-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes helios-thumb-out {
  to {
    opacity: 0;
    transform: rotate(45deg) scale(0.7);
  }
}
@keyframes helios-thumb-in {
  from {
    opacity: 0;
    transform: rotate(-60deg) scale(0.65);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}
:root.theme-changing,
:root.theme-changing *,
:root.theme-changing *::before,
:root.theme-changing *::after {
  transition-property:
    background-color, color, border-color, box-shadow, fill, stroke, filter !important;
  transition-duration: 0.42s !important;
  transition-timing-function: ease !important;
}
:root.theme-changing .theme-thumb,
:root.theme-changing .theme-stars,
:root.theme-changing .theme-toggle svg {
  transition-property: transform, opacity !important;
  transition-duration: 0.45s !important;
  transition-timing-function: cubic-bezier(0.22, 1.3, 0.36, 1) !important;
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle,
  .theme-toggle *,
  :root.theme-changing .theme-thumb,
  :root.theme-changing .theme-stars,
  :root.theme-changing .theme-toggle svg,
  :root.theme-changing,
  :root.theme-changing *,
  :root.theme-changing *::before,
  :root.theme-changing *::after {
    transition: none !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
@media (max-width: 700px) {
  .topbar {
    gap: 10px;
  }
  .connection {
    padding: 5px 7px;
  }
  .logout {
    padding-left: 10px;
  }
}
@media (max-width: 420px) {
  .topbar {
    padding-inline: 12px;
    gap: 8px;
  }
  .brand {
    gap: 6px;
  }
  .brand > span {
    font-size: 20px;
  }
  .brand img {
    width: 25px;
    height: 25px;
  }
  .connection {
    font-size: 10px;
    gap: 5px;
  }
  .theme-toggle {
    width: 56px;
    height: 34px;
  }
  .theme-thumb {
    width: 26px;
    height: 26px;
  }
  :root[data-theme='dark'] .theme-thumb {
    transform: translateX(22px);
  }
  .theme-toggle svg {
    inset: 4px;
  }
  .theme-stars {
    left: 10px;
  }

  .logout {
    padding-left: 8px;
  }
}

@media (max-width: 360px) {
  .connection {
    padding: 4px;
    border-width: 0;
  }
  :root:not([data-theme='dark']) .connection {
    background: transparent;
  }
  .connection #statusText {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
