/* The physical receiver and the paper record share the selected input on the hero. */
.trace-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 7px 0 0 auto;
  color: #f4efdf;
  font: 500 12px var(--sans);
}
.trace-link span {
  color: #ff996b;
}
.trace-link:hover {
  text-decoration: underline;
}
.purpose {
  background-color: #eee9d9;
  background-image:
    linear-gradient(#e8e0c957 1px, transparent 1px),
    linear-gradient(90deg, #e8e0c957 1px, transparent 1px);
  background-size: 24px 24px;
  padding: clamp(32px, 4vw, 68px) 0;
}
.purpose-top {
  padding-top: 9px;
}
.bench-intro {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  align-items: end;
  gap: 5vw;
  margin: clamp(18px, 2.4vw, 42px) 0 clamp(17px, 2vw, 37px);
}
.bench-intro #purpose-title {
  font-size: clamp(41px, 4.18vw, 88px);
  line-height: 1.12;
}
.bench-intro #purpose-title span,
.bench-intro #purpose-title em {
  display: inline;
}
.bench-intro > p {
  font-size: clamp(14px, 1.06vw, 21px);
  line-height: 1.43;
  max-width: 36em;
}
.capsule-figure {
  position: relative;
  isolation: isolate;
  perspective: none;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  align-items: stretch;
  height: auto;
  width: 100%;
  margin: 0;
  gap: clamp(12px, 1.3vw, 26px);
}
.machine-bay {
  min-width: 0;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: clamp(250px, 21vw, 400px);
  padding: clamp(13px, 1.5vw, 28px);
  border: 1px solid #939a85;
  background: #d6d9c8;
  background-image:
    linear-gradient(110deg, #e2e1ce88, transparent 56%, #b4beaa55),
    repeating-linear-gradient(0deg, transparent 0 3px, #484f4020 3px 3.6px);
  box-shadow:
    inset 0 0 0 4px #e5e5d8,
    inset 0 0 0 5px #bcc0ac;
}
.bench-index,
.ledger-head,
.record-foot,
.paper-stack small,
.bay-status {
  font: 550 10px/1.5 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.bench-index,
.ledger-head,
.record-foot,
.machine-footer {
  display: flex;
  align-items: center;
  gap: 7px;
}
.signal-dot {
  width: 6px;
  height: 6px;
  background: #396551;
  border-radius: 50%;
}
.bay-status b,
.bay-status i {
  font-weight: 550;
  font-style: normal;
}
.bay-status i {
  display: none;
}
.machine-object {
  position: relative;
  isolation: isolate;
  display: block;
  cursor: pointer;
  min-height: 150px;
  overflow: hidden;
}
.axis {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px dashed #5c6a5055;
}
/* All four photographs share one reversible assembly position. The glass
   stays in front of the paper and the threaded ends seat inside its bore. */
@property --capsule-travel {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}
.capsule-rig {
  --capsule-travel: 0;
  position: absolute;
  inset: 0;
  transform: rotate(calc(3deg - 3deg * var(--capsule-travel)));
  filter: drop-shadow(0 5px 4px #44432825);
  transition: --capsule-travel 950ms cubic-bezier(0.42, 0, 0.25, 1);
}
.part,
.capsule-rig::after {
  position: absolute;
  top: 50%;
  width: var(--width);
  left: calc(var(--seat) + var(--distance) * var(--phase));
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.part img {
  display: block;
  width: 100%;
  height: auto;
}
.part-left {
  --width: 17%;
  --seat: 31.1%;
  --distance: -22.1%;
  --phase: clamp(0, calc(var(--capsule-travel) * 1.22), 1);
  z-index: 0;
}
.part-glass,
.capsule-rig::after {
  --width: 32%;
  --seat: 50%;
  --distance: -14.8%;
  --phase: clamp(0, calc((var(--capsule-travel) - 0.42) * 1.725), 1);
  z-index: 1;
}
.capsule-rig::after {
  content: "";
  aspect-ratio: 704 / 364;
  background: url("./media/glass-shell.webp") center / contain no-repeat;
  mask: url("./media/glass-front-mask.svg") center / 100% 100% no-repeat;
  z-index: 3;
}
.part-letter {
  --width: 26%;
  --seat: 50%;
  --distance: 16.2%;
  --phase: clamp(0, calc((var(--capsule-travel) - 0.13) * 1.36), 1);
  z-index: 2;
}
.part-right {
  --width: 17.4%;
  --seat: 69.65%;
  --distance: 21.55%;
  --phase: clamp(0, calc(var(--capsule-travel) * 1.55), 1);
  z-index: 4;
}
.machine-footer {
  justify-content: space-between;
  gap: 14px;
}
.ruler {
  flex: 1;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    #818a77 0 1px,
    transparent 1px 8px
  );
  opacity: 0.55;
}
.capsule-handle {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  inset: auto;
  z-index: 2;
  padding: 5px 9px;
  background: #233731;
  color: var(--paper);
  border: 0;
  font: 550 12px var(--sans);
  gap: 12px;
}
.capsule-handle b {
  font-size: 16px;
  color: #ffa36d;
}
.capsule-handle span:nth-child(2) {
  display: none;
}
.ledger {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  border-top: 3px solid #9c3d25;
  background: #fff9e6;
  padding: clamp(17px, 1.8vw, 35px);
  box-shadow:
    2px 3px 0 #d9d1b8,
    5px 6px 0 #bfbca5;
  isolation: isolate;
}
.ledger-head,
.record-foot {
  justify-content: space-between;
  color: #586051;
  border-bottom: 1px solid #b6b39d;
  padding-bottom: 7px;
}
.demo-seal {
  color: #8e3b29;
  border: 1px solid currentColor;
  padding: 2px 5px;
  line-height: 1;
}
.record-foot {
  border-top: 1px solid #b6b39d;
  border-bottom: 0;
  padding: 7px 0 0;
  font-size: 9px;
}
.record-foot i {
  display: block;
  width: 35px;
  height: 9px;
  background: repeating-linear-gradient(
    90deg,
    #737d67 0 2px,
    transparent 2px 4px,
    #737d67 4px 5px,
    transparent 5px 9px
  );
}
.paper-stack {
  display: grid;
  min-height: 8.5em;
  align-items: center;
  padding: 14px 0;
}
.paper-stack > .sealed-entry,
.paper-stack > .enclosure {
  grid-area: 1/1;
  position: relative;
  inset: auto;
  width: 100%;
  max-width: none;
  padding: 0;
  background: none;
  box-shadow: none;
  border: 0;
}
.paper-stack small {
  color: #805e43;
  font-size: 9px;
}
.sealed-entry p,
.paper-stack .enclosure strong {
  font: italic 470 clamp(23px, 2.05vw, 43px) / 1.19 var(--serif);
  letter-spacing: -0.05em;
  margin: 6px 0;
}
.paper-stack .enclosure strong {
  display: block;
}
.paper-stack .enclosure p {
  font-size: clamp(13px, 1.05vw, 19px);
  line-height: 1.38;
}
.paper-stack > .enclosure {
  opacity: 0;
  visibility: hidden;
  transform: translateY(9px);
  transition:
    opacity 0.32s,
    transform 0.45s,
    visibility 0.32s;
}
.sealed-entry {
  transition: opacity 0.25s;
}
#capsule-open:checked ~ .machine-bay .capsule-rig {
  --capsule-travel: 1;
}
#capsule-open:checked ~ .machine-bay .bay-status b,
#capsule-open:checked ~ .machine-bay .capsule-handle span:first-child {
  display: none;
}
#capsule-open:checked ~ .machine-bay .bay-status i,
#capsule-open:checked ~ .machine-bay .capsule-handle span:nth-child(2) {
  display: inline;
}
#capsule-open:checked ~ .ledger .enclosure {
  visibility: visible;
  opacity: 1;
  transform: none;
}
#capsule-open:checked ~ .ledger .sealed-entry {
  visibility: hidden;
  opacity: 0;
}
#capsule-open:focus-visible ~ .machine-bay .capsule-handle {
  outline: 3px solid #a54b1e;
  outline-offset: 3px;
}
.from-tg,
.from-max {
  display: none;
}
body:has(#radio-tg:checked) .from-vk,
body:has(#radio-max:checked) .from-vk {
  display: none;
}
body:has(#radio-tg:checked) .from-tg,
body:has(#radio-max:checked) .from-max {
  display: block;
}
.desk-caption {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  align-items: start;
  gap: 3vw;
  margin-top: clamp(21px, 2.8vw, 47px);
  padding-top: 14px;
  border-top: 1px solid #9da491;
}
.desk-caption h3 {
  font: 430 clamp(21px, 2.15vw, 39px) / 1.24 var(--serif);
  letter-spacing: -0.055em;
}
.desk-caption p {
  max-width: 56em;
  color: #36453b;
  font-size: clamp(14px, 1.08vw, 19px);
  line-height: 1.5;
}
@media (max-width: 700px) {
  .trace-link {
    font-size: 11px;
    margin-top: 6px;
  }
  .bench-intro,
  .desk-caption,
  .capsule-figure {
    display: block;
  }
  .bench-intro #purpose-title {
    font-size: clamp(40px, 10vw, 64px);
  }
  .bench-intro #purpose-title span,
  .bench-intro #purpose-title em {
    display: block;
  }
  .bench-intro > p {
    margin-top: 8px;
    font-size: 14px;
    max-width: 31em;
  }
  .machine-bay {
    min-height: 175px;
    padding: 10px 13px;
  }
  .machine-object {
    min-height: 116px;
  }
  .capsule-handle {
    right: auto;
    bottom: auto;
    min-height: 29px;
  }
  .ledger {
    padding: 13px 16px;
    margin: 9px 2px 0;
  }
  .paper-stack {
    min-height: 86px;
    padding: 8px 0;
  }
  .sealed-entry p,
  .paper-stack .enclosure strong {
    font-size: 22px;
  }
  .paper-stack .enclosure p {
    font-size: 13px;
  }
  .record-foot {
    padding-top: 5px;
  }
  .desk-caption {
    margin-top: 20px;
    padding-top: 11px;
  }
  .desk-caption p {
    margin-top: 6px;
    font-size: 14px;
  }
  .purpose {
    padding-block: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .capsule-figure * {
    transition: none !important;
  }
}
/* The detachable end of the dispatch form leads to the same letter on the workbench. */
.instrument {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(125px, 12vw, 205px);
}
.instrument .console {
  border-radius: 4px 0 0 4px;
  border-right: 0;
}
.trace-link {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  gap: 4px;
  width: auto;
  margin: 0;
  border-left: 1px dashed #999b85;
  padding: 10px clamp(13px, 1.4vw, 26px);
  background: #dddcc5;
  color: var(--ink);
  border-radius: 0 3px 3px 0;
}
.trace-link small {
  font: 550 10px/1.3 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #495346;
}
.trace-link b {
  font: 590 clamp(14px, 1.05vw, 20px) / 1.3 var(--sans);
  letter-spacing: -0.04em;
}
.trace-link b span {
  color: #973b25;
}
.trace-link:hover {
  background: #f0ebd8;
  text-decoration: none;
}
.trace-link:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--flame);
  transition: transform 0.23s linear;
}
.trace-link.in-transit:after {
  transform: scaleX(var(--progress, 0));
}
.channel-keys label {
  border-radius: 3px;
  box-shadow: 0 2px 0 #071a17;
}
.dispatch-slip:before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  bottom: 0;
  width: 8px;
  background: radial-gradient(circle, #6c7563aa 1.6px, transparent 1.9px)
    center / 8px 14px repeat-y;
}
@media (max-width: 700px) {
  .instrument {
    display: block;
  }
  .instrument .console {
    border-radius: 3px 3px 0 0;
    border-right: 1px solid #c4cbb266;
  }
  .trace-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 5px 12px;
    border-left: 0;
    border-top: 1px dashed #a2a38b;
    border-radius: 0 0 3px 3px;
  }
  .trace-link small {
    font-size: 9px;
  }
  .trace-link b {
    font-size: 12px;
  }
  .dispatch-slip {
    padding-left: 17px;
  }
}
