:root {
  color-scheme: dark;
  --blackout: #12090c;
  --walnut: #352720;
  --bone: #f1e6d6;
  --safelight: #ff5c61;
  --brass: #d9ab68;
  --ink: #2c1e19;
  --display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --instrument: 'IBM Plex Mono', 'Courier New', Courier, monospace;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono'; /* taste-skill-ignore: exchange instrument face */
  src: url('/fonts/ibm-plex-mono-latin.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; color: var(--bone); background: var(--blackout); font: 1.125rem/1.45 var(--display); }
a { color: inherit; text-underline-offset: .23em; text-decoration-thickness: .07em; }
a:hover { text-decoration-thickness: .14em; }
a:active { opacity: .8; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 5px; }
button { font: inherit; color: inherit; }
h1, h2, p, figure { margin: 0; }
h1, h2 { font-weight: 400; }
h1 { font-size: clamp(2.4rem, 6.6vw, 6rem); letter-spacing: -.045em; line-height: .99; }
h2 { font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.1; letter-spacing: -.025em; }
.shell { width: min(100% - clamp(2rem, 6.5vw, 6rem), 76rem); margin-inline: auto; }
.mast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .85rem 1.2rem;
  padding-block: clamp(1.65rem, 4vw, 3.65rem) 1.25rem;
}
.mast p { grid-column: 1 / -1; max-width: 54ch; }
.mast bdi { overflow-wrap: anywhere; }
.mast h1.long-address { font-size: clamp(1.65rem, 4.5vw, 4.65rem); }
.home-link { align-self: center; padding-block: .4rem; color: var(--brass); white-space: nowrap; }
.home-link span { margin-inline-start: .18em; }
.mast-controls { display: flex; align-items: center; gap: .9rem; }
.directory { padding: 1.35rem 0 2rem; }
.directory h2 { font-size: 1.15rem; }
.directory ul { display: flex; flex-wrap: wrap; gap: .45rem 1.5rem; padding: 0; margin: .45rem 0 0; list-style: none; }
.static-slip { padding: clamp(1.3rem, 5vw, 3rem); background: var(--walnut); }
.static-slip p, .static-slip a { display: block; max-width: 57ch; margin-top: .65rem; }
.static-slip a { color: var(--brass); width: fit-content; }
.archive-print { max-width: 42rem; }
.print { background: var(--bone) url('/materials/paper.svg') repeat; color: var(--ink); padding: clamp(.48rem, 1vw, .9rem); }
.print canvas { display: block; width: 100%; height: auto; }
.print figcaption { padding: .48rem .05rem 0; }
.print figcaption a { font-weight: 700; }
.print :focus-visible { outline-color: #643520; }

.error-page {
  --room-light: var(--safelight);
  --amber-opacity: 0;
  --room-fade: 1100ms cubic-bezier(.22,.61,.36,1);
  isolation: isolate;
  position: relative;
  overflow-x: clip;
}
.error-page[data-state="ready"] { --room-light: var(--brass); --amber-opacity: 1; }
.error-page::before, .error-page::after {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: '';
  pointer-events: none !important;
}
.error-page::before { background: radial-gradient(ellipse at 29% 46%, #4b171b, #210f12 49%, #12090c 80%); } /* taste-skill-ignore: room safelight */
.error-page::after { background: radial-gradient(ellipse at 29% 50%, #483121, #21130f 56%, #12090c 84%); opacity: var(--amber-opacity); transition: opacity var(--room-fade); } /* taste-skill-ignore: room tungsten light */
.error-page .shell { width: min(100% - clamp(2rem, 5.3vw, 5rem), 82rem); }
.error-page .mast { gap: .4rem 1rem; padding-block: clamp(1.1rem, 3vw, 2.6rem) .95rem; }
.error-page h1 { font-size: clamp(2.25rem, 5.8vw, 5.3rem); }
.error-page .mast p { font-weight: 600; }
.error-page .directory { position: relative; padding: 1.1rem 0 1.6rem; }
.error-page .directory a { color: #eac89b; }
.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  min-height: 2.75rem;
  padding: .3rem .7rem;
  border: 1px solid #876644; /* taste-skill-ignore: switch brass bezel */
  border-bottom: 3px solid #100806;
  background: #261b17;
  color: var(--bone);
  font: 600 1rem/1.2 var(--display);
  cursor: pointer;
  white-space: nowrap;
}
.sound-toggle::before {
  content: '';
  width: .92rem;
  height: .92rem;
  background: #e8be82;
  mask: url('/icons/volume-x.svg') center / contain no-repeat;
}
.sound-toggle[aria-pressed="true"]::before { mask-image: url('/icons/volume-2.svg'); }
.sound-toggle:hover, .sound-toggle[aria-pressed="true"] { background: #503427; }
.sound-toggle:active { transform: translateY(2px); }
.sound-toggle:disabled { cursor: default; }

.workbench {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: clamp(1rem, 4.4vw, 4rem);
  align-items: start;
  padding: clamp(.85rem, 2.75vw, 2.5rem);
  padding-bottom: clamp(1.25rem, 3.25vw, 3rem);
  border: solid #523428;
  border-width: .15rem .15rem .92rem;
  border-bottom-color: #20130d;
  background: #6d4a34 url('/materials/wood-table-worn.webp') center / 42rem auto;
  background-blend-mode: multiply;
}
.workbench::before, .workbench::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: '';
  pointer-events: none !important;
}
.workbench::before { background: radial-gradient(ellipse at 22% 7%, #9e342f85, #401b1960 49%, #1409078a); } /* taste-skill-ignore: physical red pool */
.workbench::after { background: radial-gradient(ellipse at 24% 13%, #d9934a80, #5d332079 53%, #1e100eb6); opacity: var(--amber-opacity); transition: opacity var(--room-fade); } /* taste-skill-ignore: physical amber pool */

.receiver { min-width: 0; }
.printer, .board {
  position: relative;
  background: #513628 url('/materials/dark-wood.webp') center / 36rem auto;
  background-blend-mode: multiply;
}
.printer {
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .65rem;
  padding: .9rem clamp(.8rem, 2.2vw, 1.8rem) .56rem;
  border: solid #5f4330;
  border-width: .18rem .19rem .27rem;
  border-bottom-color: #160c08;
}
.printer h2, .board-heading h2 {
  font: 600 1.12rem/1.15 var(--display);
  letter-spacing: .015em;
}
.lamp {
  position: relative;
  width: 1.58rem;
  aspect-ratio: 1;
  border: .26rem solid #a88355;
  border-right-color: #72513b;
  border-bottom-color: #4d2d20;
  border-radius: 50%;
  background-color: var(--room-light);
  background-image: radial-gradient(circle at 40% 28%, #fff4cfaa, transparent 48%); /* taste-skill-ignore: light within the pilot glass */
  transition: background-color var(--room-fade);
  animation: lamp-strike .82s .18s both, lamp-idle 8s 1.15s infinite;
}
.lamp::before { content: ''; position: absolute; inset: .12rem; border-radius: 50%; border-top: .11rem solid #fff1c2b3; transform: rotate(-34deg); }
.lamp::after { content: ''; position: absolute; inset: 1px auto auto 3px; width: .25rem; height: .18rem; border-radius: 50%; background: #fff1d5c9; }
@keyframes lamp-strike { 0%, 28% { opacity: .44; } 32%, 52%, 100% { opacity: 1; } 59% { opacity: .62; } }
@keyframes lamp-idle { 0%, 41%, 44%, 100% { opacity: 1; } 42% { opacity: .81; } }

.roller {
  grid-column: 1 / -1;
  position: relative;
  height: 1.24rem;
  overflow: hidden;
  padding-inline: .68rem;
  background: #070403;
  border-block: .16rem solid #52372a;
}
.roller span {
  position: absolute;
  inset: .1rem .84rem .12rem;
  overflow: hidden;
  background: #96704b url('/materials/brass.svg') center / 100% 100%;
}
.roller span::after { position: absolute; inset: -10px 0; content: ''; background: url('/materials/brass.svg') center / 100% 10px; opacity: .35; }
.roller i { position: absolute; top: 0; width: .95rem; height: 100%; border: .17rem solid #916944; border-radius: 40%; background: #372419; }
.roller i:nth-child(2) { left: .14rem; }
.roller i:nth-child(3) { right: .14rem; }
.roller i::after { position: absolute; inset: 30% 30%; border-radius: 50%; background: #c49a63; content: ''; }
.workbench[data-phase="feed"] .roller span::after { animation: turn .17s linear 8; }
@keyframes turn { to { transform: translateY(10px); } }

.receiver-slot { position: relative; overflow: hidden; padding: 0 .6rem .45rem; }
.receiver-slot::before {
  position: absolute; z-index: 2; content: ''; inset: 0 7% auto; height: .74rem;
  background: linear-gradient(#130806c4, transparent); pointer-events: none !important; /* taste-skill-ignore: slot casts onto the sheet */
}
.receiver .print {
  position: relative;
  width: 92%;
  margin-inline: auto;
  transform-origin: 50% 0;
  background-color: #e9decf;
  box-shadow: .2rem .48rem .7rem #110704a6; /* taste-skill-ignore: paper cast shadow */
  transition: background-color var(--room-fade);
}
.workbench[data-state="ready"] .print { background-color: #f4ead9; }
.exposure { position: relative; aspect-ratio: 1.6; overflow: hidden; background: #251a16; }
.exposure::after {
  position: absolute; inset: 0; content: ''; background: #a63b31; mix-blend-mode: multiply;
  opacity: .12; transition: opacity var(--room-fade); pointer-events: none !important;
}
.workbench[data-state="ready"] .exposure::after { opacity: 0; }
.exposure canvas { width: 100%; height: 100%; object-fit: cover; }
.workbench[data-state="ready"] .exposure canvas { animation: exposure-drift 18s ease-in-out infinite alternate; }
@keyframes exposure-drift { to { transform: scale(1.032) translateX(.45%); } }
.receiver figcaption {
  display: grid;
  grid-template-rows: 1fr auto;
  block-size: 4.05rem;
  gap: .12rem;
  font-weight: 600;
  line-height: 1.16;
}
.receiver figcaption a { width: fit-content; padding: .12rem 0; text-decoration-thickness: .085em; }
.workbench[data-phase="eject"] .print { animation: eject 120ms cubic-bezier(.18,.64,.66,1) both; }
.workbench[data-phase="feed"] .print { animation: feed 1580ms cubic-bezier(.21,.69,.36,1) both; }
@keyframes eject { to { transform: translateY(2rem) rotate(.6deg); opacity: 0; } }
@keyframes feed {
  0% { transform: perspective(42rem) translateY(-99%) rotateX(-6deg); }
  88% { transform: perspective(42rem) translateY(0) rotateX(1.5deg); }
  100% { transform: perspective(42rem) translateY(0) rotateX(0); }
}

.board {
  min-width: 0;
  padding: 1.12rem clamp(.75rem, 2vw, 1.5rem) .7rem;
  border: .24rem solid #704f35;
  border-right-color: #37241a;
  border-bottom-color: #21120d;
}
.fasteners { position: absolute; inset: .4rem; pointer-events: none !important; }
.fasteners i {
  position: absolute; width: .42rem; aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(138deg, #ba9365 37%, #392317 39% 56%, #8e6544 60%); /* taste-skill-ignore: slotted brass screw */
}
.fasteners i:nth-child(1) { top: 0; left: 0; }
.fasteners i:nth-child(2) { top: 0; right: 0; }
.fasteners i:nth-child(3) { bottom: 0; left: 0; }
.fasteners i:nth-child(4) { bottom: 0; right: 0; }
.board-heading { padding: .15rem .18rem .8rem; }
.board-heading p { margin-top: .25rem; color: #e8cbb4; font-size: 1.03rem; font-weight: 600; }
.sockets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .24rem;
  padding: .58rem .25rem .4rem;
  background: #1a1110;
  border-block: .16rem solid #563829;
}
.socket {
  position: relative;
  display: grid;
  grid-template-rows: .68rem 2.25rem 1.4rem 3.1rem;
  justify-items: center;
  align-items: center;
  gap: .15rem;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: .12rem 0;
  cursor: pointer;
}
.socket:focus-visible { z-index: 2; outline-offset: -2px; }
.line-lamp {
  display: block;
  width: .59rem;
  aspect-ratio: 1;
  border: .13rem solid #77563e;
  border-radius: 50%;
  background: #503028;
}
.socket.is-suggested .line-lamp, .socket[aria-pressed="true"] .line-lamp, .socket.is-drop-target .line-lamp {
  background: var(--room-light);
}
.socket.is-suggested:not([aria-pressed="true"]) .line-lamp { animation: breathe 2.7s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .44; } }
.jack {
  position: relative;
  grid-row: 4;
  width: 2.7rem;
  aspect-ratio: 1;
  border: .32rem solid #b78a52;
  border-left-color: #ebc693;
  border-right-color: #7e5839;
  border-bottom-color: #64402a;
  border-radius: 50%;
  background: #0b0605;
}
.jack::after {
  position: absolute; inset: .02rem; content: ''; border-radius: 50%;
  border: .082rem dashed #ba85554f; /* taste-skill-ignore: concentric bushing threads */
  pointer-events: none;
}
.socket:hover .jack, .socket.is-drop-target .jack {
  outline: .15rem solid #e4b980;
  outline-offset: .12rem;
}
.socket[aria-pressed="true"] .jack { border-top-color: #f4cc8a; }
.socket:active .jack { transform: scale(.95); }
.socket.is-striking .line-lamp { animation: contact-flash 200ms ease-out; }
@keyframes contact-flash { 0%, 40% { background: #fff0bc; transform: scale(1.22); } }
.engraving {
  display: grid;
  grid-row: 2;
  place-content: center;
  position: relative;
  width: 100%;
  min-height: 1.85rem;
  padding: .13rem .18rem;
  border: 1px solid #987952; /* taste-skill-ignore: physical engraving strip */
  background: #dec6a0;
  color: #2c1e19;
  font: .8125rem/1.04 var(--instrument);
  text-align: center;
}
.engraving::before, .engraving::after {
  position: absolute; top: 45%; width: .15rem; aspect-ratio: 1; border-radius: 50%; background: #826044; content: '';
}
.engraving::before { left: .19rem; }
.engraving::after { right: .19rem; }
.suggestion { grid-row: 3; color: #ffd6c4; text-align: center; font: 600 .875rem/1 var(--display); }
.board-foot {
  display: grid;
  position: relative;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: .2rem .4rem;
  min-height: 5.4rem;
  margin-top: .65rem;
  background: #241815;
  border-block: .16rem solid #573b29;
}
.grommet { grid-column: 1; width: 1.16rem; aspect-ratio: 1; border: .21rem solid #9d7548; border-radius: 50%; background: #0b0605; }
.cradle {
  grid-column: 2; justify-self: end; width: 4.9rem; height: 1.37rem; margin-right: 1.35rem;
  border: solid #695140; border-width: 0 .21rem .25rem; background: #160d0a;
}
.socket.secret { grid-column: 3; display: grid; grid-template: auto / auto; width: 2.8rem; min-height: 2.8rem; }
.socket.secret .jack { grid-row: 1; width: 1.53rem; border-width: .24rem; }

.plug {
  position: absolute;
  z-index: 6;
  inset: 0 auto auto 0;
  width: 73px;
  height: 46px;
  transform-origin: 66px 23px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.plug-hardware {
  position: absolute; left: 4px; top: 13px; width: 47px; height: 20px;
  border-block: .15rem solid #957456;
  border-radius: .25rem .1rem .1rem .25rem;
  background: repeating-linear-gradient(90deg, #241612 0 3px, #745037 3px 5px); /* taste-skill-ignore: knurled plug grip */
  box-shadow: 0 .2rem .27rem #100604; /* taste-skill-ignore: plug cast shadow */
}
.plug-hardware::before, .plug-hardware::after { position: absolute; content: ''; background: #b18a57 url('/materials/brass.svg') center / 100% 100%; }
.plug-hardware::before { left: 100%; top: -2px; width: 7px; height: 20px; border-radius: .14rem; }
.plug-hardware::after { left: calc(100% + 7px); top: 3px; width: 9px; height: 10px; border-radius: 0 .18rem .18rem 0; }
.workbench.is-dragging .plug { cursor: grabbing; }
.cord { position: absolute; z-index: 5; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cord, .cord * { pointer-events: none !important; }
.cord path { fill: none; stroke-linecap: round; }
.cord-shadow { stroke: #0d0504bb; stroke-width: 15; transform: translate(2px, 6px); }
.cord-line { stroke: #291a16; stroke-width: 11; }
.cord-weave { stroke: #a37c54; stroke-width: 7; stroke-dasharray: 1.4 3.1; opacity: .63; }
.cord-halo, .cord-signal { opacity: 0; stroke-dasharray: .38 1.3; stroke-dashoffset: .39; }
.cord-halo { stroke: #d99a4f; stroke-width: 9; filter: blur(2px); }
.cord-signal { stroke: #ffcf89; stroke-width: 4.5; }
.workbench[data-state="receiving"] :is(.cord-halo, .cord-signal) { animation: signal 1.68s linear both; }
@keyframes signal { 11%, 87% { opacity: .89; } to { opacity: 0; stroke-dashoffset: -1.14; } }

.dust {
  position: absolute; z-index: 1; inset: 0; overflow: hidden; pointer-events: none !important;
}
.dust::after {
  position: absolute; inset: 0; content: ''; pointer-events: none !important;
  background: url('/materials/paper.svg') repeat; mix-blend-mode: screen; opacity: .21;
}
.dust i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #ffe0b2; opacity: 0; pointer-events: none !important; animation: dust 9s linear infinite; }
.dust i:nth-child(1) { left: 46%; top: 13%; }
.dust i:nth-child(2) { left: 49%; top: 27%; animation-delay: -4s; }
.dust i:nth-child(3) { left: 43%; top: 18%; animation-delay: -8s; }
.dust i:nth-child(4) { left: 52%; top: 19%; animation-delay: -2s; }
.dust i:nth-child(5) { left: 47%; top: 6%; animation-delay: -7s; }
.dust i:nth-child(6) { left: 53%; top: 32%; animation-delay: -5s; }
@keyframes dust {
  0%, 100% { opacity: 0; transform: translate(-10px, 22px); }
  20%, 58% { opacity: .57; }
  92% { opacity: 0; transform: translate(19px, -24px); }
}
.error-page .mast h1, .error-page .mast p, .receiver, .board, .error-page .directory,
.sockets .engraving { animation: arrive .55s both; }
.error-page .mast p { animation-delay: .07s; }
.receiver { animation-delay: .13s; }
.board { animation-delay: .22s; }
.sockets .engraving { animation-delay: .28s; }
.sockets .socket:nth-child(2) .engraving { animation-delay: .34s; }
.sockets .socket:nth-child(3) .engraving { animation-delay: .40s; }
.sockets .socket:nth-child(4) .engraving { animation-delay: .46s; }
.error-page .directory { animation-delay: .38s; }
@keyframes arrive { from { opacity: .75; transform: translateY(.32rem); } }

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

@media (min-width: 676px) and (max-width: 930px) {
  .workbench { gap: .85rem; padding-inline: .85rem; }
  .board { padding-inline: .56rem; }
  .jack { width: 2.28rem; }
}
@media (min-width: 931px) {
  .board { align-self: center; margin-bottom: 1.3rem; }
}
@media (max-width: 675px) {
  .mast { gap: .5rem; padding-bottom: .85rem; }
  .error-page .mast { grid-template-columns: 1fr; gap: .29rem; padding-block: .62rem .6rem; }
  .error-page h1 { font-size: clamp(2rem, 8.5vw, 3.25rem); }
  .error-page .mast h1.long-address { font-size: clamp(1.35rem, 5.2vw, 1.85rem); }
  .error-page .mast p { font-size: 1.02rem; }
  .mast-controls { grid-row: 1; justify-content: space-between; }
  .sound-toggle { padding-inline: .52rem; }
  .workbench { grid-template-columns: minmax(0, 1fr); gap: .45rem; padding: .56rem .47rem 1.5rem; }
  .printer { gap: .32rem; padding: .44rem .57rem .3rem; }
  .printer h2, .board-heading h2 { font-size: 1rem; }
  .lamp { width: 1.25rem; border-width: .21rem; }
  .roller { height: .9rem; }
  .roller i { width: .75rem; }
  .receiver-slot { padding: 0 .32rem .25rem; }
  .receiver .print { width: 94%; }
  .exposure { aspect-ratio: 16 / 9; }
  .receiver figcaption { block-size: 4rem; font-size: 1rem; }
  .board { padding: .44rem .43rem .33rem; }
  .board-heading { padding: .12rem .4rem .42rem; }
  .board-heading p { margin-top: .15rem; font-size: .94rem; }
  .sockets { padding: .34rem .13rem .15rem; gap: .15rem; }
  .socket { grid-template-rows: .5rem 1.75rem 1.38rem 2.4rem; gap: .08rem; }
  .jack { width: 2.12rem; border-width: .27rem; }
  .engraving { height: 1.75rem; padding: 0 .08rem; line-height: 1; letter-spacing: -.025em; }
  .engraving::before, .engraving::after { width: .105rem; }
  .engraving::before { left: .12rem; }
  .engraving::after { right: .12rem; }
  .board-foot { min-height: 3rem; margin-top: .35rem; }
  .socket.secret { min-height: 2.4rem; }
  .cradle { margin-right: .55rem; }
  .dust { inset: 0 0 35%; }
  .directory ul { gap: .35rem .9rem; }
  .error-page .directory { padding-top: .5rem; line-height: 1.2; }
  .error-page .directory ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: .24rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
