:root {
  color-scheme: light;
  --bg: #edeef3;
  --ink: #15161a;
  --muted: #5f636d;
  --line: rgba(21, 22, 26, 0.16);
  --underline: rgba(21, 22, 26, 0.35);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-swing: linear(0, 0.368, 0.645, 0.836, 0.95, 0.997, 0.989, 0.938, 0.853, 0.747, 0.629, 0.505, 0.383, 0.269, 0.165, 0.075, 0, -0.06, -0.105, -0.136, -0.155, -0.163, -0.161, -0.153, -0.139, -0.122, -0.102, -0.082, -0.063, -0.044, -0.027, -0.012, 0);
}

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
}

html {
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(21, 22, 26, 0.25) transparent;
}

body {
  overflow: hidden;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 19px;
  -webkit-font-smoothing: antialiased;
}

p { margin: 0; }

button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--underline);
  text-underline-offset: 3px;
  transition: text-decoration-color 150ms ease-out;
}

@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-color: currentColor; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.footer {
  --underline: rgba(21, 22, 26, 0.25);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  color: rgba(21, 22, 26, 0.6);
}

.footer small { font-size: inherit; }

.footer a[aria-current="page"] { color: var(--ink); }

.page { --panel-gap: 28px; }

.art {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.window {
  --ratio: 1155 / 914;
  --overscan: 6px;
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(max(100vw, 100dvh * var(--ratio)) + var(--overscan));
  aspect-ratio: var(--ratio);
  overflow: hidden;
  transform: translate(-50%, -50%);
  touch-action: none;
  touch-action: pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.window img, .window canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.window img { clip-path: inset(1px); }

@media (scripting: enabled) {
  .window { animation: fade-in 500ms var(--ease-out) backwards paused; }
  .window[data-ready] { animation-play-state: running; }
}

@keyframes fade-in {
  from { opacity: 0; }
}

.info > .nav, .info > p, .info > .footer, .prose > *, .doc .footer {
  animation: settle-in 800ms var(--ease-out) backwards;
  animation-delay: calc(120ms + var(--load-order) * 100ms);
}

.info > .nav { --load-order: 0; }
.info > p, .prose > :nth-child(1) { --load-order: 1; }
.info > .footer, .prose > :nth-child(2) { --load-order: 2; }
.prose > :nth-child(3) { --load-order: 3; }
.prose > :nth-child(4) { --load-order: 4; }
.prose > :nth-child(5) { --load-order: 5; }
.prose > :nth-child(n+6), .doc .footer { --load-order: 6; }

@keyframes settle-in {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(4px);
  }
}

.glow {
  --rest-h: min(480px, 75dvh);
  --open-pad: 24px;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 1;
  width: min(760px, 100vw);
  height: var(--rest-h);
  background: radial-gradient(ellipse 100% 100% at 0% 100%, rgba(237, 238, 243, 0.94) 0%, rgba(237, 238, 243, 0.72) 40%, rgba(237, 238, 243, 0) 74%);
  pointer-events: none;
  transition: height 200ms var(--ease-out);
}

.page[data-open] .glow {
  height: min(100dvh, calc(var(--rest-h) + var(--panel-h, 0px) + var(--open-pad)));
}

.info {
  position: fixed;
  bottom: 32px;
  left: 32px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 300px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.navlink {
  padding: 2px 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  transition: text-decoration-color 150ms ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .navlink:hover { text-decoration-color: var(--underline); }
}

.navlink[aria-expanded="true"] { text-decoration-color: currentColor; }

.panel {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 100%;
  max-height: calc(100dvh - 240px);
  padding-bottom: var(--panel-gap);
  overflow-y: auto;
  scrollbar-width: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 120ms ease-out, transform 160ms var(--ease-out), visibility 0s linear 160ms;
}

.panel::-webkit-scrollbar { display: none; }

.page[data-open] .panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 180ms ease-out, transform 220ms var(--ease-out);
}

.stack > * + * { margin-top: 10px; }

.view-enter { animation: fade-up 180ms var(--ease-out) both; }

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: -6px -8px -6px auto;
  transition: transform 160ms var(--ease-out);
}

.close:active { transform: scale(0.94); }

.page:not([data-pinned]) .close { visibility: hidden; }

.icon-x {
  position: relative;
  width: 11px;
  height: 11px;
}

.icon-x::before, .icon-x::after {
  content: "";
  position: absolute;
  top: 5px;
  left: -1px;
  width: 13px;
  height: 1px;
  background: currentColor;
  transform: rotate(45deg);
}

.icon-x::after { transform: rotate(-45deg); }

@media (max-width: 760px) {
  .info {
    right: 16px;
    bottom: 20px;
    left: 16px;
    width: auto;
  }

  .panel { max-height: calc(100dvh - 280px); }

  .glow {
    --fade: 100px;
    --rest-h: calc(var(--info-h, 200px) + var(--fade));
    --open-pad: 0px;
    width: 100vw;
    background: linear-gradient(to top, rgba(237, 238, 243, 0.94) 0%, rgba(237, 238, 243, 0.82) calc(100% - var(--fade)), rgba(237, 238, 243, 0) 100%);
  }
}

