@font-face {
  font-family: Satoshi;
  src: url("/static/fonts/satoshi/satoshi-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Source;
  src: url("/static/fonts/source-sans-pro/SourceSansPro-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Source;
  src: url("/static/fonts/source-sans-pro/SourceSansPro-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --navy: #1b3263;
  --navy-70: rgba(27, 50, 99, 0.7);
  --navy-50: rgba(27, 50, 99, 0.5);
  --navy-12: rgba(27, 50, 99, 0.12);
  --navy-06: rgba(27, 50, 99, 0.06);
  --blue: #1f66dc;
  --blue-mid: #3b8beb;
  --blue-light: #66b5f7;
  --blue-soft: #e8f1fd;
  --sky: #e4eefb;
  --surface: rgba(255, 255, 255, 0.86);
  --gradient: linear-gradient(135deg, #1f66dc 0%, #66b5f7 100%);
  --radius: 18px;
  --radius-s: 10px;
  --ink: var(--navy);
  --muted: rgba(27, 50, 99, 0.7);
  --line: rgba(27, 50, 99, 0.1);
  --line-strong: rgba(27, 50, 99, 0.2);
  --shadow: 0 1px 2px rgba(27, 50, 99, 0.06), 0 12px 32px -12px rgba(27, 50, 99, 0.28);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --gutter: 20px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--sky);
  color: var(--navy);
  font: 400 16px/1.55 Source, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3 {
  font-family: Satoshi, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--blue);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.7em;
  height: 1.7em;
  padding: 0 0.35em;
  margin: 0 0.1em;
  border-radius: 5px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font: 700 0.72em/1 Satoshi, system-ui, sans-serif;
  color: var(--navy);
}

[hidden] {
  display: none !important;
}

/* touch-mode follows the input in use (main.mjs), so convertibles switch back and forth */
.touch-only {
  display: none;
}
body.touch-mode .touch-only {
  display: inline;
}
body.touch-mode .desk-only {
  display: none;
}

/* ---------- 3D stage ---------- */

.stage {
  position: fixed;
  inset: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.stage:active {
  cursor: grabbing;
}
.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-s);
  font: 700 15px/1 Satoshi, system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, opacity 0.2s;
}
.button.primary {
  color: #fff;
  background: var(--blue);
}
.button.primary:hover {
  background: #1a58c2;
}
.button.ghost {
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.button.ghost:hover {
  box-shadow: inset 0 0 0 1px var(--ink);
}
.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 102, 220, 0.3);
}
.button.ghost:focus-visible {
  box-shadow: inset 0 0 0 1px var(--ink), 0 0 0 3px rgba(31, 102, 220, 0.3);
}
.button.small {
  min-height: 40px;
  font-size: 14px;
}
.button:disabled {
  opacity: 0.55;
  cursor: progress;
  transform: none;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  cursor: pointer;
  color: var(--navy);
}
.icon-button svg,
.touch-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-button:hover {
  color: var(--blue);
}

/* ---------- HUD ---------- */

.hud {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 5;
  pointer-events: none;
  padding-left: calc(var(--gutter) + var(--safe-left));
  padding-right: calc(var(--gutter) + var(--safe-right));
}
.hud > * {
  pointer-events: auto;
}
.hud-top {
  top: 0;
  padding-top: calc(var(--gutter) + var(--safe-top));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.logo {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 18px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  flex: none;
}
.logo img {
  display: block;
  height: 30px;
  width: auto;
}
.hud-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-button[aria-pressed="true"] {
  color: #fff;
  background: var(--navy);
}

/* the next destination, top centre */
.target {
  position: absolute;
  left: 50%;
  top: calc(var(--gutter) + var(--safe-top));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 16px 0 8px;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  max-width: min(480px, calc(100vw - 400px));
}
.target-arrow {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--gradient);
}
.target-arrow svg {
  width: 20px;
  height: 20px;
  fill: #fff;
  transition: transform 0.2s linear;
}
.target-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.target small {
  font: 600 12.5px/1.1 Source, system-ui, sans-serif;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.target-progress {
  color: var(--navy-50);
}
.target strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 700 17px/1.1 Satoshi, system-ui, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.target-num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
}
.target-num:empty {
  display: none;
}
.target-distance {
  flex: none;
  font: 700 14px/1 Satoshi, system-ui, sans-serif;
  color: var(--navy-70);
  font-variant-numeric: tabular-nums;
}
.target.done .target-arrow {
  background: linear-gradient(135deg, #3cc8a0, #1f66dc);
}
.target.done strong {
  font-size: 15px;
}
/* underground the pill turns dark, like the hall */
.target.dark {
  color: #fff;
  background: rgba(8, 16, 34, 0.86);
  box-shadow: 0 0 0 1px rgba(102, 181, 247, 0.25), var(--shadow);
}
.target.dark small {
  color: rgba(220, 232, 255, 0.7);
}
.target.dark .target-distance {
  color: rgba(255, 255, 255, 0.7);
}

.hud-bottom {
  bottom: 0;
  padding-bottom: calc(var(--gutter) + var(--safe-bottom));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.minimap-wrap {
  position: relative;
  display: block;
  width: 184px;
  height: 184px;
  padding: 0;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  overflow: visible;
}
.minimap {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.compass {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font: 700 11px/1 Satoshi, system-ui, sans-serif;
  box-shadow: 0 2px 6px rgba(27, 50, 99, 0.3);
  pointer-events: none;
}
.key-hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--gutter) + var(--safe-bottom) + 6px);
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  font-size: 14px;
  white-space: nowrap;
  color: var(--navy-70);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.key-hint.fade {
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
}

.overview-hint {
  position: fixed;
  pointer-events: none;
  left: 50%;
  bottom: calc(var(--gutter) + var(--safe-bottom) + 8px);
  z-index: 6;
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: var(--shadow);
  animation: toast-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.overview-hint kbd {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: none;
}
body.overview .target,
body.overview .zone-prompt,
body.overview .key-hint {
  visibility: hidden;
}
body.bunker .minimap-wrap,
body.bunker .key-hint,
body.bunker .overview-hint .pick {
  display: none;
}
body.bunker .hud .icon-button:not([aria-pressed="true"]) {
  color: #fff;
  background: rgba(8, 16, 34, 0.7);
}
body.overview .stage {
  cursor: pointer;
}

.zone-prompt {
  position: absolute;
  left: 50%;
  bottom: calc(var(--gutter) + var(--safe-bottom) + 64px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 12px 12px 22px;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(31, 102, 220, 0.14), 0 24px 48px -18px rgba(27, 50, 99, 0.45);
  cursor: pointer;
  text-align: left;
  animation: prompt-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.zone-prompt-text {
  display: grid;
  gap: 3px;
}
.zone-prompt small {
  font: 600 13px/1.1 Source, system-ui, sans-serif;
  color: var(--muted);
}
.zone-prompt strong {
  font: 700 21px/1.1 Satoshi, system-ui, sans-serif;
  letter-spacing: -0.02em;
}
.zone-prompt-key {
  display: grid;
  place-items: center;
  min-width: 64px;
  height: 48px;
  padding: 0 12px;
  border-radius: 14px;
  color: #fff;
  background: var(--gradient);
  font: 700 14px/1 Satoshi, system-ui, sans-serif;
}
.zone-prompt.dark {
  color: #fff;
  background: #0b1426;
  box-shadow: 0 0 0 1px rgba(102, 181, 247, 0.35), 0 24px 48px -18px rgba(0, 0, 0, 0.7);
}
.zone-prompt.dark small {
  color: rgba(220, 232, 255, 0.7);
}
.zone-prompt-key kbd {
  background: transparent;
  box-shadow: none;
  color: #fff;
  font-size: 14px;
}
body.touch-mode .zone-prompt-key kbd {
  display: none;
}
@keyframes prompt-in {
  from {
    opacity: 0;
    transform: translate(-50%, 16px) scale(0.96);
  }
}

/* ---------- touch controls ---------- */

.touch {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 4;
  height: 46%;
  pointer-events: none;
}
.joystick {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 55%;
  height: 100%;
  pointer-events: auto;
  touch-action: none;
}
.joystick-ring {
  position: absolute;
  left: calc(28px + var(--safe-left));
  bottom: calc(40px + var(--safe-bottom));
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1.5px rgba(27, 50, 99, 0.12), var(--shadow);
  transition: opacity 0.2s;
}
.joystick.active .joystick-ring {
  transition: none;
}
.joystick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 8px 18px -6px rgba(31, 102, 220, 0.8);
}
.touch-buttons {
  position: absolute;
  right: calc(24px + var(--safe-right));
  bottom: calc(44px + var(--safe-bottom));
  display: flex;
  align-items: flex-end;
  gap: 12px;
  pointer-events: auto;
}
.touch-button {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.touch-button.small {
  width: 48px;
  height: 48px;
  align-self: flex-start;
}
.touch-button.primary {
  width: 76px;
  height: 76px;
  color: #fff;
  background: var(--gradient);
}
.touch-button.pressed {
  transform: scale(0.92);
}
.touch-button svg {
  width: 26px;
  height: 26px;
}

body.touch-mode .key-hint {
  display: none;
}
body.touch-mode .minimap-wrap {
  position: fixed;
  top: calc(var(--gutter) + var(--safe-top) + 58px);
  right: calc(var(--gutter) + var(--safe-right));
  width: 112px;
  height: 112px;
  border-width: 3px;
}
body.touch-mode .zone-prompt {
  bottom: calc(var(--safe-bottom) + 200px);
}

/* ---------- self-driving ---------- */

/* the self-driving button: a steering wheel with a spark of AI in it, bottom right */
@property --spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.auto-fab {
  --ai: linear-gradient(135deg, #a66bff 0%, #5a78ff 50%, #1ec8ff 100%);
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 64px;
  height: 64px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  /* a soft light from the top left over the gradient, like a lens */
  background: radial-gradient(90% 80% at 28% 18%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 58%), var(--ai);
  box-shadow: 0 12px 26px -10px rgba(76, 104, 255, 0.75), 0 2px 6px rgba(27, 50, 99, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.3), inset 0 -6px 12px rgba(40, 30, 140, 0.18);
  cursor: pointer;
  isolation: isolate;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* a coloured glow underneath */
.auto-fab::before {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: -1;
  border-radius: 50%;
  background: var(--ai);
  filter: blur(12px);
  opacity: 0.55;
  transition: opacity 0.3s ease;
}
.auto-fab:hover {
  transform: translateY(-2px);
}
.auto-fab:hover::before {
  opacity: 0.85;
}
.auto-fab:active {
  transform: scale(0.95);
}
.auto-fab:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(90, 120, 255, 0.6);
}
.auto-fab .auto-wheel {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translate(-2px, 2px);
  filter: drop-shadow(0 1px 1.5px rgba(30, 20, 110, 0.35));
}
/* the stars sit inside, above the wheel's rim */
.auto-fab .auto-spark {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 17px;
  height: 17px;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(30, 20, 110, 0.35));
  animation: auto-spark 3.4s ease-in-out infinite;
}
.auto-fab .auto-spark path {
  fill: #fff;
}
.auto-spark {
  display: block;
}
.auto-spark svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: none;
}
@keyframes auto-spark {
  50% {
    transform: scale(1.18) rotate(12deg);
  }
}
@keyframes auto-spin {
  to {
    --spin: 360deg;
  }
}
/* while the car drives itself: a turning ring round the button */
.auto-fab::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  padding: 2.5px;
  background: conic-gradient(from var(--spin), #a66bff, #5a78ff, #1ec8ff, #7cf2d0, #a66bff);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
body.autopilot .auto-fab::after {
  opacity: 1;
  transform: none;
  animation: auto-spin 2.4s linear infinite;
}
.auto-fab.hinting {
  animation: auto-hint 1.6s ease-in-out infinite;
}
@keyframes auto-hint {
  50% {
    box-shadow: 0 0 0 10px rgba(90, 120, 255, 0.18), 0 0 30px rgba(166, 107, 255, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  }
}
body.touch-mode #autopilot {
  display: none;
}
/* on phones it sits right above the boost button */
.touch-button.auto-fab {
  position: absolute;
  right: 8px;
  bottom: calc(76px + 16px);
  width: 60px;
  height: 60px;
  margin: 0;
}
.touch-button.auto-fab .auto-wheel {
  width: 28px;
  height: 28px;
}
.touch-button.auto-fab .auto-spark {
  top: 9px;
  right: 9px;
  width: 16px;
  height: 16px;
}
@media (prefers-reduced-motion: reduce) {
  .auto-fab .auto-spark,
  .auto-fab.hinting,
  body.autopilot .auto-fab::after {
    animation: none;
  }
}

/* the recommendation, once the visitor has driven a little */
.auto-tip {
  --ai: linear-gradient(135deg, #b56cff 0%, #4f7bff 52%, #1fd1ff 100%);
  position: fixed;
  right: var(--tip-right, 24px);
  bottom: var(--tip-bottom, 110px);
  z-index: 8;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;
  width: min(340px, calc(100vw - 32px));
  padding: 16px 12px 16px 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 60px -20px rgba(27, 50, 99, 0.45), 0 0 0 1px rgba(79, 123, 255, 0.16);
  isolation: isolate;
  animation: auto-tip-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.auto-tip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1.5px;
  border-radius: inherit;
  background: var(--ai);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* the pointer down to the button */
.auto-tip::after {
  content: "";
  position: absolute;
  right: var(--tip-arrow, 26px);
  bottom: -7px;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(135deg, transparent 50%, #fff 50%);
  box-shadow: 1.5px 1.5px 0 0 #3fa3ff;
  transform: rotate(45deg);
}
.auto-tip .auto-spark {
  position: static;
  width: 30px;
  height: 30px;
}
.auto-tip-text strong {
  display: block;
  font: 700 16px/1.25 Satoshi, system-ui, sans-serif;
  background: var(--ai);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auto-tip-text p {
  margin: 4px 0 12px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--navy-70);
}
.auto-tip-go {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: var(--ai);
  box-shadow: 0 10px 20px -10px rgba(79, 123, 255, 0.9);
  font: 700 14px/1 Satoshi, system-ui, sans-serif;
  cursor: pointer;
}
.auto-tip-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: var(--navy);
  background: var(--navy-06);
  cursor: pointer;
}
.auto-tip-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}
@keyframes auto-tip-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
}
.auto-tip.leaving {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* while the car drives itself: what it does, bottom centre */
.auto-status {
  position: fixed;
  left: 50%;
  bottom: calc(var(--gutter) + var(--safe-bottom));
  z-index: 6;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  height: 56px;
  padding: 0 8px;
  border-radius: 18px;
  color: #fff;
  background: rgba(11, 20, 38, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 0 1px rgba(102, 181, 247, 0.3), var(--shadow);
  white-space: nowrap;
  animation: prompt-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.auto-status-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #b56cff 0%, #4f7bff 52%, #1fd1ff 100%);
  animation: auto-glow 2.4s ease-in-out infinite;
}
.auto-status-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes auto-glow {
  50% {
    box-shadow: 0 0 0 6px rgba(47, 125, 255, 0.18), 0 0 18px rgba(102, 181, 247, 0.55);
  }
}
.auto-status-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.auto-status-text small {
  font: 600 12.5px/1.1 Source, system-ui, sans-serif;
  color: rgba(220, 232, 255, 0.7);
}
.auto-status-text strong {
  max-width: 30vw;
  overflow: hidden;
  text-overflow: ellipsis;
  font: 700 17px/1.1 Satoshi, system-ui, sans-serif;
}
.auto-status-figure {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 42px;
  font-variant-numeric: tabular-nums;
}
.auto-status-figure b {
  font: 700 17px/1 Satoshi, system-ui, sans-serif;
}
.auto-status-figure small {
  font: 600 11.5px/1 Source, system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.6);
}
.auto-stop {
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  font: 700 14px/1 Satoshi, system-ui, sans-serif;
  cursor: pointer;
}
.auto-stop:hover {
  background: rgba(255, 255, 255, 0.22);
}
.auto-status.arrived .auto-status-icon {
  background: linear-gradient(135deg, #3cc8a0, #1f66dc);
  animation: none;
}
body.auto-status-on .key-hint {
  display: none;
}
body.auto-status-on .zone-prompt {
  bottom: calc(var(--gutter) + var(--safe-bottom) + 72px);
}
body.touch-mode .auto-status {
  top: calc(var(--gutter) + var(--safe-top) + 184px);
  bottom: auto;
  gap: 10px;
}
body.touch-mode.auto-status-on .zone-prompt {
  bottom: calc(var(--safe-bottom) + 200px);
}
@media (max-width: 520px) {
  .auto-status {
    gap: 10px;
  }
  .auto-status-text strong {
    max-width: 26vw;
    font-size: 15px;
  }
}
.auto-sheet .pane-lead {
  margin: 0 0 16px;
}
.auto-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.auto-title .auto-spark-title {
  position: static;
  width: 26px;
  height: 26px;
}
.auto-sheet-stop {
  width: 100%;
}
.place-list li[aria-current="true"] button {
  background: var(--blue-soft);
}

/* ---------- intro ---------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: radial-gradient(60% 70% at 50% 50%, rgba(255, 255, 255, 0.92) 0%, rgba(232, 239, 245, 0.55) 70%, rgba(232, 239, 245, 0.25) 100%);
  transition: opacity 0.8s ease, visibility 0.8s;
}
.intro:not(.ready) {
  background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, var(--sky) 70%);
}
.intro.leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.intro-card {
  width: min(560px, 100%);
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 40px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 32px 64px -36px rgba(27, 50, 99, 0.4);
}
.intro-logo {
  width: 150px;
  height: auto;
  margin-bottom: 40px;
  mix-blend-mode: multiply;
}
.intro-title {
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.04em;
}
.intro-lead {
  margin: 12px 0 0;
  max-width: 34ch;
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
}
/* three steps: drive, follow the route, stop and press Enter – plain columns between hairlines */
.intro-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.intro-steps li {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 4px;
  padding: 16px 12px 18px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted);
}
.intro-steps li + li {
  border-left: 1px solid var(--line);
}
.intro-steps b {
  font: 700 14.5px/1.2 Satoshi, system-ui, sans-serif;
  color: var(--ink);
}
.intro-steps kbd {
  font-size: 0.7em;
}
/* the progress runs along the hairline below the steps */
.loader {
  position: relative;
  width: 100%;
  height: 2px;
  margin-top: -1.5px;
  overflow: hidden;
}
.intro-steps[hidden] + .loader {
  margin-top: 28px;
  background: var(--line);
}
.loader span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--blue);
  transition: width 0.3s ease;
}
.loader.done {
  opacity: 0;
}
.intro-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}
.intro-error {
  margin: 20px 0 0;
  font-size: 14px;
  color: #b42318;
}

/* ---------- dialogs ---------- */

dialog {
  border: 0;
  padding: 0;
  max-width: none;
  max-height: none;
  color: var(--navy);
}
dialog::backdrop {
  background: rgba(27, 50, 99, 0.12);
}

.panel {
  position: fixed;
  inset: calc(16px + var(--safe-top)) calc(16px + var(--safe-right)) calc(16px + var(--safe-bottom)) auto;
  width: min(460px, calc(100vw - 32px));
  height: auto;
  max-height: none;
  margin: 0;
  padding: 40px 32px 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 32px 72px -32px rgba(27, 50, 99, 0.45);
}
.panel[open] {
  animation: panel-in 0.45s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.panel::backdrop {
  background: linear-gradient(90deg, rgba(27, 50, 99, 0) 30%, rgba(27, 50, 99, 0.18));
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
}
.panel-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  box-shadow: none;
  background: transparent;
}
.panel-close:hover {
  background: var(--navy-06);
}
.panel h2 {
  padding-right: 48px;
}
.panel .sections > section {
  padding: 0;
}
body:has(dialog[open]) .zone-prompt {
  visibility: hidden;
}
.sections > section {
  display: grid;
  gap: 18px;
}
.sections > section > .button {
  justify-self: start;
}
.sections h2 {
  font-size: 32px;
  line-height: 1.06;
  letter-spacing: -0.035em;
}
.sections h2 + .lead {
  margin-top: -4px;
}
.sections h3 {
  font-size: 18px;
  letter-spacing: -0.015em;
}
.sections p {
  margin: 0;
  color: var(--muted);
}
.sections .lead {
  font-size: 19px;
  line-height: 1.45;
  color: rgba(27, 50, 99, 0.82);
}
/* the projects: one block per poster in the gallery, divided by hairlines */
.project {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
}
.project h3 {
  font-size: 28px;
  letter-spacing: -0.03em;
}
.project .lead {
  font-size: 18px;
}
.project .button {
  justify-self: start;
}
.meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.status-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1f9d63;
}
.meta.off .status-dot {
  background: var(--navy-50);
}
.shot {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
}
.shot.archived img {
  filter: grayscale(1) contrast(0.9);
  opacity: 0.8;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--ink);
}
.facts li + li::before {
  content: "·";
  margin: 0 10px;
  color: var(--navy-50);
}
.service-list {
  display: grid;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.service-list li {
  display: grid;
  gap: 6px 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.service-list p {
  font-size: 15.5px;
}
.process {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  font-size: 15px;
}
.process span {
  color: var(--ink);
}
.process span + span::before {
  content: "→";
  margin: 0 10px;
  color: var(--navy-50);
}
.person {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.person img:first-child {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.person div {
  display: grid;
  flex: 1;
}
.person span {
  font-size: 14px;
  color: var(--navy-70);
}
.person .flag {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.brief {
  display: grid;
  gap: 16px;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.brief label {
  display: grid;
  gap: 8px;
  font: 700 14px/1 Satoshi, system-ui, sans-serif;
}
.brief input,
.brief textarea {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--radius-s);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 16px;
  font-weight: 400;
  resize: vertical;
  transition: box-shadow 0.15s ease;
}
.brief input:focus,
.brief textarea:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--blue), 0 0 0 3px rgba(31, 102, 220, 0.14);
}
.brief .button {
  justify-self: start;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips button {
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: box-shadow 0.15s ease, color 0.15s ease;
}
.chips button:hover {
  box-shadow: inset 0 0 0 1px var(--ink);
  color: var(--ink);
}
.form-note {
  font-size: 13px;
}
.form-note.error {
  color: #b42318 !important;
}
details {
  border-top: 1px solid var(--line);
  padding: 16px 0 0;
}
details + details {
  margin-top: -2px;
}
summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  font: 700 16px/1.3 Satoshi, system-ui, sans-serif;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "+";
  flex: none;
  font-weight: 400;
  color: var(--navy-50);
}
details[open] summary::after {
  content: "–";
}
details p {
  margin-top: 8px !important;
  font-size: 15px;
}
.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding-top: 8px;
  font-size: 13px;
}
.legal a {
  color: var(--navy-70);
  text-decoration: none;
}
.legal a:hover {
  color: var(--blue);
}

.menu {
  position: fixed;
  inset: calc(16px + var(--safe-top)) calc(16px + var(--safe-right)) auto auto;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px - var(--safe-top) - var(--safe-bottom));
  margin: 0;
  padding: 24px;
  overflow-y: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 80px -24px rgba(27, 50, 99, 0.5);
}
.menu[open] {
  animation: menu-in 0.3s cubic-bezier(0.2, 0.9, 0.25, 1);
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sheet-head h2 {
  font-size: 24px;
}
.sheet-head .icon-button {
  box-shadow: none;
  background: var(--navy-06);
}
.place-list {
  display: grid;
  gap: 6px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.place-list button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.place-list button:hover {
  background: var(--blue-soft);
}
.menu-map {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 0.78;
  margin: 0 0 12px;
  border-radius: 16px;
  background: #dfeccf;
  cursor: pointer;
}
.place-list .num {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 0 0 1px var(--navy-06);
  font: 700 14px/1 Satoshi, system-ui, sans-serif;
}
.place-list .visited .num {
  background: var(--navy);
}
.place-list .bunker .num {
  background: #0b1426;
  box-shadow: 0 0 0 1px rgba(102, 181, 247, 0.5);
}
.place-list .bunker.visited .num {
  color: var(--blue-light);
}
.place-list strong {
  display: block;
  font: 700 16px/1.2 Satoshi, system-ui, sans-serif;
}
.place-list small {
  color: var(--navy-50);
}
.menu-subtitle {
  margin: 0 0 8px;
  font: 700 15px/1.2 Satoshi, system-ui, sans-serif;
}
.controls-list {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
  font-size: 14px;
}
.controls-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.controls-list dd {
  margin: 0;
  text-align: right;
  color: var(--navy-70);
}

.toast {
  position: fixed;
  left: 50%;
  top: calc(84px + var(--safe-top));
  z-index: 30;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 999px;
  color: #fff;
  background: var(--navy);
  box-shadow: var(--shadow);
  font: 700 15px/1.2 Satoshi, system-ui, sans-serif;
  white-space: nowrap;
  animation: toast-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -12px);
  }
}

.noscript-note {
  margin: 0;
  padding: 12px 16px;
  background: var(--blue-soft);
  text-align: center;
}

/* ---------- menu tabs ---------- */

.tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 14px;
  padding: 4px;
  border-radius: 14px;
  background: var(--navy-06);
}
.tabs button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: 700 14px/1 Satoshi, system-ui, sans-serif;
  color: var(--navy-70);
  cursor: pointer;
}
.tabs button[aria-selected="true"] {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 1px 3px rgba(27, 50, 99, 0.12);
}
.pane-lead {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--navy-70);
}
.menu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.menu-actions svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-actions .button[aria-pressed="true"] {
  color: #fff;
  background: var(--navy);
  box-shadow: none;
}
#reset-progress {
  color: var(--navy-50);
}
/* a setting: its name, a row of plain choices, a quiet line under it */
.setting {
  display: grid;
  gap: 8px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--line);
}
.setting-label {
  font: 700 15px/1.2 Satoshi, system-ui, sans-serif;
  color: var(--ink);
}
.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: var(--radius-s);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  overflow: hidden;
}
.segmented button {
  min-height: 40px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 700 14px/1 Satoshi, system-ui, sans-serif;
  cursor: pointer;
}
.segmented button + button {
  box-shadow: inset 1px 0 0 var(--line);
}
.segmented button[aria-pressed="true"] {
  background: var(--blue);
  color: #fff;
  box-shadow: none;
}
.segmented button:focus-visible {
  outline: 2px solid rgba(31, 102, 220, 0.45);
  outline-offset: -2px;
}
.setting-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 420px) {
  .segmented {
    grid-template-columns: repeat(2, 1fr);
  }
  .segmented button:nth-child(3) {
    box-shadow: inset 0 1px 0 var(--line);
  }
  .segmented button:nth-child(4) {
    box-shadow: inset 1px 1px 0 var(--line);
  }
}
.touch-note {
  display: none;
}
body.touch-mode .touch-note {
  display: block;
}

