/* The story pages (story.js) and the shared material of their UI visuals (public/story-visuals).
   Contract: docs/cinema/STORY-ENGINE.md. The closing page shown before a business is chosen
   (.closing-page, story.js CLOSING) is laid out exactly like a story's closing page. */

/* ---- Page layout ----
   Desktop and tablets: copy on the left, the visual on the right.
   Tall phones: the visual on top, copy under it.
   Short phones (two-beat): the copy first, centred; then it rises, the body fades, and the visual
   plays under the heading (story.js sets --beat, --copy-drop and --stage-top). */
:is(.story-page, .closing-page) {
  --beat: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto auto 1fr;
  grid-template-areas:
    ". visual"
    "copy visual"
    "label visual"
    ". visual";
  column-gap: 5vw;
  align-items: start;
}
.cinema-active :is(.story-page, .closing-page) {
  padding-bottom: 96px;
}
.story-copy {
  grid-area: copy;
  max-width: 34rem;
}
.story-heading {
  font: 400 clamp(28px, 2.75vw, 54px) / 1.1 var(--font-display);
  letter-spacing: -0.035em;
  margin: 0 0 22px;
  text-wrap: balance;
}
.story-body {
  font-size: clamp(16px, 1.15vw, 19px);
  line-height: 1.6;
  color: var(--body-ink);
  margin: 0;
  max-width: 31em;
  text-wrap: pretty;
}
.story-label {
  grid-area: label;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 26px 0 0;
  font-size: var(--type-note);
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: rgba(240, 238, 232, 0.56);
  /* Two even lines at most, never a lone word on the last one. */
  text-wrap: balance;
}
.story-label::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid rgba(209, 184, 243, 0.7);
}
.story-visual {
  grid-area: visual;
  align-self: center;
  position: relative;
  width: 100%;
  height: min(74svh, 680px);
  container-type: size;
  container-name: visual;
}
.story-surface {
  position: absolute;
  inset: 0;
}

/* A page's info button: examples (the software a system could connect to) in a small panel that
   opens upward from the button, over the copy, so it never runs off the foot of a phone. */
.story-info {
  position: relative;
  z-index: 6;
  isolation: isolate;
  margin-top: 18px;
}
.story-info-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px 0 10px;
  margin-left: -10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: #d9c6f7;
  font: 500 14px/1.2 var(--font-body);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.story-info-btn:hover,
.story-info-btn[aria-expanded="true"] {
  background: rgba(152, 98, 232, 0.12);
  border-color: rgba(209, 184, 243, 0.28);
}
.story-info-btn:focus-visible {
  outline: 2px solid #d1b8f3;
  outline-offset: 2px;
}
.story-info-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font:
    600 12px/1 Fraunces,
    Georgia,
    serif;
  font-style: italic;
}
.story-info-panel {
  position: absolute;
  left: -10px;
  bottom: calc(100% + 8px);
  z-index: 5;
  width: min(25rem, calc(100vw - 2 * var(--gutter, 20px)));
  max-height: min(62svh, 440px);
  overflow: auto;
  padding: 18px 20px 16px;
  border-radius: 20px;
  border: 1px solid rgba(209, 184, 243, 0.24);
  background: linear-gradient(180deg, #241b3c, #110d1f);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: rgba(244, 241, 250, 0.94);
  animation: story-info-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.story-info-panel[hidden] {
  display: none;
}
@keyframes story-info-in {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }
}
.story-info-title {
  margin: 0 0 12px;
  font:
    400 19px/1.2 Fraunces,
    Georgia,
    serif;
  letter-spacing: -0.015em;
}
.story-info-group + .story-info-group {
  margin-top: 12px;
}
.story-info-kind {
  margin: 0 0 7px;
  font: 500 11px/1.2 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #cdb6f0;
}
.story-info-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.story-info-list li {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  line-height: 1.2;
}
.story-info-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  line-height: 1.45;
  color: rgba(232, 226, 245, 0.62);
}
.story-info-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: -10px;
  font-size: 13px;
  color: #d9c6f7;
}
.story-info-link::after {
  content: "\2197";
  margin-left: 6px;
}
/* Phones: a sheet under the header, the width of the page (story.js places it from the screen, as
   the copy may be moved by a transform), so it never runs under the top bar or off the foot. */
