/* /playables: three live playable ads in phone frames. Loaded only by playables.html. */

.pa-section {
  padding: clamp(8px, 2vw, 24px) 0 clamp(48px, 7vw, 96px);
}
.pa-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.pa-item {
  display: grid;
  gap: 24px;
  justify-items: center;
}

/* phone frame */
.phone {
  --bezel: 11px;
  position: relative;
  width: min(100%, 330px);
  aspect-ratio: 390 / 844;
  padding: var(--bezel);
  border-radius: 46px;
  background: linear-gradient(160deg, #23262f, #0e1015 55%, #1b1e26);
  box-shadow:
    0 0 0 1px rgba(242, 239, 232, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 30px 70px -24px rgba(0, 0, 0, 0.9),
    0 0 90px -40px rgba(255, 77, 46, 0.55);
  transition: box-shadow 0.4s var(--ease);
}
.phone::after {
  /* speaker slot */
  content: '';
  position: absolute;
  top: calc(var(--bezel) + 9px);
  left: 50%;
  width: 58px;
  height: 16px;
  margin-left: -29px;
  border-radius: 999px;
  background: #050608;
  z-index: 3;
  pointer-events: none;
}
.phone.is-live {
  box-shadow:
    0 0 0 1px rgba(255, 77, 46, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 30px 70px -24px rgba(0, 0, 0, 0.9),
    0 0 110px -36px rgba(255, 77, 46, 0.8);
}
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: var(--bg-3);
  isolation: isolate;
}
.phone-screen img,
.phone-screen iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.phone-screen iframe {
  z-index: 1;
  background: var(--bg);
}
.phone-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  width: 100%;
  border: 0;
  padding: 24px;
  background: radial-gradient(circle at 50% 50%, rgba(11, 12, 16, 0.55), rgba(11, 12, 16, 0.15) 70%);
  color: var(--fg);
  font: 700 17px/1.2 var(--body);
  text-align: center;
  cursor: pointer;
}
.phone-play .pp-label {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(11, 12, 16, 0.86);
  box-shadow: 0 0 0 1px rgba(242, 239, 232, 0.14);
}
.phone-play .pp-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 10px 30px -6px rgba(255, 77, 46, 0.7);
  display: grid;
  place-items: center;
  transition: transform 0.3s var(--ease);
}
.phone-play .pp-icon::before {
  content: '';
  margin-left: 6px;
  border-style: solid;
  border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent var(--on-accent);
}
.phone-play:hover .pp-icon,
.phone-play:focus-visible .pp-icon {
  transform: scale(1.08);
}
.phone-play:focus-visible {
  outline-offset: -6px;
}
.phone.is-live .phone-play,
.phone.is-live .phone-poster {
  visibility: hidden;
}
.phone-stop {
  position: absolute;
  z-index: 4;
  right: -6px;
  top: -6px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(242, 239, 232, 0.4);
  background: var(--bg);
  color: var(--fg);
  font: 700 20px/1 var(--body);
  cursor: pointer;
  display: none;
}
.phone.is-live .phone-stop {
  display: grid;
  place-items: center;
}
.phone-stop:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

/* caption */
.pa-cap {
  width: min(100%, 420px);
}
.pa-cap h2 {
  font-size: clamp(34px, 3.4vw, 46px);
  font-stretch: 75%;
  line-height: 0.95;
  margin-bottom: 12px;
}
.pa-cap > p {
  color: var(--fg-2);
}
.pa-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.pa-stats div {
  padding: 13px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 3px;
  align-content: start;
}
.pa-stats div.wide {
  grid-column: 1 / -1;
}
.pa-stats b {
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 800;
  font-size: clamp(26px, 2.4vw, 32px);
  line-height: 1;
}
.pa-stats div.wide b {
  font-size: 20px;
  font-stretch: 85%;
  line-height: 1.2;
}
.pa-stats span {
  font-size: 13.5px;
  color: var(--fg-3);
  line-height: 1.35;
}
.pa-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 16px;
  font-size: 15.5px;
}
.pa-links a {
  color: var(--fg);
}
.pa-links a:hover {
  color: var(--accent-deep);
}

/* the shared list */
.pa-every {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 16px clamp(28px, 5vw, 72px);
  border-top: 2px solid var(--fg);
  padding-top: clamp(32px, 4vw, 56px);
}
.pa-every h2 {
  font-size: clamp(38px, 4.6vw, 66px);
  font-stretch: 75%;
  line-height: 0.95;
}
.pa-every .ticks {
  color: var(--fg-2);
}
.pa-every .sources {
  grid-column: 2;
  margin-top: 6px;
}
.pa-every code {
  font: 0.86em/1 var(--mono);
  color: var(--fg);
}

@media (max-width: 1100px) {
  .pa-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .pa-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 64px;
  }
  /* leave room either side of the phone so the page can still be scrolled with a thumb */
  .phone {
    width: min(76vw, 320px);
    --bezel: 9px;
    border-radius: 40px;
  }
  .phone-screen {
    border-radius: 32px;
  }
  .pa-every {
    grid-template-columns: minmax(0, 1fr);
  }
  .pa-every .sources {
    grid-column: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .phone,
  .phone-play .pp-label {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(11, 12, 16, 0.86);
  box-shadow: 0 0 0 1px rgba(242, 239, 232, 0.14);
}
.phone-play .pp-icon {
    transition: none;
  }
  .phone-play:hover .pp-icon {
    transform: none;
  }
}