/* ---------- achievement ---------- */

.achievement {
  position: fixed;
  left: 50%;
  top: calc(84px + var(--safe-top));
  z-index: 31;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 280px;
  max-width: calc(100vw - 32px);
  padding: 12px 20px 12px 12px;
  border-radius: 18px;
  background: #1b3263;
  color: #fff;
  box-shadow: 0 24px 48px -18px rgba(27, 50, 99, 0.7);
  transform: translateX(-50%);
  animation: achievement-in 0.55s cubic-bezier(0.2, 1.2, 0.3, 1);
}
.achievement-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f2c230, #e0601c);
}
.achievement-icon svg {
  width: 26px;
  height: 26px;
  fill: #fff;
  animation: spin-in 0.8s cubic-bezier(0.2, 1.2, 0.3, 1);
}
.achievement-text {
  display: grid;
  gap: 3px;
}
.achievement small {
  font: 600 12.5px/1.1 Source, system-ui, sans-serif;
  color: #f2c230;
}
.achievement strong {
  font: 700 18px/1.1 Satoshi, system-ui, sans-serif;
}
.achievement span:last-child {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}
@keyframes achievement-in {
  from {
    opacity: 0;
    transform: translate(-50%, -20px) scale(0.9);
  }
}
@keyframes spin-in {
  from {
    transform: rotate(-180deg) scale(0.3);
  }
}

