@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f8f8f2;
  --ink: #232033;
  --blue: #201b9e;
  --orange: #ff7136;
  --muted: #595867;
  --side: clamp(1.35rem, 5.5vw, 6rem);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Instrument Sans", Arial, sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
body { min-width: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button, a, [role="slider"] { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #603de3; outline-offset: 4px; }
.container { width: min(calc(100% - var(--side) - var(--side)), 82rem); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus { position: fixed; z-index: 8; top: 1rem; left: 1rem; background: var(--paper); padding: .7rem 1rem; }
.masthead-inner, .footer-inner, .reader-heading, .panel-line, .dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.masthead-inner { min-height: clamp(3.75rem, 5.4vw, 5rem); }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand img { width: 2.35rem; height: auto; }
.brand span { font-size: clamp(1.25rem, 1.75vw, 1.6rem); font-weight: 600; letter-spacing: -.066em; }
.nav-external, .footer a { font-size: .94rem; text-decoration: underline; text-underline-offset: .23em; text-decoration-thickness: 1px; }
.nav-external:hover, .footer a:hover { color: var(--blue); text-decoration-thickness: 2px; }
.cover {
  color: #fffaf0;
  background: radial-gradient(ellipse at 64% 48%, #1315a6, #1917a5 57%, #201ba2);
  overflow: hidden;
  overflow: clip;
}
.cover-inner {
  display: grid;
  grid-template-columns: 43% 57%;
  min-height: clamp(28.75rem, 40.7vw, 39.5rem);
  align-items: center;
}
.cover-copy { position: relative; z-index: 1; padding-block: clamp(2.1rem, 3.5vw, 4rem); }
.cover h1 {
  font: 400 clamp(4.3rem, 7.2vw, 7.5rem)/.89 var(--serif);
  letter-spacing: -.053em;
}
.cover-intro { max-width: 24rem; margin-top: clamp(1.55rem, 2.1vw, 2.2rem); font-size: clamp(1rem, 1.27vw, 1.18rem); line-height: 1.48; }
.ticket-line { max-width: 25rem; font-size: .96rem; line-height: 1.45; margin-block: 1.35rem .85rem; }
.paths { display: inline-flex; gap: 0; border: 1px solid #bcb9ff; margin: 0; padding: 0; }
.paths label { position: relative; cursor: pointer; padding: .65rem .95rem; font-size: .9rem; }
.paths input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; margin: 0; }
.paths label:has(:checked) { background: var(--paper); color: var(--blue); font-weight: 600; }
.paths label:has(:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; z-index: 1; }
.run-result { margin-top: .9rem; padding-left: .8rem; border-left: 3px solid var(--orange); display: grid; gap: .28rem; }
.run-result code { font: 500 1.12rem/1.25 ui-monospace, monospace; }
.run-result span { font-size: .89rem; line-height: 1.4; }
.ticket {
  display: inline-flex;
  align-items: center;
  min-height: 2.85rem;
  margin-top: clamp(1.25rem, 2vw, 1.9rem);
  padding: .68rem 1.15rem .68rem .7rem;
  gap: .7rem;
  color: #1d1972;
  background: var(--paper);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 600;
  transition: background-color .16s, transform .16s;
}
.ticket::before {
  content: "";
  display: block;
  width: .8rem;
  height: 1.3rem;
  border-right: 1px dashed #aaa6c2;
  background: radial-gradient(circle at 2px 2px, var(--blue) 1.65px, transparent 2px) left center / 5px 7px repeat-y;
}
.ticket:hover { background: #fff; transform: translateY(-2px); }
.cover :focus-visible { outline-color: #ffa46b; }
.cover-art { position: relative; align-self: stretch; pointer-events: none; }
.cover-art img {
  position: absolute;
  width: min(108%, clamp(33rem, 46.5vw, 45rem));
  height: auto;
  max-width: none;
  top: 48%;
  left: 52%;
  transform: translate(-50%, -50%);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 9%, black 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 9%, black 94%, transparent);
}
.reader { padding-block: clamp(2.1rem, 3.7vw, 4rem) clamp(1.6rem, 3vw, 3rem); scroll-margin-top: .5rem; }
.reader-heading { align-items: baseline; margin-bottom: 1.3rem; }
.reader-heading h2, .dialog-head h2 { font: 400 clamp(2.35rem, 3.7vw, 3.9rem)/1 var(--serif); letter-spacing: -.046em; }
.text-button, .quiet, .dialog-head button {
  border: 0;
  border-radius: 0;
  padding: .6rem .05rem;
  background: transparent;
  color: var(--ink);
  font-size: .94rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
}
.text-button:hover, .quiet:hover, .dialog-head button:hover { color: var(--blue); text-decoration-thickness: 2px; }
.panel-line { color: var(--muted); font-size: .88rem; margin-bottom: .6rem; }
.byte-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.track {
  position: relative;
  isolation: isolate;
  height: clamp(6.5rem, 10.2vw, 8.75rem);
  background: #282539;
  border-block: 3px solid #453f51;
  box-shadow: inset 0 6px 7px #0b081733, inset 0 -5px 8px #0b081755;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.track:active { cursor: grabbing; }
.track canvas { width: 100%; height: 100%; display: block; }
.reading-head {
  position: absolute;
  left: 50%;
  top: -5px;
  bottom: -5px;
  width: 1.6rem;
  transform: translateX(-50%);
  border-inline: 2px solid #34284d;
  border-block: 5px solid #34284d;
  background: linear-gradient(100deg, #eae9ff40, #fff3 29%, #fff0 45%, #c6b8ff25 70%, #f0e8ff55);
  box-shadow: .2rem .1rem .35rem #11112657;
  pointer-events: none;
}
.reading-head::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top: 6px solid #34284d;
}
.reading-head::after {
  content: attr(data-hex);
  position: absolute;
  bottom: -.72rem;
  left: 50%;
  transform: translateX(-50%);
  padding: .12rem .42rem;
  background: #34284d;
  color: var(--paper);
  font: 500 .75rem/1.15 ui-monospace, monospace;
}
.transport { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.3rem; padding-top: .75rem; }
.play, .punch-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .58rem;
  padding: .62rem 1.05rem;
  min-height: 2.65rem;
  border: 1px solid var(--ink);
  border-radius: .1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 550;
  font-size: .93rem;
}
.play { min-width: 6rem; }
.play:hover, .punch-submit:hover { background: var(--blue); }
.play-mark { width: .64rem; height: .72rem; background: currentColor; clip-path: polygon(8% 0, 100% 50%, 8% 100%); }
.play[data-playing="true"] .play-mark { clip-path: polygon(0 0, 32% 0, 32% 100%, 0 100%, 0 0, 68% 0, 100% 0, 100% 100%, 68% 100%, 68% 0); }
.message {
  margin-top: 1.55rem;
  padding: .1rem 0 .15rem 1.05rem;
  border-left: 3px solid var(--orange);
  max-width: 56rem;
}
.message p { font: 400 clamp(1.65rem, 2.55vw, 2.6rem)/1.16 var(--serif); letter-spacing: -.018em; overflow-wrap: anywhere; white-space: pre-wrap; }
.message .source-line { font: 400 clamp(1.1rem, 2vw, 1.65rem)/1.4 ui-monospace, monospace; }
.source-line mark { background: #ffad79; color: var(--ink); }
.notice { font-size: .9rem; color: var(--blue); }
.notice:not(:empty), .copy-fallback { margin-top: .8rem; }
.copy-fallback { display: grid; gap: .4rem; max-width: 36rem; font-size: .9rem; }
.copy-fallback input { width: 100%; padding: .5rem; }
.footer { border-top: 1px solid #d5d3d9; color: var(--muted); }
.footer-inner { min-height: 4.5rem; font-size: .86rem; }
.footer a { color: var(--ink); }
dialog {
  width: min(32rem, calc(100% - 2.5rem));
  max-height: calc(100% - 2rem);
  padding: clamp(1.3rem, 4vw, 2.2rem);
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-top: .42rem solid var(--orange);
  box-shadow: .65rem .7rem 0 #14124899;
}
dialog::backdrop { background: #111033aa; }
.dialog-head { align-items: baseline; margin-bottom: 1.65rem; }
.dialog-head h2 { font-size: clamp(2.4rem, 5vw, 3.5rem); }
dialog label { display: block; margin-bottom: .45rem; font-weight: 550; }
dialog textarea { display: block; resize: vertical; min-height: 6.2rem; width: 100%; padding: .75rem; background: white; border: 1px solid #868394; border-radius: 0; color: var(--ink); font-size: 1rem; }
dialog form > p { margin: .85rem 0 1.2rem; line-height: 1.45; color: var(--muted); font-size: .95rem; }
.error-page { min-height: 100svh; display: grid; align-content: center; background: #1917a5; color: var(--paper); }
.error-page h1 { font: 400 clamp(3.6rem, 9vw, 8rem)/.95 var(--serif); letter-spacing: -.045em; }
.error-page p { margin-top: 1.1rem; line-height: 1.5; }
@media (max-width: 850px) and (min-width: 641px) {
  .cover-inner { grid-template-columns: 46% 54%; min-height: 28rem; }
  .cover-art img { width: 130%; left: 56%; }
  .cover-intro { max-width: 20rem; }
}
@media (max-width: 640px) {
  .cover-inner { position: relative; display: block; min-height: 0; }
  .cover-copy { padding-block: 2rem .6rem; max-width: 90%; }
  .cover h1 { font-size: clamp(3.65rem, 12.9vw, 5.5rem); }
  .cover-intro { margin-top: 1.15rem; max-width: 23rem; }
  .ticket { margin-top: 1.15rem; }
  .cover-art { height: clamp(13.3rem, 60vw, 20rem); margin-top: -.55rem; }
  .cover-art img { width: clamp(17.5rem, 75vw, 25rem); top: 46%; left: 66%; -webkit-mask-image: linear-gradient(180deg, transparent, black 13%, black 90%, transparent); mask-image: linear-gradient(180deg, transparent, black 13%, black 90%, transparent); }
  .reader-heading { margin-bottom: .9rem; }
  .panel-line { font-size: .8rem; gap: .5rem; }
  .byte-count { font-size: .8rem; }
  .transport { gap: .18rem 1rem; }
  .transport .quiet { font-size: .87rem; }
  .message { margin-top: 1.15rem; }
  .footer-inner { min-height: 3.7rem; }
}
@media (max-width: 370px) {
  .cover-copy { max-width: 91%; }
  .panel-line { align-items: end; }
  .panel-line #drag-hint { max-width: 11rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
