/* The approved ring, now a controllable spatial performance. */
.current-stage {
  --scene-energy: 0;
  --scene-charge: 0;
}
.current-tools .scene-explore {
  padding: 0 17px;
  background: #e4eaff;
  color: #162044;
  border-color: #e4eaff;
  white-space: nowrap;
  font-size: 10px;
  transition:
    background 0.2s,
    box-shadow 0.2s;
}
.current-tools .scene-explore:hover {
  background: #fff;
  box-shadow: 0 0 22px #7899ff38;
}
.current-tools button:focus-visible {
  outline: 2px solid #b1c3ff;
  outline-offset: 4px;
}
.current-canvas {
  cursor: grab;
}
.current-stage[data-gesture="dragging"] .current-canvas {
  cursor: grabbing;
}
.current-stage[data-gesture="charging"] .current-canvas {
  cursor: none;
}
.current-stage[data-gesture="charging"] .current-cursor {
  transform: scale(calc(1 + var(--scene-charge) * 0.2));
  color: #d3dfff;
}
.current-cursor svg {
  filter: drop-shadow(0 0 7px #789dff80);
}
.current-stage:before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #7391ff;
  opacity: calc(var(--scene-energy) * 0.4 + var(--scene-charge) * 0.3);
  border-radius: inherit;
  pointer-events: none;
  z-index: 4;
  box-shadow: inset 0 0 60px #4b6bfb0d;
}
.explorer-ui[hidden] {
  display: none !important;
}
.exploration-open:after {
  content: "";
  position: fixed;
  inset: 0;
  background: #0b0e17;
  z-index: 115;
}
.current-stage.scene-focused {
  position: fixed !important;
  inset: 14px !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  z-index: 120 !important;
  transform: none !important;
  opacity: 1 !important;
  border-radius: 24px;
  isolation: isolate;
}
.scene-focused:after {
  background: linear-gradient(
    180deg,
    #10111715,
    transparent 60%,
    #101117e6
  ) !important;
}
.scene-focused .current-tools {
  top: 25px;
  bottom: auto;
  left: auto;
  right: 30px;
  max-width: calc(100% - 65px);
}
.scene-focused .gesture-hint {
  display: none;
}
.scene-focused .current-cursor {
  display: grid;
}
.scene-focused .scene-status {
  bottom: 190px;
  left: 45px;
}
.explorer-heading {
  position: absolute;
  left: 45px;
  top: 43px;
  color: #eaf0ff;
  z-index: 5;
  pointer-events: none;
  max-width: 50%;
}
.explorer-heading > p {
  font: 9px var(--mono);
  letter-spacing: 0.09em;
  color: #7f95c0;
  margin-bottom: 25px;
}
.explorer-heading h2 {
  font-size: clamp(25px, 3vw, 46px);
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.04em;
  margin: 0;
}
.explorer-link {
  display: inline-block;
  font-size: 11px;
  line-height: 1.8;
  color: #a2b6dc;
  margin-top: 17px;
  pointer-events: auto;
}
.explorer-link:hover {
  color: #fff;
}
.explorer-dock {
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: min(580px, calc(100% - 60px));
  color: #dfe8ff;
  background: #101724d9;
  border: 1px solid #a4baff30;
  border-radius: 22px;
  padding: 8px 24px 16px;
  backdrop-filter: blur(24px);
  box-shadow: 0 12px 80px #0006;
}
.explorer-modes {
  display: flex;
  gap: 8px;
  padding: 8px 0 16px;
  border-bottom: 1px solid #a4baff20;
}
.explorer-modes button {
  flex: 1;
  border: 0;
  background: transparent;
  color: #879cbd;
  padding: 11px 15px;
  border-radius: 20px;
  font-size: 12px;
  transition:
    background 0.25s,
    color 0.25s;
}
.explorer-modes button[aria-pressed="true"] {
  color: #fff;
  background: #3454dc;
}
.explorer-expansion {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 17px;
  font-size: 10px;
}
.explorer-expansion > span {
  min-width: 75px;
}
.explorer-expansion input {
  flex: 1;
  min-width: 0;
  accent-color: #7692ff;
  cursor: ew-resize;
  height: 20px;
}
.explorer-expansion output {
  font: 9px var(--mono);
  width: 34px;
  text-align: right;
  color: #9bb4eb;
}
.explorer-help {
  text-align: center;
  color: #7187ae;
  font: 8px/1.8 var(--mono);
  margin: 12px 0 0;
}
.explorer-ui button:focus-visible,
.explorer-ui input:focus-visible,
.explorer-ui a:focus-visible {
  outline: 2px solid #bacbff;
  outline-offset: 4px;
}
.scene-focused .explorer-ui {
  animation: explorer-in 0.7s 0.15s both;
}
@keyframes explorer-in {
  from {
    opacity: 0;
    translate: 0 15px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
.chapter-nav button {
  transition: color 0.2s;
}
.chapter-nav button:hover {
  color: #fff;
}
.chapter-copy a:hover > span:last-child,
.round-link:hover {
  transform: translate(3px, -3px);
}
.capability-shortcuts a > span:last-child {
  transition: transform 0.25s;
}
.capability-shortcuts a:hover > span:last-child {
  transform: translate(3px, -3px);
}
@media (max-width: 800px) {
  .current-tools .scene-explore {
    font-size: 9px;
    padding: 0 11px;
  }
  .current-tools .gesture-hint {
    max-width: 95px;
    font-size: 6px !important;
    line-height: 1.8;
  }
  .current-tools {
    left: 18px;
    right: 18px;
    gap: 6px;
  }
  .scene-focused.current-stage {
    inset: 7px !important;
    border-radius: 18px;
  }
  .scene-focused .current-tools {
    top: 18px;
    right: 18px;
    left: 18px;
    max-width: none;
    justify-content: flex-end;
  }
  .explorer-heading {
    top: 90px;
    left: 23px;
    right: 23px;
    max-width: none;
  }
  .explorer-heading > p {
    font-size: 7px;
    margin-bottom: 18px;
  }
  .explorer-heading h2 {
    font-size: 29px;
  }
  .explorer-link {
    font-size: 10px;
    margin-top: 12px;
  }
  .explorer-dock {
    width: calc(100% - 32px);
    bottom: 22px;
    padding: 5px 17px 13px;
    border-radius: 18px;
  }
  .explorer-modes {
    gap: 5px;
    padding-bottom: 11px;
  }
  .explorer-modes button {
    font-size: 11px;
    padding: 10px 8px;
  }
  .explorer-expansion {
    gap: 10px;
    font-size: 9px;
    margin-top: 12px;
  }
  .explorer-expansion > span {
    min-width: 60px;
  }
  .explorer-help {
    font-size: 6px;
    line-height: 1.7;
    margin-top: 9px;
  }
  .scene-focused .scene-status {
    left: 25px;
    bottom: 191px;
  }
  .scene-focused .current-cursor {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .explorer-ui,
  .scene-focused .explorer-ui {
    animation: none;
  }
  .current-cursor {
    display: none !important;
  }
  .current-tools button,
  .explorer-modes button,
  .capability-shortcuts a > span:last-child {
    transition: none;
  }
}
.explorer-ui {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}
.explorer-dock {
  pointer-events: auto;
}
.scene-focused .current-tools {
  z-index: 7;
}
.scene-focused:after {
  background: linear-gradient(
    180deg,
    #10111775,
    transparent 36%,
    #101117e6
  ) !important;
}
.explorer-heading h2 {
  text-shadow: 0 2px 24px #080a10;
}
/* The destination opens through the same circular visual language. */
.page-portal {
  clip-path: circle(0% at var(--portal-x, 50%) var(--portal-y, 50%));
  background: #2142cf;
}
.page-portal span {
  position: relative;
  z-index: 1;
  font-size: clamp(24px, 3.8vw, 58px);
  font-weight: 500;
  max-width: 75%;
  line-height: 1.3;
  text-align: center;
}
.portal-orbit {
  position: absolute;
  width: 65vmin;
  height: 65vmin;
  border: 1px solid #cedcff38;
  border-radius: 50%;
  box-shadow:
    0 0 0 8vmin #cedcff08,
    0 0 0 16vmin #cedcff06,
    0 0 0 26vmin #cedcff04;
}
.page-leaving .page-portal {
  animation: ring-portal-close 0.48s cubic-bezier(0.65, 0, 0.25, 1) forwards;
}
.page-entering .page-portal {
  animation: ring-portal-open 0.6s cubic-bezier(0.65, 0, 0.25, 1) forwards;
}
@keyframes ring-portal-close {
  from {
    clip-path: circle(0% at var(--portal-x, 50%) var(--portal-y, 50%));
  }
  to {
    clip-path: circle(150% at var(--portal-x, 50%) var(--portal-y, 50%));
  }
}
@keyframes ring-portal-open {
  from {
    clip-path: circle(150% at 50% 50%);
  }
  to {
    clip-path: circle(0% at 50% 50%);
  }
}
.site-header .mobile-menu:not([hidden]) > a {
  animation: menu-link-enter 0.45s both;
}
.site-header .mobile-menu > a:nth-child(2) {
  animation-delay: 0.035s;
}
.site-header .mobile-menu > a:nth-child(3) {
  animation-delay: 0.07s;
}
.site-header .mobile-menu > a:nth-child(4) {
  animation-delay: 0.105s;
}
.site-header .mobile-menu > a:nth-child(5) {
  animation-delay: 0.14s;
}
.site-header .mobile-menu > a:nth-child(6) {
  animation-delay: 0.175s;
}
@keyframes menu-link-enter {
  from {
    opacity: 0;
    translate: 0 15px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .page-portal {
    display: none;
  }
  .site-header .mobile-menu:not([hidden]) > a {
    animation: none;
  }
}

.scene-focused .current-canvas {
  touch-action: none;
}
