.spiral-home {
  --viewport-height: var(--view-height);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
@supports (padding: env(safe-area-inset-top)) {
  .spiral-home > main {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --view-height: calc(var(--viewport-height) - var(--safe-top) - var(--safe-bottom));
    --layout-width: calc(100vw - var(--safe-left) - var(--safe-right));
    padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  }
  .spiral-home .artboard {
    --scale: min(1px, calc(var(--layout-width) / var(--board-width)), calc(var(--view-height) / var(--fit-height)));
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.spiral-stage {
  --start-angle: 36deg;
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--spiral-size) * var(--scale));
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  touch-action: pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.spiral-stage[data-dragging] { cursor: grabbing; }
.spiral-stage:focus-visible { outline: 1px dotted currentColor; }
.spiral-disk-layer {
  width: 100%;
  height: 100%;
}
.spiral-stage[data-disk] .spiral-disk-layer {
  will-change: transform;
  pointer-events: none;
}
.spiral-face {
  display: block;
  width: 100%;
  height: 100%;
  font-variant-ligatures: none;
  transform: rotate(calc(var(--start-angle) + var(--angle, 0deg)));
}
.spiral-stage[data-disk] .spiral-face,
.spiral-stage[data-disk] .spiral-face a { pointer-events: none; }
.spiral-link { fill: var(--link); }
.spiral-face a { cursor: pointer; }
.spiral-face a:is(:hover, :focus-visible) .spiral-link { text-decoration: underline; }
.spiral-stage[data-intro] .spiral-word:not([data-appeared]) { visibility: hidden; }
.spiral-stage[data-intro] a:not([data-appeared]) { visibility: hidden; }
.spiral-stage[data-intro] .spiral-word[data-appeared] { animation: spiral-word-in 155ms ease-out both; }
@keyframes spiral-word-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (max-width: 700px) {
  .home-shell::before {
    /* Keep the backdrop painted while the in-app viewport settles. */
    content: "";
    position: fixed;
    inset: 0;
    min-height: 100lvh;
    z-index: -1;
    pointer-events: none;
    background: var(--background);
  }
  .spiral-home .mobile-artboard {
    display: grid;
    grid-template: minmax(0, 1fr) auto / minmax(0, 1fr);
    overflow: clip;
  }
  .mobile-artboard .spiral-stage {
    --start-angle: 38deg;
    grid-area: 1 / 1 / 2 / 2;
    top: calc(50% + 36.2 * var(--scale));
    left: 50%;
    width: calc(var(--spiral-size) * var(--scale) * 1.155);
  }
  .mobile-artboard .spiral-face {
    /* Bring the center of the empty space onto the rotation axis. */
    transform: rotate(calc(var(--start-angle) + var(--angle, 0deg))) translate(-1.83%, -2.612%);
  }
  .spiral-home .mobile-artboard .footer-toggle {
    grid-row: 2;
    position: relative;
    bottom: auto;
    margin-bottom: calc(var(--footer-bottom) * var(--scale));
  }
}
@media (prefers-reduced-motion: reduce) {
  .spiral-word[data-appeared] { animation: none; }
}