@media (max-width: 699px) {
  .story-info-panel {
    bottom: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .story-info-panel {
    animation: none;
  }
}

/* The closing page's call to action. */
.story-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin-top: 32px;
}
.story-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 24px 0 26px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  background: linear-gradient(180deg, #a678f0, #8650dc);
  box-shadow:
    0 12px 40px rgba(134, 80, 220, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #fff;
  font: 500 16px/1 var(--font-display);
  letter-spacing: -0.01em;
  text-decoration: none;
  transition:
    filter 0.2s,
    transform 0.2s;
}
.story-cta:hover {
  filter: brightness(1.08);
}
.story-cta:active {
  transform: scale(0.985);
}
.story-cta-arrow {
  width: 8px;
  height: 8px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}
/* The second button (the closing page before a pick: "Book a meeting" beside "Talk to our AI"). */
.story-cta.is-secondary {
  background: rgba(240, 238, 232, 0.06);
  box-shadow:
    inset 0 0 0 1px rgba(240, 238, 232, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--paper);
}
.story-cta.is-secondary:hover {
  background: rgba(240, 238, 232, 0.12);
  filter: none;
}
.story-again {
  font-size: 14px;
  color: rgba(240, 238, 232, 0.7);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.story-again:hover {
  color: var(--paper);
}
/* "Give us a ring 0483 827 283": a quiet phone line under the closing page's buttons. */
.story-ring {
  margin: 4px 0 0;
  font-size: 15px;
  color: rgba(240, 238, 232, 0.7);
}
.story-ring-number {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  margin-left: 4px;
  color: var(--paper);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: underline;
  text-decoration-color: rgba(203, 182, 239, 0.6);
  text-underline-offset: 4px;
  white-space: nowrap;
}
.story-ring-number:hover {
  text-decoration-color: var(--lavender);
}
.story-ring-number:focus-visible {
  outline: 2px solid var(--lavender);
  outline-offset: 3px;
  border-radius: 4px;
}
.closing-page.is-cta .story-ring {
  text-align: center;
}

@media (min-width: 1800px) {
  .story-copy {
    max-width: 30vw;
  }
}
@media (max-width: 1000px) and (min-width: 700px) {
  :is(.story-page, .closing-page) {
    column-gap: 4vw;
  }
  .story-visual {
    height: min(64svh, 560px);
  }
}
/* Landscape phones and short windows: a smaller type step keeps the copy on screen. */
@media (min-width: 700px) and (max-height: 620px) {
  .story-heading {
    font-size: clamp(22px, 2.4vw, 30px);
    margin-bottom: 12px;
  }
  .story-body {
    font-size: 14px;
    line-height: 1.5;
  }
  .story-label {
    margin-top: 12px;
  }
  .story-actions {
    margin-top: 16px;
  }
}

/* ---- Phones ---- */
@media (max-width: 699px) {
  :is(.story-page, .closing-page) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "visual"
      "copy"
      "label";
    row-gap: 0;
  }
  .cinema-active :is(.story-page, .closing-page) {
    padding-bottom: 76px;
  }
  /* The visual starts a clear step below the top bar's buttons (they end 60px down), so nothing
     in it reads as running under the header. */
  .story-visual {
    height: auto;
    min-height: 0;
    margin: 12px 0 22px;
    align-self: stretch;
  }
  .story-heading {
    font-size: clamp(24px, 6.9vw, 30px);
    margin-bottom: 12px;
  }
  .story-body {
    font-size: 15px;
    line-height: 1.5;
  }
  .story-eyebrow {
    margin-bottom: 12px;
  }
  /* Tall phones: the label sits above the launcher's row, so it takes the full width. */
  .story-label {
    margin-top: 12px;
    max-width: none;
  }
  .story-actions {
    margin-top: 20px;
    gap: 10px 16px;
  }
  .story-cta {
    min-height: 50px;
    font-size: 15px;
  }
}
/* The closing page's visual is a recap: on short phones the call to action takes the screen. */
@media (max-width: 699px) and (max-height: 760px) {
  :is(.story-page, .closing-page).is-cta .story-visual.is-decor {
    display: none;
  }
}
/* Two-beat phones. */
@media (max-width: 699px) and (max-height: 760px) {
  .cinema-active :is(.story-page, .closing-page) {
    display: block;
  }
  .cinema-active .story-copy {
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    width: auto;
    top: var(--header);
    transform: translate3d(
      0,
      calc(var(--copy-drop, 0px) * (1 - var(--beat))),
      0
    );
  }
  .cinema-active :is(.story-page, .closing-page).is-cta .story-copy {
    transform: translate3d(0, var(--copy-drop, 0px), 0);
  }
  .cinema-active :is(.story-page, .closing-page):not(.is-cta) .story-body,
  .cinema-active :is(.story-page, .closing-page):not(.is-cta) .story-info {
    opacity: calc(1 - var(--beat) * 2.4);
  }
  .cinema-active :is(.story-page, .closing-page).is-stage .story-info {
    visibility: hidden;
  }
  /* While the copy is read alone, the (still hidden) visual over it takes no taps. */
  .cinema-active :is(.story-page, .closing-page):not(.is-stage) .story-visual {
    pointer-events: none;
  }
  .cinema-active .story-label {
    position: absolute;
    left: var(--gutter);
    right: 156px;
    bottom: 26px;
    max-width: none;
    margin: 0;
  }
  .cinema-active .story-visual {
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    top: var(--stage-top, 45%);
    bottom: var(--stage-bottom, 76px);
    width: auto;
    height: auto;
    margin: 0;
    align-self: stretch;
    opacity: calc(var(--beat) * 2.4 - 1.4);
    transform: translate3d(0, calc((1 - var(--beat)) * 28px), 0);
  }
  .story-heading {
    font-size: clamp(23px, 6.6vw, 27px);
  }
  .story-body {
    font-size: 15px;
  }
}
@media (max-width: 359px) {
  .story-heading {
    font-size: 22px;
  }
  /* The label keeps every pixel up to 12px short of the "Ask our AI" launcher (it starts at 185px on
     a 320px screen), in even lines. */
  .cinema-active .story-label {
    right: 147px;
    line-height: 1.3;
  }
  .story-body {
    font-size: 14px;
  }
}
/* The smallest phones (320 x 568): the closing page takes a smaller step so the heading, body and
   actions sit above the label and the launcher. */
@media (max-width: 359px) and (max-height: 600px) {
  :is(.story-page, .closing-page).is-cta .story-heading {
    font-size: 20px;
    margin-bottom: 10px;
  }
  :is(.story-page, .closing-page).is-cta .story-body {
    font-size: 13px;
    line-height: 1.45;
  }
  :is(.story-page, .closing-page).is-cta .story-eyebrow {
    margin-bottom: 8px;
  }
  :is(.story-page, .closing-page).is-cta .story-actions {
    margin-top: 14px;
    gap: 2px 16px;
  }
  .story-cta {
    min-height: 46px;
    padding: 0 20px 0 22px;
    font-size: 14px;
  }
}
/* Plain page (reduced motion, or the film unavailable): pages in document flow, visuals finished. */
html:not(.cinema-active) :is(.story-page, .closing-page) {
  min-height: 0;
  padding-top: 80px;
  padding-bottom: 80px;
}
@media (max-width: 699px) {
  html:not(.cinema-active) .story-visual {
    height: min(92vw, 460px);
  }
  html:not(.cinema-active)
    :is(.story-page, .closing-page).is-cta
    .story-visual.is-decor {
    display: none;
  }
}

/* ---- The closing page before a business is chosen (story.js CLOSING) ----
   One column, centred, under the one light the chooser's five beacons become (chooser-scenes/a.js draws
   it in the middle of this page's visual box, which holds no words; closing-light.js is its still
   stand-in). Wide screens: the light above the words. Phones: the words first and the light under them,
   where the beacons stood. Written after every story rule above, so it wins where they overlap. */
.closing-page.is-cta {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(96px, 1fr) auto auto;
  grid-template-areas:
    "visual"
    "copy"
    "label";
  justify-items: center;
  column-gap: 0;
  text-align: center;
}
.closing-page.is-cta .story-visual.is-decor {
  display: block;
  width: min(100%, 560px);
  height: auto;
  min-height: 0;
  align-self: stretch;
}
.closing-page.is-cta .story-copy {
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.closing-page.is-cta .story-heading {
  font-size: clamp(30px, 3.1vw, 58px);
}
.closing-page.is-cta .story-body {
  max-width: 33em;
}
.closing-page.is-cta .story-actions {
  justify-content: center;
}
.closing-page.is-cta .story-again {
  flex-basis: 100%;
  justify-content: center;
  margin-top: -2px;
}
.closing-page.is-cta .story-label {
  justify-content: center;
  margin-top: 18px;
}
@media (min-width: 700px) and (max-height: 620px) {
  .closing-page.is-cta .story-heading {
    font-size: clamp(22px, 2.6vw, 32px);
  }
  .closing-page.is-cta .story-again {
    min-height: 36px;
  }
}
@media (max-width: 699px) {
  .closing-page.is-cta {
    grid-template-rows: auto minmax(64px, 1fr) auto;
    grid-template-areas:
      "copy"
      "visual"
      "label";
  }
  .closing-page.is-cta .story-copy {
    margin-top: 8px;
  }
  .closing-page.is-cta .story-visual.is-decor {
    margin: 6px 0 4px;
  }
  .closing-page.is-cta .story-heading {
    font-size: clamp(25px, 7.2vw, 31px);
  }
}
/* Short phones: the page is laid out like any other closing page, never in two beats. */
@media (max-width: 699px) and (max-height: 760px) {
  .cinema-active .closing-page.is-cta {
    display: grid;
  }
  .cinema-active .closing-page.is-cta .story-copy,
  .cinema-active .closing-page.is-cta .story-visual.is-decor {
    position: static;
    transform: none;
    opacity: 1;
    width: auto;
  }
  .cinema-active .closing-page.is-cta .story-visual.is-decor {
    width: 100%;
    margin: 4px 0 0;
  }
  /* The label keeps its place beside the launcher, as on every page here (out of the grid's areas, so it
     is placed against the page, not its row). */
  .cinema-active .closing-page.is-cta .story-label {
    grid-area: auto;
    justify-content: flex-start;
    text-align: left;
  }
  .closing-page.is-cta .story-heading {
    font-size: clamp(23px, 6.6vw, 27px);
    margin-bottom: 10px;
  }
  .closing-page.is-cta .story-body {
    font-size: 14px;
  }
  .closing-page.is-cta .story-actions {
    margin-top: 16px;
  }
}
/* The shortest phones: the eyebrow goes, so the light keeps a clear space between the words and the label. */
@media (max-width: 699px) and (max-height: 600px) {
  .cinema-active .closing-page.is-cta .story-eyebrow {
    display: none;
  }
  .cinema-active .closing-page.is-cta .story-body {
    font-size: 13px;
    line-height: 1.45;
  }
}
html:not(.cinema-active) .closing-page.is-cta .story-visual.is-decor {
  display: block;
  height: 180px;
}

/* ---- The visuals' shared material (story-visuals/kit.js builds with these) ----
   Dark glass in Caelaria violet and silver. Sizes come from the visual's box (container units), with
   11px as the floor for any text. */
.sv {
  --sv-ok: #7fe0b4;
  --sv-warn: #f2b672;
  --sv-violet: #9862e8;
  --sv-lavender: #d1b8f3;
  --sv-silver: #c9cfdb;
  --sv-text: rgba(244, 241, 250, 0.94);
  --sv-dim: rgba(232, 226, 245, 0.58);
  --sv-line: rgba(255, 255, 255, 0.1);
  --sv-fs: clamp(12px, 2.7cqi, 15px);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 400 var(--sv-fs) / 1.45 var(--font-body);
  color: var(--sv-text);
  -webkit-font-smoothing: antialiased;
}
.sv * {
  box-sizing: border-box;
}
.sv-card {
  position: relative;
  border-radius: 22px;
  border: 1px solid var(--sv-line);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.07),
      rgba(255, 255, 255, 0) 38%
    ),
    linear-gradient(180deg, rgba(32, 25, 52, 0.96), rgba(15, 12, 26, 0.97));
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  backdrop-filter: blur(22px) saturate(1.2);
  overflow: hidden;
}
.sv-head {
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.95em 1.15em;
  border-bottom: 1px solid var(--sv-line);
  font: 500 max(11px, 0.93em) / 1.2 var(--font-display);
  letter-spacing: -0.01em;
}
.sv-head small {
  margin-left: auto;
  font: 400 max(11px, 0.86em) / 1.2 var(--font-body);
  color: var(--sv-dim);
  font-variant-numeric: tabular-nums;
}
.sv-dot {
  flex: none;
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--sv-violet);
  box-shadow: 0 0 0 0.25em rgba(152, 98, 232, 0.2);
}
.sv-dot.is-live {
  background: #ff6b8a;
  box-shadow: 0 0 0 0.25em rgba(255, 107, 138, 0.18);
}
.sv-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.32em 0.75em;
  border-radius: 999px;
  border: 1px solid rgba(209, 184, 243, 0.32);
  background: rgba(152, 98, 232, 0.14);
  color: #e6d8fb;
  font: 500 max(11px, 0.82em) / 1.25 var(--font-body);
  white-space: nowrap;
}
.sv-chip.is-ok {
  border-color: rgba(127, 224, 180, 0.4);
  background: rgba(127, 224, 180, 0.12);
  color: #b8f1d6;
}
.sv-chip.is-warn {
  border-color: rgba(242, 182, 114, 0.45);
  background: rgba(242, 182, 114, 0.12);
  color: #f8d4a8;
}
.sv-chip.is-quiet {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--sv-dim);
}
.sv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.3em;
  padding: 0 1em;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font: 500 max(11px, 0.86em) / 1 var(--font-body);
  color: var(--sv-text);
  white-space: nowrap;
}
.sv-btn.is-primary {
  border-color: transparent;
  background: linear-gradient(180deg, #a678f0, #8650dc);
  color: #fff;
}
/* A phone: a dark device with a screen; its content is laid out at 100% of the screen. */
.sv-phone {
  position: relative;
  aspect-ratio: 9 / 18.5;
  height: 100%;
  max-width: 100%;
  border-radius: 13% / 6.3%;
  padding: 3.2%;
  background: linear-gradient(160deg, #3a3550, #16131f 40%, #26222f);
  box-shadow:
    0 50px 100px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}
/* In a small box a device frame would leave its screen too narrow to read: the phone becomes a plain
   glass screen that fills the space. */
@container visual (max-height: 380px) {
  .sv-phone {
    aspect-ratio: auto;
    width: 100%;
    padding: 0;
    border-radius: 18px;
    background: none;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  }
  .sv-phone > .sv-screen {
    border-radius: 18px;
    border: 1px solid var(--sv-line);
  }
  .sv-phone .sv-status {
    display: none;
  }
}
.sv-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 10.5% / 5%;
  overflow: hidden;
  background: linear-gradient(180deg, #120f1d, #0b0913);
  container-type: inline-size;
}
.sv-status {
  display: flex;
  justify-content: space-between;
  padding: 5.5cqi 8cqi 2cqi;
  font: 500 max(11px, 4.4cqi) / 1 var(--font-display);
  color: var(--sv-text);
}
.sv-bubble {
  max-width: 84%;
  padding: 0.6em 0.85em;
  border-radius: 1.15em;
  line-height: 1.38;
  white-space: pre-wrap;
}
.sv-bubble.is-in {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.09);
  border-bottom-left-radius: 0.35em;
}
.sv-bubble.is-out {
  align-self: flex-end;
  background: linear-gradient(180deg, #8f5be3, #7444cf);
  color: #fff;
  border-bottom-right-radius: 0.35em;
}
.sv-caret::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 1em;
  margin-left: 0.06em;
  vertical-align: -0.12em;
  background: currentColor;
  opacity: 0.8;
}
.sv-in {
  transition:
    opacity 0.35s ease,
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sv-hide {
  opacity: 0;
  transform: translate3d(0, 0.8em, 0) scale(0.98);
}
/* A card covered by another (kit.js cover/swap): it fades out, then is hidden outright, so no ghost
   of its text shows through or around the card on top. */
.sv .sv-covered {
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    visibility 0s linear 0.3s !important;
}
/* A scroller that follow() keeps on a row boundary has no half row at its top, so it needs no fade
   there (a visual's own top fade would only dim a whole row). */
.sv .sv-scroller.sv-followed {
  -webkit-mask-image: none;
  mask-image: none;
}
@media (prefers-reduced-motion: reduce) {
  .sv-in,
  .sv .sv-covered {
    transition: none !important;
  }
  .sv *,
  .sv *::before,
  .sv *::after {
    animation: none !important;
  }
}

/* Keep the contact ending useful when the shared footer is in the same viewport. */
.cinema-active .closing-page.is-cta {
  padding-top: 24px;
  padding-bottom: 12px;
}
.closing-page .story-heading {
  font-weight: 600;
  letter-spacing: -0.035em;
}
.closing-page .story-eyebrow {
  display: none;
}
@media (max-width: 699px) {
  .cinema-active .closing-page.is-cta {
    grid-template-rows: auto minmax(24px, 1fr) auto;
  }
  .closing-page.is-cta .story-body {
    font-size: 15px;
    line-height: 1.45;
  }
  .closing-page.is-cta .story-actions {
    gap: 8px 12px;
  }
}
@media (max-height: 700px) {
  .cinema-active .closing-page.is-cta .story-visual.is-decor {
    display: none;
  }
  .cinema-active .closing-page.is-cta {
    grid-template-rows: auto;
    align-content: center;
  }
  .closing-page.is-cta .story-body {
    font-size: 14px;
    line-height: 1.35;
  }
}

/* Selected stories end beside the footer too, including short phones. */
@media (max-width: 699px) {
  .cinema-active .story-page.is-cta:last-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    grid-template-areas: "copy" "label";
    align-content: center;
    gap: 12px;
    padding: 12px var(--gutter);
  }
  .cinema-active .story-page.is-cta:last-child .story-copy {
    position: static;
    transform: none;
    margin: 0;
  }
  .cinema-active .story-page.is-cta:last-child .story-label {
    position: static;
    max-width: none;
    margin: 0;
  }
  .story-page.is-cta:last-child .story-eyebrow {
    display: none;
  }
  .story-page.is-cta:last-child .story-visual.is-decor {
    display: none;
  }
}
@media (max-width: 699px) and (max-height: 700px) {
  .story-page.is-cta:last-child .story-heading {
    font-size: 22px;
    line-height: 1.1;
  }
  .story-page.is-cta:last-child .story-body {
    font-size: 14px;
    line-height: 1.35;
  }
  .story-page.is-cta:last-child .story-ring {
    margin-top: 12px;
  }
}

@media (max-width: 359px) and (max-height: 600px) {
  .story-page.is-cta:last-child .story-heading {
    font-size: 20px;
  }
  .story-page.is-cta:last-child .story-body {
    font-size: 12.5px;
    line-height: 1.3;
  }
}

.story-visual .or-head {
  flex-wrap: wrap;
}
.story-visual .or-head .sv-chip {
  margin-left: 0;
}

@media (min-width: 700px) and (max-height: 500px) {
  .cinema-active :is(.story-page, .closing-page) {
    padding-top: 70px;
    padding-bottom: 12px;
  }
  .cinema-active .story-page .story-label {
    margin-top: 4px;
  }
  .cinema-active .story-page.is-cta:last-child {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    grid-template-areas: "copy" "label";
    align-content: center;
    padding-top: 32px;
  }
  .cinema-active .story-page.is-cta:last-child .story-copy,
  .cinema-active .story-page.is-cta:last-child .story-label {
    max-width: calc(100% - 160px);
  }
  .cinema-active .story-page.is-cta:last-child .story-visual.is-decor {
    display: none;
  }
  .cinema-active .story-page.is-cta:last-child .story-heading {
    font-size: 20px;
    margin-bottom: 8px;
  }
  .cinema-active .story-page.is-cta:last-child .story-body {
    font-size: 13px;
    line-height: 1.3;
  }
  .cinema-active .story-page.is-cta:last-child .story-actions {
    margin-top: 10px;
  }
  .cinema-active .story-page.is-cta:last-child .story-ring {
    margin-top: 8px;
  }
}