@media (max-height: 360px) {
  body { overflow: auto; }

  .page .glow, .page[data-open] .glow {
    inset: 0;
    width: auto;
    height: auto;
    background: linear-gradient(to right, rgba(237, 238, 243, 0.94) 0, rgba(237, 238, 243, 0.94) 340px, rgba(237, 238, 243, 0) 520px);
  }

  .info {
    position: relative;
    inset: auto;
    width: auto;
    max-width: 300px;
    padding: 20px 16px;
  }

  .panel {
    position: static;
    max-height: none;
    margin-top: -14px;
    padding: 14px 0 0;
    overflow: visible;
    transform: none;
  }

  .page:not([data-open]) .panel { display: none; }
}

.doc {
  height: auto;
  overflow: visible;
}

.doc-wrap {
  box-sizing: border-box;
  max-width: 664px;
  margin: 0 auto;
  padding: 32px 32px 40px;
}

.doc-sign {
  display: block;
  width: 48px;
  margin: 0 auto;
  border-radius: 2px;
  -webkit-tap-highlight-color: transparent;
}

.doc-sign img {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 11%;
  user-select: none;
  will-change: transform;
}

.doc-sign[data-swing] img { animation: sign-swing 725ms var(--ease-swing); }

@keyframes sign-swing {
  from { rotate: 0deg; }
  to { rotate: 5deg; }
}

.doc .footer { margin-top: 72px; }

.prose { margin-top: 48px; }

.prose h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 500;
  line-height: 36px;
  letter-spacing: -0.015em;
}

.prose .meta {
  margin-top: 8px;
  color: var(--muted);
}

.prose .meta + p { margin-top: 32px; }

.prose p, .prose ul {
  margin-top: 12px;
  line-height: 22px;
}

.prose ul {
  margin-bottom: 0;
  padding-left: 18px;
}

.prose li + li { margin-top: 6px; }

.prose h2 {
  position: relative;
  margin: 48px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: inherit;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.prose section:has(.qa-list) + h2 {
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  margin: 24px 0 0;
  font-size: inherit;
  font-weight: 600;
}

.prose h2 + h3 { margin-top: 16px; }

.prose strong { font-weight: 600; }

.prose .num {
  position: absolute;
  left: -44px;
  width: 28px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.prose .qa-group { margin-top: 40px; }

.prose h2 + .qa-group { margin-top: 24px; }

.prose .qa-group h3 {
  margin: 0;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.qa-list {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.qa { border-bottom: 1px solid var(--line); }

.prose .qa h4 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.qa-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 15px 0;
  font-weight: 500;
  line-height: 22px;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.qa-q span:first-child {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 150ms ease-out;
}

@media (hover: hover) and (pointer: fine) {
  .qa-q:hover span:first-child { text-decoration-color: var(--underline); }
}

.plus {
  position: relative;
  flex: none;
  width: 11px;
  height: 11px;
  transition: transform 200ms var(--ease-out);
}

.plus::before, .plus::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  width: 11px;
  height: 1px;
  background: currentColor;
}

.plus::after { transform: rotate(90deg); }

.qa-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 220ms var(--ease-out);
}

.qa-a[hidden] { display: none; }

.supports-until-found .qa-a[hidden] { display: grid; }

.qa-inner {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 150ms ease-out;
}

.qa-pad { padding-bottom: 18px; }

.prose .qa-pad > :first-child { margin-top: 0; }

.qa[data-open] .plus { transform: rotate(45deg); }

.qa[data-open] .qa-a { grid-template-rows: 1fr; }

.qa[data-open] .qa-inner { opacity: 1; }

@starting-style {
  .qa[data-open] .qa-a { grid-template-rows: 0fr; }
  .qa[data-open] .qa-inner { opacity: 0; }
}

@media (max-width: 760px) {
  .doc-wrap { padding: 20px 16px 32px; }

  .prose { margin-top: 40px; }

  .prose .num {
    position: static;
    display: inline-block;
    width: auto;
    margin-right: 10px;
    text-align: left;
  }
}

@media (forced-colors: active) {
  .icon-x::before, .icon-x::after, .plus::before, .plus::after {
    forced-color-adjust: none;
    background: CanvasText;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation: none !important;
    transition: none !important;
  }
}

.not-found {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.not-found-mark {
  position: relative;
  margin-bottom: 0.75em;
  font-size: clamp(96px, 28vw, 192px);
}

.not-found h1 {
  margin: 0;
  font-size: inherit;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-box: trim-both cap alphabetic;
  animation: not-found-rise 400ms var(--ease-out) backwards;
}

.not-found .doc-sign {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.1em;
  margin: 0;
  translate: -50% -11%;
  animation: not-found-hang 450ms var(--ease-out) 120ms backwards;
}

@keyframes not-found-rise {
  from {
    opacity: 0;
    transform: translateY(0.04em);
  }
}

@keyframes not-found-hang {
  from {
    opacity: 0;
    transform: translateY(-0.1em);
  }
}
