/* Inksound website: the one stylesheet of every page, English (ltr) and Hebrew (rtl).

   The colors are the app's own (src/lib/theme.ts and src/lib/palette.ts): the desk behind the pages, the white
   paper with its ruled lines and its margin line, the ink, and the highlighter, which marks selected text. The paper
   runs from edge to edge of the window on every screen, and the desk shows only between sheets, never around them. A
   policy page is one sheet: its head is ruled, with the title written on the lines, and its margin line runs down the
   page; the text keeps a readable measure in the middle, and on wide screens the margin becomes a column for the
   headings, like notes in a notebook's margin. A marketing page (body class "wide") opens with the same ruled paper
   and goes on in sheets ("bands") of plain paper, with cards, real screenshots and the plans; their content, and the
   top bar's and the footer's, is at most --page-max wide (about 1280 px), centered.

   Only logical properties (inline, block) place things, so a Hebrew page mirrors itself: its margin line is on the
   right, as in a Hebrew notebook. No web fonts, and no script but the home pages' own (README, "The script") and
   consent.js, the cookie banner of every page (README, "Analytics and consent"). */

:root {
  color-scheme: light dark;

  --desk: #dce1e9;
  --paper: #ffffff;
  --rule: #cbd7ea;
  --margin: #e7a3a3;
  --ink: #262b36;
  --ink-soft: #565e70;
  --brand: #1b2b6b;
  --brand-ink: #ffffff;
  --brand-hover: #2f4396;
  --highlight: #ffe45c;
  --highlight-ink: #262b36;
  --hl-ink: var(--brand);
  --focus: #2f55d4;
  --card: #f4f6fa;
  --shot-edge: #cbd7ea;
  --frame: #16181d;
  --sheet-shadow: 0 1px 2px rgb(27 43 107 / 0.08), 0 18px 40px -22px rgb(27 43 107 / 0.3);
  --shot-shadow: 0 1px 2px rgb(27 43 107 / 0.08), 0 16px 32px -20px rgb(27 43 107 / 0.4);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Hebrew", "Helvetica Neue",
    Arial, sans-serif;
  --body-size: 1.0625rem;
  /* The ruled lines' spacing. Every line in a ruled head is this tall, so each one sits on a rule. */
  --lh: 2.25rem;
  /* Where a rule crosses each line: just under the baseline of body text in the common system fonts. */
  --rule-at: calc(var(--lh) - 0.6875rem);
  --measure: 38rem;

  /* The widest the content of a band, a hero, the top bar or the footer gets, centered in the window. */
  --page-max: 80rem;
  /* The space beside that content: 20 px on phones, growing to 56 px on wide screens. */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  /* The side padding of a block that spans the window (the bars, a hero, a band), so that its content is centered and
     at most --page-max wide. Its percentage is of the block's containing block, the window's width: use it only on
     the children of body and of main, and on what is positioned in a hero. */
  --wrap: max(var(--gutter), (100% - var(--page-max)) / 2);
  --top-h: 3.5rem;

  /* Phones: one column, with a narrow margin. A policy page's margin line is at --line-x, its text starts at
     --text-start, and its parts start at --doc-in (on wide screens, with the headings' column). A ruled hero's margin
     line is at the content's start, and its text --margin-w after it. */
  --cue: 0rem;
  --gap: 0rem;
  --line-x: 1.25rem;
  --doc-in: 2.25rem;
  --text-start: var(--doc-in);
  --margin-w: 1.5rem;
  --band-gap: 0.75rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --desk: #0e1116;
    --paper: #24272e;
    --rule: #3e434e;
    --margin: #7a4a50;
    --ink: #e8eaf0;
    --ink-soft: #9aa1b2;
    --brand: #a9b8ff;
    --brand-ink: #0e1222;
    --brand-hover: #c4cfff;
    --highlight: #7a6512;
    --highlight-ink: #e8eaf0;
    --hl-ink: var(--highlight-ink);
    --focus: #7d9bff;
    --card: #2b2f38;
    --shot-edge: #3e434e;
    --sheet-shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 18px 40px -22px rgb(0 0 0 / 0.8);
    --shot-shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 16px 32px -20px rgb(0 0 0 / 0.9);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--body-size);
  line-height: 1.6;
  overflow-wrap: break-word;
}

