/* Inksound website: the two home pages (/ and /he/), on top of site.css (README, "The home pages").

   The idea: the page replays. Night is the stage (the lecture hall, the desk, the evening before the exam), in the
   navy of the App Store screenshots, the same in both themes. The only light on it is the app's own screen: real
   screens of Inksound, which light the navy around them. The one bold moment is the story: a frame of the app that
   stays on screen while its chapters go by, where the visitor's scroll is the playhead of a real replay and the words
   not reached yet wait in faint ink, as unplayed ink waits in the app. The details are written on one sheet of paper
   laid on the night. The highlighter marks only the visitor's next move: the two store links at the close, keyboard
   focus on the night, and selected text.

   One family, the app's own: IBM Plex Sans Hebrew, self-hosted as subsets renamed Inksound Sans (the OFL asks for
   another name: "Plex" is a Reserved Font Name; assets/fonts/OFL.txt). Everything that is read starts on one line,
   the content's start edge, like a notebook's margin; pictures and screens sit toward the end edge. Only logical
   properties place things, so the Hebrew page mirrors itself; the screens, films and photos never mirror. */

@font-face {
  font-family: "Inksound Sans";
  src: url("/assets/fonts/inksound-sans-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+00D7, U+03C0, U+2011, U+2018-201D, U+2022, U+2026, U+20AC, U+2122,
    U+2190-2193, U+2211, U+221A, U+222B, U+2260, U+2264-2265;
}

@font-face {
  font-family: "Inksound Sans";
  src: url("/assets/fonts/inksound-sans-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+00D7, U+03C0, U+2011, U+2018-201D, U+2022, U+2026, U+20AC, U+2122,
    U+2190-2193, U+2211, U+221A, U+222B, U+2260, U+2264-2265;
}

@font-face {
  font-family: "Inksound Sans";
  src: url("/assets/fonts/inksound-sans-400-hebrew.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0590-05FF, U+2011, U+20AA, U+FB1D-FB4F;
}

@font-face {
  font-family: "Inksound Sans";
  src: url("/assets/fonts/inksound-sans-700-hebrew.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0590-05FF, U+2011, U+20AA, U+FB1D-FB4F;
}

/* Until the font arrives, Arial takes the same room (its size and lines scaled to Inksound Sans, measured from the
   font files), so the swap moves nothing. */
@font-face {
  font-family: "Inksound Fallback";
  src: local("Arial"), local("ArialMT");
  font-weight: 400;
  size-adjust: 101.9%;
  ascent-override: 100.6%;
  descent-override: 27%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Inksound Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 700;
  size-adjust: 99.7%;
  ascent-override: 102.8%;
  descent-override: 27.6%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Inksound Fallback";
  src: local("Arial"), local("ArialMT");
  font-weight: 400;
  unicode-range: U+0590-05FF, U+FB1D-FB4F;
  size-adjust: 104.3%;
  ascent-override: 98.3%;
  descent-override: 26.4%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Inksound Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 700;
  unicode-range: U+0590-05FF, U+FB1D-FB4F;
  size-adjust: 105.1%;
  ascent-override: 97.5%;
  descent-override: 26.2%;
  line-gap-override: 0%;
}

/* Six colors. Night and the navy ink are the brand's navy at two depths; the highlighter is the app's. Every text
   color here is measured against what it sits on (README, "The home pages"): Paper on Night 18.1:1, text on the night
   10.1:1, faint ink 5.5:1 (its headings, 36 px and up, 3.3:1), Graphite on Paper 14.2:1, Ink on the highlighter
   10.1:1. */
.home {
  --night: #0c1238;
  --navy: #1b2b6b;
  --marker: #ffe14d;
  --white: #ffffff;
  --graphite: #262b36;
  --rule-line: #cbd7ea;
  --on-night: #c0c1cb;
  --ghost: #8a8d9f;
  --ghost-head: #636780;
  --glow: rgb(255 240 205 / 0.16);

  --sans: "Inksound Sans", "Inksound Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans",
    "Noto Sans Hebrew", Arial, sans-serif;
  --body-size: 1.0625rem;
  --display: clamp(2.75rem, 1.6rem + 5.6vw, 7.25rem);
  --chapter: clamp(2.25rem, 1.5rem + 3vw, 4rem);
  --section: clamp(1.875rem, 1.4rem + 1.9vw, 3rem);
  --lead: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --space: clamp(4rem, 3rem + 6vw, 10rem);

  margin: 0;
  background: var(--night);
  color: var(--on-night);
  font-family: var(--sans);
  font-size: var(--body-size);
  line-height: 1.6;
  font-kerning: normal;
}

.home:lang(he) {
  line-height: 1.7;
}

.home ::selection {
  background: var(--marker);
  color: var(--navy);
}

/* On the night, focus is the highlighter; on the sheet, the app's selection blue (site.css --focus). */
.home .night :focus-visible,
.home > .top :focus-visible,
.home > .foot :focus-visible {
  outline: 2px solid var(--marker);
  outline-offset: 2px;
}

.home .skip {
  background: var(--marker);
  color: var(--navy);
  font-weight: 700;
}

/* The top bar and the footer lie on the night. */
.home > .top :is(.wordmark, nav a),
.home > .foot a {
  color: var(--white);
}

.home > .top nav a[aria-current="page"],
.home > .foot a[aria-current="page"] {
  color: var(--white);
}

.home > .foot {
  color: var(--on-night);
  padding-block-start: 2.5rem;
}

/* Resets without weight: every rule below wins over them. */
:where(.home) :where(h1, h2, h3) {
  margin: 0;
  font-weight: 700;
}

:where(.home) :where(p) {
  margin: 0;
}

.night {
  padding-inline: var(--wrap);
  background: var(--night);
}

/* ---------------------------------------------------------------------------------------------------------------
   The hero: the headline, one line of promise, the badges, and one window that plays the real app. */

.intro {
  display: grid;
  gap: 1.75rem;
  padding-block: clamp(1.25rem, 0.5rem + 3vw, 3rem) 4.25rem;
}

.intro-text {
  container-type: inline-size;
  min-inline-size: 0;
}

/* Sized to its column and, on a short screen (a phone held sideways), to the screen's height too, so the badges stay in
   the first screen. */
.intro h1 {
  max-inline-size: 13em;
  color: var(--white);
  font-size: clamp(2.5rem, min(14cqi, 12svh), 6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.intro h1:lang(he) {
  max-inline-size: 11em;
  font-size: clamp(2.6rem, min(15cqi, 12svh), 6rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.promise {
  max-inline-size: 34rem;
  margin-block-start: 1.25rem;
  color: var(--on-night);
  font-size: var(--lead);
  line-height: 1.5;
}

/* The badges: Apple's and Google's files (site.css .cta), their clear space on the night itself. */
.intro .cta {
  margin-block-start: 1.75rem;
  margin-inline-start: calc(var(--badge) / -4);
  background: transparent;
}

/* The window: the real app. In its portrait shape (data-shape="portrait") a page of Inksound replaying, under its app's
   bars, beside the headline; in its landscape shape the real-app film, under the headline. The image is the film's
   first frame (loaded first: the largest thing in the first screen), and the film covers it once it plays. */
.window {
  position: relative;
  inline-size: min(100%, 60svh * 2020 / 2388);
  margin: 0;
  justify-self: start;
}

.window .screen {
  position: relative;
  aspect-ratio: 2020 / 2388;
  overflow: hidden;
  border-radius: 1.75rem;
  background: var(--white);
  /* The screen's own light on the night around it: a warm spill, the page's one glow. */
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 0 4rem 0.5rem var(--glow), 0 2.5rem 6rem -2rem rgb(0 0 0 / 0.65);
}

.screen img,
.screen video {
  position: absolute;
  inset: 0;
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.screen video,
.frame video {
  opacity: 0;
}

/* A pixel inside the still under it (the same frame), so the film never counts as the page's largest picture: the
   still is, and it paints first. */
.screen video {
  inset: 1px;
  inline-size: calc(100% - 2px);
  block-size: calc(100% - 2px);
}

.playing > .screen video,
.frame.playing video {
  opacity: 1;
}

/* The landscape shape, the real-app film (README, "The hero film"): under the type, 9:16 on phones and 16:9 from
   48rem, at most 70% of the screen's height. Both versions of the site show it since November 13. */
.window[data-shape="landscape"] {
  inline-size: min(100%, 70svh * 9 / 16);
}

.window[data-shape="landscape"] .screen {
  aspect-ratio: 9 / 16;
}

@media (min-width: 48rem) {
  .window[data-shape="landscape"] {
    inline-size: min(100%, 70svh * 16 / 9);
  }

  .window[data-shape="landscape"] .screen {
    aspect-ratio: 16 / 9;
  }
}

/* Pauses a film and plays it again (WCAG 2.2.2). The portrait window's and the story's are on the night beside the
   screen, so they never cover the app's own replay bar. Shown once a film plays. */
.pause {
  display: grid;
  place-items: center;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.5);
  border-radius: 50%;
  background: var(--night);
  color: var(--white);
  cursor: pointer;
}

.pause[hidden] {
  display: none;
}

/* Out of the flow, so showing it moves nothing (the hero keeps room for it under the window). */
.window .pause {
  position: absolute;
  inset-block-start: calc(100% + 0.75rem);
  inset-inline-end: 0;
}

/* The film's button is inside its top end corner, which every shot of the film leaves plain navy: it shows with the
   film's top, in the first screen, and covers nothing of the app. */
.window[data-shape="landscape"] .pause {
  inset-block-start: 0.75rem;
  inset-inline-end: 0.75rem;
}

.pause::before {
  content: "";
  inline-size: 0.75rem;
  block-size: 0.875rem;
  border-inline: 0.25rem solid currentColor;
}

/* Play points right in both languages, as media controls do. */
.pause[aria-pressed="true"]::before {
  inline-size: 0;
  block-size: 0;
  margin-left: 0.25rem;
  border: 0.5rem solid transparent;
  border-right: 0;
  border-left: 0.8rem solid currentColor;
}

/* ---------------------------------------------------------------------------------------------------------------
   The story: a prologue in the lecture, five chapters beside one frame of the app, an epilogue the night before the
   exam. Without script (or on a short screen) each chapter is its words, then its screen, in full ink. */

.story {
  padding-block: var(--space);
}

.prologue,
.epilogue {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.prologue h2,
.epilogue h2,
.words h2 {
  color: var(--white);
  font-size: var(--chapter);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

:lang(he) :is(.prologue, .epilogue, .words) h2 {
  line-height: 1.12;
  letter-spacing: 0;
}

.prologue p,
.epilogue p,
.words p {
  max-inline-size: 30rem;
  margin-block-start: 1.25rem;
  font-size: var(--lead);
  line-height: 1.55;
}

/* The Hebrew page's epilogue: two evenings, each its words and its picture. */
.panel {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.panel h3 {
  color: var(--white);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  line-height: 1.2;
}

/* A condition in a chapter (where a feature is offered), as running text. */
.words .small-print {
  max-inline-size: 30rem;
  margin-block-start: 0.875rem;
  font-size: 1rem;
  line-height: 1.5;
}

.mood {
  margin: 0;
}

.mood img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  border-radius: 1.5rem;
}

/* A picture is never drawn wider than half its file, so a 2x screen has pixels to spare (README, "Images"). */
.mood.hall img {
  max-inline-size: 42rem;
}

.mood.exam img {
  max-inline-size: 36.5rem;
}

.chapters {
  display: grid;
  gap: 3rem;
  margin-block: var(--space);
}

.chapter {
  display: grid;
  gap: 1.75rem;
}

.frame {
  position: relative;
  inline-size: min(100%, 26rem);
  margin: 0;
  aspect-ratio: 2020 / 2388;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--white);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 0 3rem 0.25rem var(--glow);
}

.frame img,
.frame video {
  position: absolute;
  inset: 0;
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

/* Chapter 1's other seven frames show only while the visitor's scroll plays them. */
.scrub {
  display: none;
}

.story-pause {
  display: none;
}

/* The enhanced story (the script adds "on"): one frame stays on screen and cuts from chapter to chapter, words not
   reached yet in faint ink. Phones and tablets: the frame on a band of night at the top of the screen, the words
   going by under it. Computers: the frame beside the words, in the middle of the screen. */
@media (min-height: 31rem) {
  .story.on .chapters {
    --band: 44svh;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .story.on .chapter {
    display: contents;
  }

  .story.on .words {
    grid-column: 1;
    display: grid;
    align-content: start;
    min-block-size: 85svh;
    padding-block: calc(var(--band) + 2rem) 2rem;
    margin-block-start: calc(var(--band) * -1);
  }

  .story.on .chapter:first-child .words {
    margin-block-start: 0;
    min-block-size: 190svh;
  }

  .story.on .chapter:nth-child(1) .words {
    grid-row: 1;
  }

  .story.on .chapter:nth-child(2) .words {
    grid-row: 2;
  }

  .story.on .chapter:nth-child(3) .words {
    grid-row: 3;
  }

  .story.on .chapter:nth-child(4) .words {
    grid-row: 4;
  }

  .story.on .chapter:nth-child(5) .words {
    grid-row: 5;
  }

  /* Chapter 1's words stay while the replay plays under the visitor's scroll. */
  .story.on .chapter:first-child .words > div {
    position: sticky;
    inset-block-start: calc(var(--band) + 2rem);
  }

  .story.on .frame {
    grid-column: 1;
    grid-row: 1 / span 5;
    z-index: 1;
    align-self: start;
    position: sticky;
    inset-block-start: 0;
    inline-size: 100%;
    block-size: var(--band);
    padding-block: 0.75rem;
    overflow: visible;
    border-radius: 0;
    background: var(--night);
    box-shadow: 0 0 0 100vmax var(--night);
    clip-path: inset(0 -100vmax);
    opacity: 0;
    pointer-events: none;
  }

  /* The screen at the band's start (the pause button has the end), as tall as the band lets it be. */
  .story.on .frame > * {
    inset-block: 0.75rem;
    inset-inline: 0 auto;
    block-size: calc(100% - 1.5rem);
    aspect-ratio: 2020 / 2388;
    inline-size: auto;
    border-radius: 1.25rem;
    background: var(--white);
  }

  .story.on .frame > picture > img,
  .story.on .frame > .scrub > picture > img {
    position: static;
    border-radius: inherit;
  }

  .story.on .frame > picture,
  .story.on .frame > .scrub {
    position: absolute;
    overflow: hidden;
    box-shadow: 0 0 2.5rem 0.25rem var(--glow);
  }

  .story.on .frame > video {
    border-radius: 1.25rem;
  }

  .story.on .frame.now {
    opacity: 1;
    pointer-events: auto;
  }

  .story.scrubs .scrub {
    display: block;
  }

  .scrub picture {
    position: absolute;
    inset: 0;
    opacity: 0;
  }

  .scrub img {
    display: block;
    inline-size: 100%;
    block-size: 100%;
  }

  .story[data-frame="1"] .scrub picture:nth-child(1),
  .story[data-frame="2"] .scrub picture:nth-child(2),
  .story[data-frame="3"] .scrub picture:nth-child(3),
  .story[data-frame="4"] .scrub picture:nth-child(4),
  .story[data-frame="5"] .scrub picture:nth-child(5),
  .story[data-frame="6"] .scrub picture:nth-child(6),
  .story[data-frame="7"] .scrub picture:nth-child(7),
  .story[data-frame="8"] .scrub picture:nth-child(8) {
    opacity: 1;
  }

  /* The words: faint until their chapter plays, as the app's unplayed ink. */
  .story.on .words {
    color: var(--ghost);
    transition: color 0.4s;
  }

  .story.on .words h2 {
    color: var(--ghost-head);
    transition: color 0.4s;
  }

  .story.on .words.now {
    color: var(--on-night);
  }

  .story.on .words.now h2 {
    color: var(--white);
  }

  .story.on .story-pause:not([hidden]) {
    grid-column: 1;
    grid-row: 1 / span 5;
    z-index: 2;
    align-self: start;
    justify-self: end;
    position: sticky;
    inset-block-start: calc(var(--band) - 3.5rem);
    display: grid;
  }
}

@media (min-height: 31rem) and (prefers-reduced-motion: reduce) {
  .story.on .words,
  .story.on .words h2 {
    color: inherit;
    transition: none;
  }

  .story.on .words h2 {
    color: var(--white);
  }
}

/* ---------------------------------------------------------------------------------------------------------------
   The sheet: one sheet of paper laid on the night, its top corners rounded, edge to edge. */

.sheet-of-paper {
  --paper: #ffffff;
  --ink: #262b36;
  --ink-soft: #565e70;
  --brand: #1b2b6b;
  --rule: #cbd7ea;
  --focus: #2f55d4;
  padding-block: clamp(3rem, 2rem + 4vw, 6rem) var(--space);
  padding-inline: var(--wrap);
  border-start-start-radius: 2rem;
  border-start-end-radius: 2rem;
  background: var(--paper);
  color: var(--ink);
}

/* In the dark theme the sheet is night paper, a step lighter than the night (1.21:1), so its edge still shows: text on
   it 12.5:1, soft text 6.5:1, links 7.9:1. The night itself is the same in both themes. */
@media (prefers-color-scheme: dark) {
  .sheet-of-paper {
    --paper: #1a2350;
    --ink: #e8eaf0;
    --ink-soft: #a3aac0;
    --brand: #a9b8ff;
    --rule: #2b3668;
    --focus: #7d9bff;
  }
}

.sheet-of-paper :focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.sheet-of-paper > section + section {
  margin-block-start: var(--space);
}

.sheet-of-paper h2 {
  max-inline-size: 22em;
  color: var(--brand);
  font-size: var(--section);
  line-height: 1.1;
  letter-spacing: -0.015em;
  scroll-margin-block-start: 1rem;
}

.sheet-of-paper h2:lang(he) {
  letter-spacing: 0;
}

.sheet-of-paper h3 {
  color: var(--brand);
  font-size: 1.25rem;
  line-height: 1.3;
}

.sheet-of-paper .sub {
  max-inline-size: 38rem;
  margin-block-start: 1rem;
  color: var(--ink-soft);
  font-size: var(--lead);
  line-height: 1.5;
}

.sheet-of-paper a {
  color: var(--brand);
}

/* The facts, written on the notebook's rules: every line of them sits on a rule. */
.facts-line {
  --rule-gap: clamp(2.5rem, 1.6rem + 3.4vw, 5.25rem);
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.4em;
  max-inline-size: 64rem;
  margin: 0;
  padding: 0;
  background: linear-gradient(transparent calc(var(--rule-gap) - 1px), var(--rule) 0) 0 0 / 100% var(--rule-gap);
  color: var(--brand);
  font-size: clamp(1.375rem, 0.9rem + 2.6vw, 3.25rem);
  line-height: var(--rule-gap);
  list-style: none;
}

.facts-line li {
  white-space: nowrap;
}

/* Everything else: a list of type, each item a name and one line, then two real screens of the same height. */
.extras {
  display: grid;
  gap: 3rem;
}

.extras ul {
  display: grid;
  gap: 1.5rem 3rem;
  max-inline-size: 48rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

.extras li p {
  margin-block-start: 0.375rem;
}

.screens {
  display: grid;
  gap: 1rem;
  margin: 0;
}

.screens img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  border: 1px solid var(--rule);
  border-radius: 1rem;
  background: #ffffff;
}

/* The fields of study: type on the spine, each name a link; the photos toward the end edge, one large. */
.fields {
  display: grid;
  gap: 2.5rem;
}

.field-list {
  display: grid;
  gap: 0.25rem 2.5rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

.field-list li {
  padding-block: 0.75rem;
  border-block-end: 1px solid var(--rule);
}

.field-list a {
  display: inline-block;
  min-inline-size: 2.75rem;
  padding-block: 0.4375rem;
  margin-block: -0.4375rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration-thickness: 1px;
}

.field-list p {
  margin-block-start: 0.25rem;
  color: var(--ink-soft);
}

.field-pics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-content: start;
  margin: 0;
}

.field-pics figure {
  margin: 0;
}

.field-pics figure:first-child {
  grid-column: 1 / -1;
}

.field-pics img {
  display: block;
  inline-size: 100%;
  max-inline-size: 36.5rem;
  block-size: auto;
  border-radius: 1rem;
}

/* "Next update" and "Later update": outlined in ink, never yellow (the highlighter marks the visitor's next move). */
.home .tag {
  display: inline-block;
  margin-inline-end: 0.5rem;
  padding: 0 0.625rem;
  border: 1.5px solid var(--brand);
  border-radius: 999px;
  color: var(--brand);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.6;
  vertical-align: 0.1em;
  white-space: nowrap;
}

.home .tag.later {
  border-style: dashed;
}

.soon-line {
  max-inline-size: 38rem;
  margin-block-start: 1.75rem;
  color: var(--ink-soft);
}

.coming-list {
  display: grid;
  gap: 1.75rem 3rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

.coming-list strong {
  display: block;
  margin-block-start: 0.375rem;
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 700;
}

.coming-list p {
  max-inline-size: 38rem;
  margin-block-start: 0.25rem;
}

.coming-list .together {
  display: grid;
  gap: 1rem 2rem;
  align-items: center;
}

.together video {
  display: block;
  inline-size: 100%;
  max-inline-size: 26rem;
  block-size: auto;
  border-radius: 1rem;
  background: var(--night);
}

/* The plans: four columns of type, no boxes, no plan above the others. */
.plan-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.5rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

.plan-list li {
  padding-block-start: 1rem;
  border-block-start: 2px solid var(--brand);
}

.plan-list h3 {
  color: var(--ink-soft);
  font-size: 1rem;
}

.plan-list .price {
  margin-block-start: 0.25rem;
  color: var(--brand);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.plan-list .per {
  display: block;
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
}

/* The launch version's free trials, under the price. */
.plan-list .trial-line {
  margin-block-start: 0.5rem;
  color: var(--brand);
  font-size: 1rem;
  font-weight: 700;
}

.plan-list .line {
  margin-block-start: 0.625rem;
  font-size: 1rem;
}

.fine {
  max-inline-size: 36rem;
  margin-block-start: 1.5rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.go {
  display: inline-block;
  margin-block-start: 0.75rem;
  padding-block: 0.625rem;
  font-weight: 700;
}

.prose {
  max-inline-size: 38rem;
}

.prose p {
  margin-block-start: 1.25rem;
}

.prose h3 {
  margin-block-start: 2rem;
}

/* The questions, from site.css's .faq, in this sheet's measure. */
.home .faq {
  max-inline-size: 44rem;
  margin-block-start: 2rem;
}

/* ---------------------------------------------------------------------------------------------------------------
   The close: start free, the two stores as highlighter strokes, and the pages landing in one stack. */

.close {
  display: grid;
  gap: 3rem;
  padding-block: var(--space) clamp(3rem, 2rem + 4vw, 6rem);
}

.close h2 {
  max-inline-size: 9em;
  color: var(--white);
  font-size: var(--display);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.close h2:lang(he) {
  line-height: 1.06;
  letter-spacing: 0;
}

.close .promise {
  margin-block-start: 1.5rem;
}

.swipes {
  display: grid;
  gap: 0.875rem;
  justify-items: start;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

/* Ink on a stroke of the highlighter with hand-cut ends, as the store screenshots' captions are marked. Text links,
   so the page keeps one App Store badge (Apple's rule), and Apple's words for its store are kept. */
.swipes a {
  --cut: 0.6rem;
  display: inline-flex;
  align-items: center;
  min-block-size: 3.5rem;
  padding: 0.5rem 1.375rem;
  background: var(--marker);
  clip-path: polygon(var(--cut) 4%, 100% 0, calc(100% - var(--cut)) 52%, 100% 100%, 0.2rem 96%, 0 50%);
  color: var(--navy);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.swipes li:nth-child(2) a {
  clip-path: polygon(0 2%, calc(100% - 0.3rem) 6%, 100% 48%, calc(100% - var(--cut)) 100%, var(--cut) 94%, 0.25rem 46%);
}

.swipes a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

/* A yellow ring would merge with the stroke: focus on it is a white ring. The clip would cut the ring, so the
   focused link drops its cut ends. */
.home .swipes a:focus-visible {
  clip-path: none;
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

/* The support line and the maker line (the press pages repeat the maker line word for word). */
.close > div > p:not(.promise) {
  max-inline-size: 38rem;
  margin-block-start: 1rem;
  font-size: 1rem;
}

.close .stores + p {
  margin-block-start: 2.5rem;
}

.close p a {
  color: var(--white);
}

.stack {
  position: relative;
  margin: 0;
  max-inline-size: 36rem;
}

.stack img,
.stack video {
  display: block;
  inline-size: 100%;
  block-size: auto;
  border-radius: 1.5rem;
}

.stack video {
  position: absolute;
  inset: 0;
  block-size: 100%;
  object-fit: cover;
  opacity: 0;
}

.stack.ready video {
  opacity: 1;
}

/* ---------------------------------------------------------------------------------------------------------------
   Wider screens. */

@media (min-width: 40rem) {
  /* Never drawn wider than half their files (1200 px). */
  .screens {
    display: flex;
    justify-content: flex-end;
  }

  .screens img {
    inline-size: auto;
    block-size: clamp(14rem, 8rem + 20vw, 28rem);
  }

  .extras ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coming-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coming-list .together {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
  }

  .stack {
    max-inline-size: 40rem;
  }
}

@media (min-width: 48rem) {
  .prologue,
  .epilogue {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: 4rem;
  }

  .epilogue > div {
    align-self: center;
  }

  .epilogue.two {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 3rem;
  }

  .panel {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: 4rem;
  }

  .mood {
    justify-self: end;
  }

  .plan-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Computers: the window beside the headline; the frame beside the words. */
@media (min-width: 64rem) {
  .intro {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: clamp(3rem, 6vw, 6rem);
    min-block-size: calc(min(100svh, 56rem) - var(--top-h));
    padding-block: 1rem 2rem;
  }

  .window {
    inline-size: calc(min(82svh, 46rem) * 2020 / 2388);
    justify-self: end;
  }

  /* The landscape film: the headline across the content, the promise and the badges on one line under it, the film
     under them, bleeding past the fold. */
  .intro:has(> .window[data-shape="landscape"]) {
    grid-template-columns: minmax(0, 1fr);
    min-block-size: 0;
    padding-block: 1rem 0;
  }

  .intro:has(> .window[data-shape="landscape"]) .intro-text {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 3rem;
  }

  .intro:has(> .window[data-shape="landscape"]) h1 {
    grid-column: 1 / -1;
    max-inline-size: 16em;
    font-size: clamp(3.25rem, min(7.4cqi, 11svh), 6.5rem);
  }

  .intro:has(> .window[data-shape="landscape"]) .cta {
    margin-inline-start: 0;
  }

  .window[data-shape="landscape"] {
    justify-self: start;
  }

  /* As large as the column lets it be, and short enough that the badges stay in the first screen (1280 x 600). */
  .intro h1 {
    font-size: clamp(3.25rem, min(16cqi, 11.5svh), 6rem);
  }

  .intro h1:lang(he) {
    font-size: clamp(3.25rem, min(17cqi, 12svh), 6.5rem);
  }

  /* The list in two columns, the two screens stacked beside it at the end edge: no hole beside the screens. */
  .extras {
    grid-template-columns: minmax(0, 1fr) minmax(0, 19rem);
    column-gap: 4rem;
    align-items: start;
  }

  .extras ul {
    max-inline-size: none;
  }

  .screens {
    display: grid;
    margin-block-start: 0.5rem;
  }

  .screens img {
    inline-size: 100%;
    block-size: auto;
  }

  .fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    column-gap: 4rem;
    align-items: start;
  }

  .close {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 4rem;
    align-items: center;
  }

  .stack {
    justify-self: end;
  }
}

@media (min-width: 64rem) and (min-height: 31rem) {
  .story.on .chapters {
    --frame-h: min(80svh, 46rem, 0.46 * min(100vw - 2 * var(--gutter), var(--page-max)) * 2388 / 2020);
    grid-template-columns: minmax(0, 1fr) calc(var(--frame-h) * 2020 / 2388);
    column-gap: clamp(3rem, 6vw, 6rem);
  }

  .story.on .words {
    container-type: inline-size;
    align-content: center;
    min-block-size: 100svh;
    padding-block: 2rem;
    margin-block-start: 0;
  }

  .story.on .chapter:first-child .words {
    align-content: start;
    min-block-size: 240svh;
  }

  .story.on .chapter:first-child .words > div {
    display: grid;
    align-content: center;
    min-block-size: 100svh;
    inset-block-start: 0;
  }

  .story.on .words h2 {
    font-size: clamp(2.25rem, 10.5cqi, 4rem);
  }

  .story.on .frame {
    grid-column: 2;
    justify-self: stretch;
    inset-block-start: calc((100svh - var(--frame-h)) / 2);
    block-size: var(--frame-h);
    padding: 0;
    box-shadow: none;
    clip-path: none;
    background: none;
  }

  .story.on .frame > * {
    inset: 0;
    block-size: 100%;
    inline-size: 100%;
    border-radius: 1.5rem;
  }

  .story.on .frame > picture,
  .story.on .frame > .scrub {
    box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 0 4rem 0.5rem var(--glow);
  }

  .story.on .story-pause:not([hidden]) {
    grid-column: 2;
    justify-self: end;
    inset-block-start: calc((100svh + var(--frame-h)) / 2 + 0.75rem);
  }
}

@media print {
  .home,
  .night {
    background: none;
    color: #000000;
  }

  .home .cta,
  .pause,
  .story video,
  .scrub,
  .stack video,
  .swipes {
    display: none;
  }

  .intro h1,
  .prologue h2,
  .epilogue h2,
  .words h2,
  .close h2 {
    color: #000000;
  }

  .sheet-of-paper {
    padding-inline: 0;
  }
}
