.mobile-hero-demo {
  display: none;
  width: 100%;
}

.mobile-hero-demo__stage {
  max-width: 380px;
  margin: 32px auto 0;
  padding: 16px;
  border: 1px solid rgba(35, 47, 43, .13);
  border-radius: 26px;
  background: rgba(249, 250, 248, .94);
  box-shadow: 0 22px 46px rgba(30, 43, 39, .12), inset 0 1px 0 rgba(255, 255, 255, .78);
  color: #222724;
  text-align: left;
}

.mobile-hero-demo__instruction {
  margin: 0 4px 12px;
  color: rgba(34, 39, 36, .66);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: -.01em;
}

.mobile-hero-demo__workspace {
  position: relative;
  isolation: isolate;
  height: clamp(274px, 72vw, 326px);
  overflow: hidden;
  border: 1px solid rgba(35, 47, 43, .1);
  border-radius: 20px;
  background: #e2e9e5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .58);
  touch-action: manipulation;
}

.mobile-hero-demo__workspace::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(132deg, rgba(255, 255, 255, .46), transparent 48%), linear-gradient(180deg, rgba(247, 251, 249, .24), transparent 42%);
  content: "";
  pointer-events: none;
  z-index: -1;
}

.mobile-hero-demo__paper {
  position: absolute;
  inset: 26px 58px 26px 18px;
  padding: 20px 18px;
  overflow: hidden;
  border: 1px solid rgba(35, 47, 43, .1);
  border-radius: 16px;
  background: rgba(250, 251, 248, .9);
  box-shadow: 0 12px 22px rgba(30, 43, 39, .08);
}

.mobile-hero-demo__paper-bar {
  display: flex;
  gap: 5px;
  margin-bottom: 28px;
}

.mobile-hero-demo__paper-bar span {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(35, 47, 43, .2);
}

.mobile-hero-demo__paper h3,
.mobile-hero-demo__paper p {
  margin: 0;
}

.mobile-hero-demo__paper h3 {
  max-width: 145px;
  color: rgba(34, 39, 36, .84);
  font-size: 1rem;
  letter-spacing: -.035em;
}

.mobile-hero-demo__paper p {
  max-width: 190px;
  margin-top: 9px;
  color: rgba(34, 39, 36, .54);
  font-size: .75rem;
  line-height: 1.45;
}

.mobile-hero-demo__paper-lines {
  display: grid;
  gap: 8px;
  margin-top: 25px;
}

.mobile-hero-demo__paper-lines span {
  display: block;
  height: 7px;
  border-radius: 99px;
  background: rgba(35, 47, 43, .1);
}

.mobile-hero-demo__paper-lines span:nth-child(1) { width: 86%; }
.mobile-hero-demo__paper-lines span:nth-child(2) { width: 67%; }
.mobile-hero-demo__paper-lines span:nth-child(3) { width: 77%; }

.mobile-hero-demo__rail {
  position: absolute;
  top: 26px;
  right: 0;
  bottom: 26px;
  z-index: 4;
  display: flex;
  width: 62px;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 9px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-right: 0;
  border-radius: 22px 0 0 22px;
  background: #202120;
  box-shadow: -10px 14px 26px rgba(30, 38, 35, .18);
}

.mobile-hero-demo__note {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--note-colour);
  color: var(--note-ink);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: transform 160ms ease, box-shadow 160ms ease;
  touch-action: manipulation;
}

.mobile-hero-demo__note[hidden] {
  display: none;
}

.mobile-hero-demo__note:hover,
.mobile-hero-demo__note:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .36), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.mobile-hero-demo__note:focus-visible {
  outline: 2px solid #fff9f0;
  outline-offset: 3px;
}

.mobile-hero-demo__note-icon {
  display: block;
  width: 28px;
  height: 25px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .9;
  pointer-events: none;
}

.mobile-hero-demo__card {
  position: absolute;
  right: 14px;
  bottom: 18px;
  left: 16px;
  z-index: 7;
  min-height: 176px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--note-colour, #1f201f);
  box-shadow: 0 20px 32px rgba(30, 35, 32, .24);
  color: var(--note-ink, #f8f8f5);
  opacity: 0;
  transform: translateY(12px) scale(.97);
  transform-origin: bottom right;
  transition: opacity 180ms ease, transform 180ms cubic-bezier(.22, .8, .28, 1), left 180ms ease, right 180ms ease, bottom 180ms ease;
}

.mobile-hero-demo__card[hidden] {
  display: none;
}

.mobile-hero-demo__card.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mobile-hero-demo__card.is-detached {
  right: 12px;
  bottom: 24px;
  left: 12px;
  min-height: 198px;
  transform: translateY(0) scale(1.01);
}

.mobile-hero-demo__card-inner {
  display: flex;
  min-height: inherit;
  flex-direction: column;
  padding: 16px;
}

.mobile-hero-demo__card-header {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 8px;
}

.mobile-hero-demo__card-title {
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-hero-demo__card-action {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1.18rem;
  line-height: 1;
  touch-action: manipulation;
}

.mobile-hero-demo__card-action:hover,
.mobile-hero-demo__card-action:focus-visible {
  background: rgba(255, 255, 255, .14);
}

.mobile-hero-demo__card-action:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.mobile-hero-demo__card-body {
  max-width: 220px;
  margin: 18px 0 0;
  white-space: pre-line;
  font-size: .9rem;
  line-height: 1.42;
}

@media (max-width: 760px) {
  .mobile-hero-demo {
    display: block;
  }
}

@media (min-width: 761px) {
  .mobile-hero-demo {
    display: none !important;
  }
}

@media (max-width: 360px) {
  .mobile-hero-demo__stage {
    padding: 12px;
  }

  .mobile-hero-demo__workspace {
    height: 266px;
  }

  .mobile-hero-demo__paper {
    inset: 22px 54px 22px 14px;
    padding: 17px 15px;
  }

  .mobile-hero-demo__rail {
    top: 22px;
    bottom: 22px;
    width: 58px;
    padding-right: 7px;
    padding-left: 7px;
  }

  .mobile-hero-demo__card {
    right: 12px;
    bottom: 14px;
    left: 13px;
  }

  .mobile-hero-demo__card.is-detached {
    right: 10px;
    bottom: 20px;
    left: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-hero-demo__note,
  .mobile-hero-demo__card {
    transition-duration: .01ms;
  }
}
