/* A real workspace, assembled from reusable device shells and untouched captures. */
.device-film {
  --device-top: 110px;
  margin-top: 48px;
  position: relative;
}
.device-stage {
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #f8f5f8;
  overflow: clip;
  isolation: isolate;
}
.device-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 22px 28px 12px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.device-browser-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.device-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
}
.device-view {
  width: 100%;
  aspect-ratio: 1.6;
  position: relative;
  overflow: clip;
}
.device-halo {
  position: absolute;
  inset: 10% 3% 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 35% 55%, #f24b9910, transparent 60%),
    radial-gradient(ellipse at 75% 40%, #4875df14, transparent 65%);
  pointer-events: none;
}
.device-world {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  aspect-ratio: 1.6;
  transform-origin: 0 0;
}
.device-model {
  position: absolute;
  filter: drop-shadow(0 14px 12px #29223125);
}
.device-screen {
  position: relative;
  display: block;
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
}
.device-screen img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.device-screen:focus-visible {
  outline: 4px solid var(--brand-blue);
  outline-offset: 4px;
}
.device-desktop {
  width: 55%;
  left: 17%;
  top: 5%;
  z-index: 1;
}
.device-desktop > .device-screen {
  border: 9px solid #242327;
  border-top-width: 13px;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 0 0 1px #757279;
}
.monitor-chin {
  height: 26px;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(110deg, #b4b1b8, #e7e6ea 48%, #b9b7bf);
  display: grid;
  place-items: center;
}
.monitor-chin span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #85818c;
}
.monitor-stand {
  width: 20%;
  height: 46px;
  margin: auto;
  clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%);
  background: linear-gradient(#918c97, #e5e3e8);
}
.monitor-foot {
  width: 39%;
  height: 9px;
  margin: auto;
  border-radius: 50% 50% 30% 30%;
  background: linear-gradient(#eeedf0, #aaa5b0);
}
.device-laptop {
  width: 46%;
  left: 49%;
  top: 43%;
  z-index: 3;
  transform: rotate(2deg);
}
.laptop-lid {
  margin-inline: 7%;
  padding: 9px 7px 8px;
  background: #252429;
  border: 1px solid #77747e;
  border-radius: 11px 11px 3px 3px;
}
.laptop-lid .device-screen {
  border-radius: 3px;
}
.laptop-base {
  height: 15px;
  position: relative;
  border-radius: 2px 2px 45% 45%;
  background: linear-gradient(#dedce3 0%, #f1f0f4 28%, #918d9a 75%, #56515d);
  box-shadow: 0 2px 2px #211a2633;
}
.laptop-base span {
  display: block;
  width: 18%;
  height: 5px;
  margin-inline: auto;
  background: #a29daa;
  border-radius: 0 0 9px 9px;
}
.device-tablet {
  left: 3%;
  top: 36%;
  width: 18%;
  padding: 7px;
  border-radius: 19px;
  background: #242327;
  border: 1px solid #6a6672;
  z-index: 2;
  transform: rotate(-3deg);
}
.device-tablet .device-screen {
  border-radius: 12px;
  background: #22242a;
}
.device-tablet .device-screen img {
  max-height: none;
}
.device-paper {
  left: 23%;
  top: 55%;
  width: 17%;
  z-index: 4;
}
.device-paper .device-screen {
  aspect-ratio: 945 / 1326;
}
.device-paper .device-screen img {
  /* The full invoice sheet, excluding only the phone/browser chrome. */
  position: absolute;
  top: -30.61840121%;
  left: 0;
  width: 100%;
  max-height: none;
}
.paper-caption-heading,
.paper-caption-description {
  display: grid;
  align-items: center;
}
.paper-caption-heading > span,
.paper-caption-description > span {
  grid-area: 1 / 1;
}
.paper-caption-sent {
  visibility: hidden;
}
[data-paper-state="sent"] .paper-caption-ready {
  visibility: hidden;
}
[data-paper-state="sent"] .paper-caption-sent {
  visibility: visible;
}
.dialog-invoice-sheet {
  position: relative;
  width: min(100%, calc((100svh - 180px) * 945 / 1326));
  aspect-ratio: 945 / 1326;
  margin-inline: auto;
  overflow: hidden;
  background: white;
}
.dialog-invoice-sheet .dialog-image {
  position: absolute;
  top: -30.61840121%;
  left: 0;
  width: 100%;
  height: auto;
  max-height: none;
  max-width: none;
}
.device-captions {
  position: relative;
  z-index: 5;
  padding: 12px 24px 22px;
  text-align: center;
}
.device-caption h3 {
  font-size: clamp(21px, 2.3vw, 29px);
  line-height: 1.25;
}
.device-caption > p:not(.device-chapter) {
  max-width: 66ch;
  margin: 8px auto 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.device-chapter {
  margin: 0 auto 8px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
}
.device-detail-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-link);
  text-decoration: underline;
}
.device-shots {
  display: none;
  justify-content: center;
  gap: 8px;
  padding: 0 20px 20px;
}
.device-shot {
  min-height: 40px;
  min-width: 0;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  font-size: 12px;
}
.device-shot[aria-current="true"] {
  background: var(--ink);
  color: var(--on-dark);
  border-color: var(--ink);
}
.device-progress {
  display: none;
  height: 3px;
  background: var(--line);
}
.device-progress-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--brand-text-gradient);
  transform: scaleX(0);
  transform-origin: left center;
}
.is-device-cinematic {
  height: calc(100svh - var(--device-top) + 440svh);
}
.is-device-cinematic .device-stage {
  position: sticky;
  top: var(--device-top);
  height: calc(100svh - var(--device-top) - 12px);
  min-height: 440px;
}
.is-device-cinematic .device-view {
  flex: 1;
  min-height: 0;
  aspect-ratio: auto;
}
.is-device-cinematic .device-model {
  /* Avoid caching a small filtered texture before the camera zooms in. */
  filter: none;
}
.is-device-cinematic .device-tablet {
  box-shadow: 0 10px 14px #29223120;
}
.is-device-cinematic .device-paper .device-screen {
  box-shadow: 0 3px 6px #29223120;
}
.is-device-cinematic .device-captions {
  flex: none;
  min-height: 148px;
  display: grid;
  align-items: center;
}
.is-device-cinematic .device-shots {
  display: flex;
}
.is-device-cinematic .device-progress {
  display: block;
  flex: none;
}
@media (max-width: 600px) {
  .device-film {
    margin-top: 32px;
  }
  .device-stage {
    border-radius: 16px;
  }
  .device-topline {
    padding: 16px 16px 8px;
    font-size: 9px;
    letter-spacing: 0.025em;
  }
  .device-captions {
    padding: 10px 14px 14px;
  }
  .device-caption h3 {
    font-size: 21px;
  }
  .device-caption > p:not(.device-chapter) {
    font-size: 12px;
  }
  .device-shots {
    gap: 5px;
    padding: 0 10px 14px;
  }
  .device-shot {
    padding: 6px 8px;
    font-size: 10px;
    flex: 1;
  }
  .device-desktop > .device-screen {
    border-width: 4px;
    border-top-width: 6px;
    border-radius: 7px 7px 0 0;
  }
  .monitor-chin {
    height: 14px;
    border-radius: 0 0 6px 6px;
  }
  .monitor-stand {
    height: 22px;
  }
  .monitor-foot {
    height: 5px;
  }
  .laptop-lid {
    padding: 4px 3px;
    border-radius: 6px 6px 2px 2px;
  }
  .laptop-base {
    height: 8px;
  }
  .laptop-base span {
    height: 3px;
  }
  .device-tablet {
    padding: 3px;
    border-radius: 9px;
  }
  .device-tablet .device-screen {
    border-radius: 6px;
  }
  .device-film:not(.is-device-cinematic) .device-view {
    aspect-ratio: auto;
    overflow: visible;
  }
  .device-film:not(.is-device-cinematic) .device-world {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
    padding: 24px 16px;
    aspect-ratio: auto;
  }
  .device-film:not(.is-device-cinematic) .device-model {
    position: relative;
    width: 100%;
    top: auto;
    left: auto;
    transform: none;
    align-self: center;
  }
  .device-film:not(.is-device-cinematic) .device-tablet {
    order: 2;
  }
  .device-film:not(.is-device-cinematic) .device-paper {
    order: 3;
  }
}
@media (prefers-reduced-motion: reduce) {
  .device-world {
    will-change: auto;
  }
}