::selection {
  background: var(--highlight);
  color: var(--highlight-ink);
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li,
dd {
  text-wrap: pretty;
}

strong {
  font-weight: 650;
}

img {
  max-inline-size: 100%;
}

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-start: -10rem;
  z-index: 2;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: var(--paper);
}

.skip:focus {
  inset-block-start: 1rem;
}

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* A word marked with the highlighter, as the app marks the tool in use. */
.hl {
  padding-inline: 0.06em;
  color: var(--hl-ink);
  background: linear-gradient(transparent 56%, var(--highlight) 56%, var(--highlight) 94%, transparent 94%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* "Next update": a feature that is not in the stores yet (site/README.md, "Before you deploy"). */
.soon {
  display: inline-block;
  margin-inline-end: 0.5rem;
  padding: 0.0625rem 0.5rem;
  border-radius: 999px;
  background: var(--highlight);
  color: var(--highlight-ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  vertical-align: 0.15em;
  white-space: nowrap;
}

/* The bar above the page and the footer under it span the window, and their content lines up with the bands'. The
   language of the other version is in the footer only. */

.top,
.foot {
  padding-inline: var(--wrap);
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1.5rem;
  min-block-size: var(--top-h);
  padding-block: 0.375rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-block: 0.5rem;
  color: var(--brand);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark img {
  inline-size: 1.75rem;
  block-size: 1.75rem;
  border-radius: 22%;
}

.top ul,
.foot ul {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.top nav a {
  display: inline-block;
  min-inline-size: 2.75rem;
  padding-block: 0.625rem;
  font-size: 0.9375rem;
  text-align: center;
}

.top nav a[aria-current="page"],
.foot a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.foot {
  padding-block: 1.5rem 3rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.foot a {
  display: inline-block;
  min-inline-size: 2.75rem;
  padding-block: 0.625rem;
  text-align: center;
}

.foot p {
  margin: 0.75rem 0 0;
}

.foot .tm {
  max-inline-size: 48rem;
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* The sheet of a policy page, the window's width, and its margin line. Its head and parts pad themselves, so their
   percentages are of the window's width too. */

.sheet {
  position: relative;
  padding-block-end: 3rem;
  background: var(--paper);
}

.sheet > .part {
  padding-inline: var(--doc-in) var(--gutter);
}

.sheet::before,
.hero::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: var(--line-x);
  inline-size: 2px;
  background: var(--margin);
}

.hero::before {
  inset-inline-start: var(--wrap);
}

/* Ruled paper, edge to edge, with a blank band at the top as on a notebook page: the policy pages' head and the
   marketing pages' hero. Every line in them is var(--lh) tall (or twice that), so the text sits on the rules. */

.page-head,
.hero {
  background:
    linear-gradient(var(--paper), var(--paper)) 0 0 / 100% calc(2 * var(--lh)) no-repeat,
    linear-gradient(transparent var(--rule-at), var(--rule) 0, var(--rule) calc(var(--rule-at) + 1px), transparent 0)
      0 0 / 100% var(--lh);
  line-height: var(--lh);
}

.page-head {
  padding-block: calc(2 * var(--lh)) var(--lh);
  padding-inline: var(--text-start) var(--gutter);
}

.page-head > *,
.hero-text > * {
  position: relative;
  /* Larger or smaller type moves so that its baseline, like the body text's, sits on the rule. */
  inset-block-start: calc((var(--body-size) - 1em) * 0.38);
  max-inline-size: var(--measure);
  margin: 0;
}

.page-head h1 {
  color: var(--brand);
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: var(--lh);
}

.page-head .lead {
  margin-block-start: var(--lh);
  font-size: 1.125rem;
}

.page-head .date {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* Sections of a policy page: a heading, then its text. */

.part {
  margin-block-start: 2.5rem;
}

.part > h2 {
  margin: 0 0 0.625rem;
  color: var(--brand);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.35;
  scroll-margin-block-start: 1rem;
}

/* A heading reached from a link is marked with the highlighter, line by line. */
.part > h2:target,
.band :is(h2, h3):target {
  text-decoration-line: underline;
  text-decoration-color: var(--highlight);
  text-decoration-thickness: 0.5em;
  text-underline-offset: -0.3em;
  text-decoration-skip-ink: none;
}

.body {
  max-inline-size: var(--measure);
}

.body > * {
  margin: 0;
}

.body > * + * {
  margin-block-start: 0.875rem;
}

.body ul,
.body ol {
  padding-inline-start: 1.375rem;
}

.body li + li {
  margin-block-start: 0.625rem;
}

/* Lists of links alone (a policy page's contents, the pages under "Page not found"): each a finger's height. */
.toc li + li,
.links li + li {
  margin-block-start: 0;
}

.toc a,
.links a {
  display: inline-block;
  min-inline-size: 2.75rem;
  padding-block: 0.5625rem;
}

/* Marketing pages: the ruled hero spans the window; its margin line is at the content's start, and its text a margin
   after it. */

.hero {
  position: relative;
  display: grid;
  align-items: center;
  padding-block: calc(2 * var(--lh)) var(--lh);
  padding-inline: calc(var(--wrap) + var(--margin-w)) var(--wrap);
  background-color: var(--paper);
}

.kicker {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 650;
}

.hero h1 {
  color: var(--brand);
  font-size: 1.875rem;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: var(--lh);
}

.hero .lead {
  margin-block-start: var(--lh);
  font-size: 1.1875rem;
}

.hero .fine {
  margin-block-start: var(--lh);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* The store badges: Apple's and Google's official files, unchanged (assets/badges/README.md), Apple's first as Apple
   asks. Both show at the same height, --badge: 44 px, or 40 px on the narrowest phones, never under Apple's 40 px on
   screen (Google asks for 28 px). Each list is a box of plain paper that keeps a quarter of that height clear around
   every badge, as both guidelines ask: no ruled line, text or picture comes closer, and the badges are a quarter
   apart. Google's PNG has transparent padding of 41/168 of its badge's height on every side, so its image is drawn
   250/168 as tall and pulled back by that padding: the badge itself is as tall as Apple's and lines up with it. Each
   link reaches 2 px into the clear space above and below its badge, unseen, so that even the 40 px badges are 44 px
   tall targets for a finger. */

.cta {
  --badge: 2.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--badge) / 4 + 1px);
  inline-size: fit-content;
  max-inline-size: 100%;
  margin: 0;
  padding: calc(var(--badge) / 4);
  border-radius: 0.75rem;
  background: var(--paper);
  list-style: none;
}

.cta a {
  display: flow-root;
  margin-block: -2px;
  padding-block: 2px;
}

.cta img {
  display: block;
  inline-size: auto;
  max-inline-size: none;
  block-size: var(--badge);
}

.cta .play img {
  block-size: calc(var(--badge) * 250 / 168);
  margin: calc(var(--badge) * -41 / 168);
}

/* In the ruled hero the badges' box is two ruled lines tall, its paper hides the rules around them, and the badges
   line up with the text. */
.hero-text > .cta {
  inset-block-start: 0;
  align-content: center;
  min-block-size: calc(2 * var(--lh));
  margin-block-start: var(--lh);
  margin-inline-start: calc(var(--badge) / -4);
}

@media (max-width: 23rem) {
  .cta {
    --badge: 2.5rem;
  }
}

/* Down to 320 px (the narrowest phones, and an iPad's narrowest window beside another app) the top bar keeps its
   wordmark and three links on one line: under 25rem (400 px) its gaps and wordmark shrink, under 22.25rem (356 px) its
   type too, and again under 21rem (336 px). In a font as wide as Arial it has at least 9 px to spare at every width
   (README, "Every screen"). Each link stays 44 px tall for a finger. */
@media (max-width: 25rem) {
  .top {
    column-gap: 0.625rem;
  }

  .top ul {
    column-gap: 0.75rem;
  }

  .wordmark {
    gap: 0.375rem;
    font-size: 1.125rem;
  }
}

@media (max-width: 22.25rem) {
  .top {
    column-gap: 0.5rem;
  }

  .top ul {
    column-gap: 0.625rem;
  }

  .wordmark {
    gap: 0.3125rem;
    padding-block: 0.5625rem;
    font-size: 1.0625rem;
  }

  .wordmark img {
    inline-size: 1.5rem;
    block-size: 1.5rem;
  }

  .top nav a {
    padding-block: 0.6875rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 21rem) {
  .top ul {
    column-gap: 0.5rem;
  }

  .wordmark {
    gap: 0.25rem;
    padding-block: 0.625rem;
    font-size: 1rem;
  }
}

/* The home pages' hero shows the app itself (assets/hero/README.md): a real screen of Inksound, a lecture's notes in
   the middle of their replay, under the headline on narrow screens and beside it on wide ones, with rounded corners
   and a soft shadow, and no device drawn around it. Its file is 1200 x 1572. */
.hero-shot {
  margin: var(--lh) 0 0;
}

.hero-shot img {
  display: block;
  inline-size: min(100%, 20rem);
  block-size: auto;
  margin-inline: auto;
  border: 1px solid var(--shot-edge);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shot-shadow);
}

/* Bands: sheets of plain paper under the hero, the window's width, with the desk between them. */

.band {
  margin-block-start: var(--band-gap);
  padding-block: clamp(2.25rem, 1.25rem + 2.5vw, 4rem) clamp(2.5rem, 1.5rem + 2.5vw, 4.25rem);
  padding-inline: var(--wrap);
  background: var(--paper);
}

.band-head {
  max-inline-size: 44rem;
  margin-block-end: 1.75rem;
}

.band h2 {
  margin: 0;
  color: var(--brand);
  font-size: 1.625rem;
  font-weight: 750;
  letter-spacing: -0.012em;
  line-height: 1.2;
  scroll-margin-block-start: 1rem;
}

.band-head p {
  max-inline-size: 40rem;
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.band h3 {
  margin: 0;
  color: var(--brand);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  scroll-margin-block-start: 1rem;
}

.band p {
  margin: 0.625rem 0 0;
}

.band > p,
.band-list {
  max-inline-size: 40rem;
}

.more {
  display: inline-block;
  margin-block-start: 1.25rem;
  padding-block: 0.625rem;
  font-weight: 650;
}

.fine {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* Cards: the replay's steps, the fields of study, the tools without a screenshot. */

.steps,
.cards,
.next,
.plans {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps {
  counter-reset: step;
}

.steps > li,
.cards > li {
  padding: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--card);
}

.steps > li {
  counter-increment: step;
}

.steps > li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  inline-size: 2rem;
  block-size: 2rem;
  margin-block-end: 0.75rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 0.9375rem;
  font-weight: 700;
}

.cards p,
.steps p {
  margin-block-start: 0.375rem;
  font-size: 1rem;
}

.cards a.go {
  display: inline-block;
  margin-block-start: 0.25rem;
  padding-block: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 650;
}

.ic {
  display: grid;
  place-items: center;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  margin-block-end: 0.75rem;
  border-radius: 50%;
  background: var(--highlight);
  color: var(--highlight-ink);
}

.ic svg {
  inline-size: 1.375rem;
  block-size: 1.375rem;
}

.band > .fine,
.band > .soon-note {
  max-inline-size: 36rem;
  margin-block-start: 1.25rem;
}

/* The replay: the three steps beside the App Store screenshot of a note replaying (under them on phones). */

.replay {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

/* The fields of study: three photos of students over the cards, one wide and two side by side on phones. */

.field-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-block-end: 1.75rem;
}

.field-photos figure {
  margin: 0;
}

.field-photos figure:first-child {
  grid-column: 1 / -1;
}

/* At most half their full-size file (1168 px), so a 2x screen always has pixels to spare; the pages give screens
   denser than 1x that file (README, "Images, video and badges"). */
.field-photos img {
  display: block;
  inline-size: 100%;
  max-inline-size: 36.5rem;
  block-size: auto;
  border-radius: 10px;
}

/* Rows: a tool and its real screenshot, side by side on wide screens. */

.rows {
  display: grid;
  gap: 3rem;
}

.row {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.row h3 {
  font-size: 1.375rem;
  line-height: 1.25;
}

.row .copy {
  max-inline-size: 34rem;
}

.shot {
  margin: 0;
}

.shot img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  margin-inline: auto;
  border: 1px solid var(--shot-edge);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shot-shadow);
}

.shot.tall img {
  max-inline-size: 24rem;
}

.shot.narrow img {
  max-inline-size: 17rem;
}

.shot.phone img {
  max-inline-size: 15rem;
  border: 7px solid var(--frame);
  border-radius: 30px;
}

/* Two blocks a row on the features page. */
.feats {
  display: grid;
  gap: 2.5rem 3.5rem;
  align-items: start;
}

.feat > .shot {
  margin-block-start: 1.25rem;
}

.feat ul,
.band-list {
  margin: 0.625rem 0 0;
  padding-inline-start: 1.25rem;
}

.feat li + li,
.band-list li + li {
  margin-block-start: 0.5rem;
}

.prose {
  max-inline-size: 40rem;
}

.prose h3 {
  margin-block-start: 1.75rem;
}

/* The fields of study on the features page: the icon beside the heading. */
.fieldlist h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fieldlist .ic {
  flex: none;
  margin: 0;
}

/* Sync, backups and study tools: a list whose items keep their "Next update" tag until they are in the stores. */

.next > li {
  padding-block-start: 0.875rem;
  border-block-start: 1px solid var(--rule);
}

.next strong {
  font-weight: 700;
}

.next p {
  margin-block-start: 0.25rem;
}

/* The plans. */

.plan {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem 1.375rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--card);
}

.plan.free {
  border-style: dashed;
  background: transparent;
}

.plan h3 {
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 650;
}

.plan .price {
  margin-block-start: 0.25rem;
  color: var(--brand);
  font-size: 2.125rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.plan .per {
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}

.plan .trial {
  align-self: flex-start;
  margin-block-start: 0.75rem;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  background: var(--highlight);
  color: var(--highlight-ink);
  font-size: 0.875rem;
  font-weight: 700;
}

.plan ul {
  margin: 0.75rem 0 0;
  padding-inline-start: 1.125rem;
  font-size: 1rem;
}

.plan li + li {
  margin-block-start: 0.375rem;
}

/* Questions: each one opens in place, no script needed. */

.faq {
  max-inline-size: 48rem;
  border-block-start: 1px solid var(--rule);
}

.faq details {
  border-block-end: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-block-size: 3rem;
  padding-block: 0.875rem;
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

/* A plus that turns into a bar when the answer is open, drawn with two gradients. */
.faq summary::after {
  content: "";
  flex: none;
  inline-size: 0.875rem;
  block-size: 0.875rem;
  background:
    linear-gradient(var(--brand), var(--brand)) center / 100% 2px no-repeat,
    linear-gradient(var(--brand), var(--brand)) center / 2px 100% no-repeat;
}

.faq details[open] summary::after {
  background: linear-gradient(var(--brand), var(--brand)) center / 100% 2px no-repeat;
}

.faq .answer {
  max-inline-size: var(--measure);
  padding-block-end: 1.125rem;
}

.faq .answer p {
  margin: 0;
}

.faq .answer p + p {
  margin-block-start: 0.625rem;
}

/* The last band: the stores again, in words, on the brand's color. The badges are at the top of the page only: Apple
   asks for one App Store badge per layout (assets/badges/README.md). The focus ring takes the band's ink, which stands
   out on the band in both themes. */

.band.get {
  background: var(--brand);
  color: var(--brand-ink);
}

.band.get h2,
.band.get a {
  color: inherit;
}

.band.get :focus-visible {
  outline-color: currentColor;
}

.band.get p {
  max-inline-size: 44rem;
}

.stores {
  margin: 1rem 0 0.75rem;
  padding: 0;
  list-style: none;
}

.stores a {
  display: inline-block;
  padding-block: 0.5rem;
  font-size: 1.1875rem;
  font-weight: 600;
}

/* On-this-page links (features page). */

.jump ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.jump a {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.75rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.jump a:hover {
  border-color: var(--brand);
}

/* The press page (README, "The press page"): the fact sheet's facts, a label beside each from tablets up, and the
   files to download, each a link around its preview, its name and its file's format and size. A preview is never drawn
   wider than half its file, so every screen up to 2x shows it sharp. */

.facts {
  max-inline-size: 48rem;
  margin: 1.5rem 0 0;
  border-block-start: 1px solid var(--rule);
}

.facts > div {
  display: grid;
  gap: 0.125rem 1.5rem;
  padding-block: 0.75rem;
  border-block-end: 1px solid var(--rule);
}

.facts dt {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 650;
}

.facts dd {
  margin: 0;
}

/* The facts' links are a finger's height, reaching into their row's padding, unseen. */
.facts a {
  display: inline-block;
  padding-block: 0.6875rem;
  margin-block: -0.6875rem;
}

.kit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 1rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.band h3 + .kit {
  margin-block-start: 1rem;
}

.band > :is(.band-list, p) + h3 {
  margin-block-start: 2.25rem;
}

.kit + h3 {
  margin-block-start: 2.25rem;
}

.kit a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
  color: var(--ink);
  text-decoration: none;
}

.kit img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  margin-block-end: 0.625rem;
  border-radius: 10px;
}

.kit .name {
  color: var(--brand);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.kit a:hover .name {
  text-decoration-thickness: 2px;
}

.kit .file {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* The icons: the app icon with the corners it has in the top bar, the ink drop on the background it is made for. */
.kit.icons img {
  max-inline-size: 10rem;
}

.kit .app img {
  border-radius: 22%;
}

.kit .on-light img {
  border: 1px solid #cbd7ea;
  background: #ffffff;
}

.kit .on-dark img {
  background: var(--film-top, #0b1020);
}

.kit.shots img {
  max-inline-size: 18.75rem;
  border: 1px solid var(--shot-edge);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shot-shadow);
}

/* The lecture hall is 16:9 and the students 4:3: the pictures meet their names on one line. */
.kit.pics {
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
}

.kit.pics img {
  max-inline-size: 30rem;
}

@media (min-width: 40rem) {
  .facts > div {
    grid-template-columns: 10rem minmax(0, 1fr);
  }

  .kit.icons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .kit.shots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kit.pics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 60rem) {
  .kit.shots {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 75rem) {
  .kit.pics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Slots the release owner fills later (assets/lifestyle/README.md, assets/hero/README.md). */

.life {
  margin: 0 0 1.75rem;
}

.life img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  border-radius: 10px;
}

.video {
  max-inline-size: 22rem;
  margin: 2rem auto 0;
}

.video video {
  display: block;
  inline-size: 100%;
  block-size: auto;
  border-radius: 14px;
  background: #000000;
}

.video figcaption {
  margin-block-start: 0.625rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  text-align: center;
}

/* Tablets: a policy page's text is a column of its measure in the middle of the sheet, its margin line beside it. */

@media (min-width: 40rem) {
  :root {
    --doc-in: max(4rem, (100% - var(--measure)) / 2);
    --line-x: calc(var(--doc-in) - 1.5rem);
    --margin-w: 2rem;
    --band-gap: 1.25rem;
  }

  .page-head h1 {
    font-size: 1.875rem;
  }

  .hero h1 {
    font-size: 2.375rem;
    line-height: calc(2 * var(--lh));
    inset-block-start: calc(var(--lh) / 2 + (var(--body-size) - 1em) * 0.38);
  }

  .band h2 {
    font-size: 1.875rem;
  }

  .cards,
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .next {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
  }

  .hero-shot img {
    inline-size: min(100%, 22rem);
  }

  .field-photos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }

  .field-photos figure:first-child {
    grid-column: auto;
  }
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .replay {
    grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
    gap: 2.5rem;
  }

  .replay .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
  }

  .row.flip > .shot {
    order: -1;
  }

  .feats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Wide screens: the policy pages' margin is a column for the headings, beside the text, the two in the middle of the
   sheet; the home pages' screen stands beside their headline. */

@media (min-width: 60rem) {
  :root {
    --cue: 9.5rem;
    --gap: 2.5rem;
    --doc-in: max(var(--gutter), (100% - var(--cue) - var(--gap) - var(--measure)) / 2);
    --line-x: calc(var(--doc-in) + var(--cue) + var(--gap) / 2 - 1px);
    --text-start: calc(var(--doc-in) + var(--cue) + var(--gap));
  }

  .part {
    display: grid;
    grid-template-columns: var(--cue) minmax(0, var(--measure));
    align-items: baseline;
    column-gap: var(--gap);
  }

  .part > h2 {
    grid-column: 1;
    margin: 0;
    font-size: 1rem;
    text-align: end;
  }

  .part > .body {
    grid-column: 2;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 3rem;
  }

  .hero.small {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero h1 {
    font-size: 2.75rem;
  }

  .hero-shot {
    margin: 0;
  }

  /* The home pages' hero: the text on its rules at the top, the screen beside it as tall as the first screen lets it
     be: the window's height, up to 820 px, less the top bar and the hero's padding, at the screenshot's 1200 x 1572.
     With the top bar, the hero then fills the first screen. */
  .hero > .hero-text {
    align-self: start;
  }

  .hero-shot img {
    inline-size: min(100%, (min(100vh, 51.25rem) - var(--top-h) - 3 * var(--lh)) * 0.7634);
    inline-size: min(100%, (min(100svh, 51.25rem) - var(--top-h) - 3 * var(--lh)) * 0.7634);
    margin-inline: auto 0;
    border-radius: 18px;
  }

  .band h2 {
    font-size: 2.125rem;
  }

  /* As many cards a row as fit at 15rem or more, and never more than four. */
  .cards {
    grid-template-columns: repeat(auto-fill, minmax(max(15rem, (100% - 3rem) / 4), 1fr));
  }

  .plans {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* The steps keep a readable width at the start, the screenshot goes to the end. */
  .replay {
    grid-template-columns: minmax(0, 40rem) minmax(0, 24rem);
    justify-content: space-between;
    gap: 4.5rem;
  }

  .row {
    gap: 4.5rem;
  }
}

/* The widest screens: the list of what is coming in three columns. */

@media (min-width: 75rem) {
  .next {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (forced-colors: active) {
  .jump a,
  .soon,
  .plan .trial {
    border: 1px solid ButtonText;
  }
}

@media print {
  body {
    background: none;
  }

  .skip,
  .top nav,
  .foot ul,
  .cta,
  .jump {
    display: none;
  }

  .sheet > .part,
  .hero,
  .band {
    padding-inline: 0;
  }

  .sheet::before,
  .hero::before {
    display: none;
  }

  .hero-shot img {
    inline-size: 12rem;
    margin-inline: 0;
    box-shadow: none;
  }

  .page-head,
  .hero {
    padding: 0 0 1rem;
    background: none;
  }

  .band.get {
    background: none;
    color: inherit;
  }
}
