/* The page stays ordinary until someone finds its loose thread. */
html { background: #fff; }

.zipper {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  --terminal-green: #65ff83;
}

.zipper-pull {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100px;
  height: 132px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #444;
  transform: translate(-50%, -140px);
  touch-action: none;
  cursor: grab;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  will-change: transform;
}

.zipper-pull.is-visible { pointer-events: auto; }
.zipper-pull.is-dragging { cursor: grabbing; }
.zipper-pull:focus-visible { outline: 1px dotted #777; outline-offset: -12px; border-radius: 30px; }
.zipper-pull canvas, .zipper-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.zipper-pull canvas { filter: drop-shadow(2px 5px 3px #0004); }
.zipper-fallback { filter: drop-shadow(2px 5px 3px #0003); }
.zipper-pull.has-metal .zipper-fallback { display: none; }

.zipper-underworld {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #050805;
  clip-path: polygon(50% 0, 50% 0, 50% 0);
  visibility: hidden;
}

.zipper-underworld.is-revealing { visibility: visible; }
.zipper-copy { position: absolute; top: 0; left: 0; }

.zipper-underworld .zipper-copy, html.is-terminal, .is-terminal body, .zipper-type-probe.is-monospace {
  color: #65ff83;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-weight: 400;
  text-shadow: 0 0 12px #65ff8328;
}

.zipper-copy, .is-terminal #content {
  /* Keep one fixed character advance, with the surface's height and line pitch. */
  width: calc((100% - var(--zipper-content-inset, 26px)) / var(--zipper-type-scale, 1));
  transform: scaleX(var(--zipper-type-scale, 1));
  transform-origin: top left;
}

.zipper-copy p, .is-terminal #content p { max-width: calc(800px / var(--zipper-type-scale, 1)); }
@media (max-width: 600px) {
  .zipper-copy p, .is-terminal #content p { max-width: 90%; }
}

.zipper-type-probe { position: fixed; visibility: hidden; white-space: pre; pointer-events: none; }

.zipper-underworld :is(h1, h2, a), .is-terminal :is(h1, h2, a) { color: #65ff83; }
.is-terminal, .is-terminal body { background: #050805; overflow-x: hidden; }
.is-terminal a:hover { color: #c5ffd0; text-shadow: 0 0 15px #65ff8380; }
.is-terminal :is(#nudge1, #nudge2), .zipper-copy [data-nudge] { margin-left: 0; }

.zipper-seam { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.zipper-seam path { fill: none; }
.zipper-seam .seam-shadow { stroke: #0005; stroke-width: 6; filter: blur(3px); }
.zipper-seam .seam-edge { stroke: #ddd; stroke-width: 2; }
.zipper-seam .seam-teeth { stroke: #777; stroke-width: 2.5; stroke-dasharray: 1.5 4; }

.zipper-exit {
  position: fixed;
  top: 22px;
  right: 26px;
  z-index: 21;
  padding: 9px 11px;
  border: 1px solid #65ff8338;
  border-radius: 2px;
  background: #050805;
  color: #65ff83;
  font: 12px/1.2 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  cursor: pointer;
}

.zipper-exit:hover { background: #65ff8315; }
.zipper-exit:focus-visible { outline: 2px solid #65ff83; outline-offset: 3px; }
.zipper-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media print {
  .zipper, .zipper-exit { display: none !important; }
  html.is-terminal, .is-terminal body { background: white; color: black; text-shadow: none; }
  .is-terminal :is(h1, h2, a) { color: black; }
}