.portal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: radial-gradient(80% 80% at 50% 45%, #0c1a38 0%, #03060d 70%);
  opacity: 0;
  transition: opacity 0.38s ease;
  pointer-events: none;
}
.portal.open {
  opacity: 1;
  pointer-events: auto;
}
.portal-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: #fff;
  text-align: center;
  transform: translateY(10px);
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.portal.open .portal-card {
  transform: none;
}
.portal-card small {
  font: 600 15px/1.2 Source, system-ui, sans-serif;
  color: rgba(220, 232, 255, 0.7);
}
.portal-card strong {
  font: 700 clamp(24px, 4vw, 34px)/1.1 Satoshi, system-ui, sans-serif;
  letter-spacing: -0.02em;
}
.portal-depth {
  font: 700 15px/1 Satoshi, system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
}
.portal-depth b {
  font-size: 44px;
  color: #fff;
  letter-spacing: -0.03em;
}
.portal-bar {
  width: 200px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.portal-bar span {
  display: block;
  height: 100%;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
}

/* the data centre is dark, like the hall below */
.panel.dark {
  color: #fff;
  background: #070f22;
  box-shadow: 0 0 0 1px rgba(102, 181, 247, 0.18), 0 30px 80px -24px rgba(0, 0, 0, 0.7);
}
.panel.dark .panel-close {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
section.dark {
  color: #fff;
}
section.dark p,
section.dark .form-note {
  color: rgba(220, 232, 255, 0.72);
}
section.dark .lead {
  color: #fff;
}
.figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.figures li {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 16px 0 18px;
  border-top: 1px solid var(--line);
}
.figures b {
  font: 700 32px/1 Satoshi, system-ui, sans-serif;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.figures li:nth-child(3) b {
  font-size: 24px;
  line-height: 32px;
}
.figures span {
  font-size: 14px;
  color: var(--muted);
}
.network-map {
  margin: 4px 0 0;
  padding: 12px;
  border-radius: 14px;
  background: #050b19;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.network-map canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 360 / 136;
}
.network-map figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(220, 232, 255, 0.55);
}
.regions {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.regions li {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.region-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 700 15px/1.2 Satoshi, system-ui, sans-serif;
}
.region-name i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}
.region-name b {
  margin-left: auto;
  font-size: 13px;
  color: var(--navy-70);
  font-variant-numeric: tabular-nums;
}
.cities {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  font-size: 15px;
}
.cities span + span::before {
  content: "·";
  margin: 0 9px;
  opacity: 0.4;
}
.cities .home {
  font-weight: 700;
}
.cities .home::after {
  content: " (Leitstand)";
  font-weight: 400;
  opacity: 0.6;
}
/* in the dark section the same parts on navy */
section.dark {
  --line: rgba(255, 255, 255, 0.1);
}
section.dark .figures span,
section.dark .region-name b {
  color: rgba(220, 232, 255, 0.64);
}
section.dark .cities span {
  color: rgba(230, 240, 255, 0.86);
}
section.dark .cities .home {
  color: #fff;
}

/* ---------- the website without driving ---------- */

.site {
  position: fixed;
  inset: 0;
  width: min(1000px, calc(100vw - 32px));
  height: min(920px, calc(100dvh - 32px));
  margin: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 40px 90px -40px rgba(27, 50, 99, 0.5);
}
.site:not([open]) {
  display: none;
}
.site[open] {
  animation: site-in 0.4s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.site::backdrop {
  background: rgba(232, 239, 245, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@keyframes site-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
}
.site-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px 16px 32px;
  border-bottom: 1px solid var(--line);
}
.site-logo {
  flex: none;
  display: flex;
}
.site-logo img {
  width: auto;
  height: 26px;
  mix-blend-mode: multiply;
}
.site-nav {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
}
.site-nav a {
  padding: 10px 11px;
  border-radius: 8px;
  color: var(--muted);
  font: 700 14.5px/1 Satoshi, system-ui, sans-serif;
  text-decoration: none;
  text-decoration-thickness: 2px;
  text-underline-offset: 9px;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.site-nav a:hover {
  color: var(--ink);
}
.site-nav a[aria-current] {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: var(--blue);
}
.site-menu {
  display: none;
  box-shadow: none;
  background: transparent;
}
.site-close {
  flex: none;
  box-shadow: none;
  background: transparent;
}
.site-menu:hover,
.site-close:hover {
  background: var(--navy-06);
}
.site-drive {
  flex: none;
}
.site-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 64px 48px 72px;
}
.site-body:focus-visible {
  outline-offset: -4px;
}
.site-body .sections {
  max-width: 720px;
  margin: 0 auto;
}
.site-body h2 {
  max-width: 20ch;
  font-size: clamp(32px, 4.6vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}
.site-body section.dark {
  padding: 48px 40px 40px;
  border-radius: 20px;
  background: #070f22;
}
@media (min-width: 861px) {
  .site-body .service-list li {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
  .site-body .figures {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.site-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.site-foot .legal {
  padding: 0;
}
/* the start page: one row per page, like a table of contents */
.cards {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.cards a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.cards b {
  font: 700 20px/1.2 Satoshi, system-ui, sans-serif;
  letter-spacing: -0.02em;
  transition: color 0.15s ease;
}
.cards span {
  grid-column: 1;
  font-size: 15px;
  color: var(--muted);
}
.cards a::after {
  content: "→";
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 20px;
  line-height: 1;
  color: var(--navy-50);
  transition: transform 0.2s ease, color 0.15s ease;
}
.cards a:hover b,
.cards a:hover::after {
  color: var(--blue);
}
.cards a:hover::after {
  transform: translateX(4px);
}
@media (min-width: 861px) {
  .site-body .cards a {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) auto;
    padding: 22px 0;
  }
  .site-body .cards span {
    grid-column: 2;
    grid-row: 1;
  }
  .site-body .cards a::after {
    grid-column: 3;
    grid-row: 1;
  }
}

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  :root {
    --gutter: 14px;
  }
  .logo {
    height: 44px;
    padding: 0 12px;
  }
  .logo img {
    height: 24px;
  }
  .key-hint {
    display: none;
  }
  .minimap-wrap {
    width: 120px;
    height: 120px;
    border-width: 3px;
  }
  .target {
    top: calc(var(--gutter) + var(--safe-top) + 54px);
    left: calc(var(--gutter) + var(--safe-left));
    right: auto;
    transform: none;
    max-width: calc(100vw - 2 * var(--gutter) - 130px);
    height: 46px;
  }
  .target-arrow {
    width: 32px;
    height: 32px;
  }
  .target strong {
    font-size: 15px;
  }
  .target-progress {
    display: none;
  }
  .achievement,
  .toast {
    top: calc(var(--safe-top) + 128px);
  }
  .overview-hint {
    bottom: calc(var(--safe-bottom) + 24px);
    white-space: normal;
    text-align: center;
    width: max-content;
    max-width: calc(100vw - 32px);
  }
  .panel {
    inset: auto 0 0 0;
    width: 100%;
    max-height: 86dvh;
    padding: 28px 20px calc(24px + var(--safe-bottom));
    border-radius: 24px 24px 0 0;
  }
  .panel[open] {
    animation-name: sheet-in;
  }
  .panel::backdrop {
    background: rgba(27, 50, 99, 0.18);
  }
  .panel h2 {
    font-size: 28px;
  }
  .zone-prompt {
    width: calc(100% - 28px - var(--safe-left) - var(--safe-right));
    max-width: 420px;
    justify-content: space-between;
  }
}
@media (max-width: 860px) {
  .site {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }
  .site-head {
    flex-wrap: wrap;
    gap: 10px;
    padding: calc(12px + var(--safe-top)) 14px 12px 18px;
  }
  .site-logo {
    margin-right: auto;
  }
  .site-logo img {
    height: 24px;
  }
  .site-menu {
    display: grid;
    order: 2;
  }
  .site-close {
    order: 3;
  }
  .site-drive {
    order: 1;
    padding: 0 14px;
  }
  .site-nav {
    order: 4;
    flex-basis: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding-top: 6px;
  }
  .site-nav.open {
    display: flex;
  }
  .site-nav a {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 16px;
  }
  .site-nav a[aria-current] {
    text-decoration: none;
    background: var(--navy-06);
  }
  .site-body {
    padding: 36px 20px calc(40px + var(--safe-bottom));
  }
  .site-body section.dark {
    padding: 32px 20px 24px;
  }
  .site-foot {
    padding: 12px 18px calc(12px + var(--safe-bottom));
  }
}
@keyframes sheet-in {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}
@media (max-width: 959px) and (min-width: 761px) {
  /* not enough room between logo and buttons: the destination moves below them */
  .target {
    top: calc(var(--gutter) + var(--safe-top) + 62px);
    max-width: 380px;
  }
  .achievement,
  .toast {
    top: calc(var(--safe-top) + 146px);
  }
}
@media (max-width: 520px) {
  .intro-card {
    padding: 32px 24px 24px;
  }
  .intro-logo {
    width: 128px;
    margin-bottom: 32px;
  }
  .intro-title {
    font-size: 38px;
  }
  .intro-steps {
    grid-template-columns: 1fr;
  }
  .intro-steps li,
  .intro-steps li + li {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 2px 12px;
    padding: 13px 0;
    border-left: 0;
  }
  .intro-steps li + li {
    border-top: 1px solid var(--line);
  }
  .intro-actions {
    width: 100%;
    flex-direction: column;
  }
  .figures b {
    font-size: 26px;
  }
}
@media (max-width: 380px) {
  .hud-actions {
    gap: 6px;
  }
  .icon-button {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    /* no transition at all: even a very short one shows the old state for a frame */
    transition: none !important;
  }
}

/* phones held sideways: a compact intro card */
@media (max-height: 540px) {
  .intro {
    padding: 12px;
  }
  .intro-card {
    padding: 20px 28px;
    width: min(620px, 100%);
  }
  .intro-logo {
    width: 110px;
    margin-bottom: 14px;
  }
  .intro-title {
    font-size: 30px;
  }
  .intro-lead {
    margin-top: 6px;
    font-size: 15px;
  }
  .intro-steps {
    margin-top: 16px;
  }
  .intro-steps li,
  .intro-steps li + li {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .intro-actions {
    margin-top: 14px;
  }
}
