/* /try/: the Sunday Visit app in a phone frame (the demo itself is /try/app/, scripts/try-demo.mjs).
   Phones: the words, then the phone, then the notes. Wider screens: the words on the left, the phone beside them. */
.sv-try {
  width: calc(100% - 32px);
  width: min(100% - 32px, 66rem);
  margin: 0 auto;
  padding: 20px 0 40px;
  display: grid;
  gap: 20px;
}
.sv-try-intro .sv-page-lead { margin-bottom: 0; }
/* The phone is always a real phone's screen, 390 x 844 (the Penpot boards' size), so the app lays out exactly as
   it does on a phone. try.js scales the whole phone down, never stretching it, until all of it fits on the screen
   below the site header. Without JavaScript the demo can't run anyway, so it shows at full size. */
.sv-try-phone { position: relative; width: 100%; height: 864px; overflow-x: clip; scroll-margin-top: 84px; }
.sv-try-device {
  position: absolute;
  top: 0;
  left: 50%;
  width: 410px;
  height: 864px;
  margin-left: -205px;
  padding: 10px;
  border-radius: 54px;
  background: #13243b;
  box-shadow: 0 18px 50px rgba(19, 36, 59, 0.22);
  transform-origin: top left;
}
.sv-try-frame {
  display: block;
  width: 390px;
  height: 844px;
  border: 0;
  border-radius: 44px;
  background: #f6f1e8;
}
.sv-try-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 28px; }
.sv-try-full { background: #fff; color: #1f4a39; box-shadow: inset 0 0 0 2px #1f4a39; }
.sv-try-about ul { padding-left: 1.2em; }
.sv-try-badges { display: flex; flex-wrap: wrap; gap: 16px 24px; margin: 4px 0 16px; }
.sv-try-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 48px;
  color: #2E2C28;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
}
.sv-try-badge img { display: block; width: 180px; height: auto; }
.sv-try-marks { color: #4f4a42; font-size: 1.125rem; }

/* WebViews before Chrome 84 and Safari 14.1 ignore flex gap, so the buttons, the store badges and
   each badge's label would touch. Engines that far back never know inset (Chrome 87 / Safari 14.1)
   either, so they get the same spacing as margins instead; anything newer keeps the gaps above. */
@supports not (inset: 0) {
  .sv-try-actions { gap: normal; margin: -6px -6px 22px; }
  .sv-try-actions > * { margin: 6px; }
  .sv-try-badges { gap: normal; margin: -4px -12px 8px; }
  .sv-try-badges > * { margin: 8px 12px; }
  .sv-try-badge { gap: normal; }
  .sv-try-badge img { margin-bottom: 6px; }
}

@media (min-width: 900px) {
  .sv-try {
    grid-template-columns: minmax(0, 1fr) 410px;
    grid-template-areas: "intro phone" "about phone";
    grid-template-rows: auto 1fr;
    column-gap: 56px;
    align-items: start;
    padding-top: 36px;
  }
  .sv-try-intro { grid-area: intro; }
  .sv-try-about { grid-area: about; }
  .sv-try-phone { grid-area: phone; position: sticky; top: 100px; }
  .sv-try-full { display: none; }
}
