/* The home page is one picture.
 *
 * The world of the sleep screen fills the window: the Earth across the
 * bottom of it, turning slowly, its landmarks round the rim; cloud, a moon, a
 * planet, stars, books on the wing. The Kindle stands in front of it, whole.
 * The words are written in its sky. Nothing is a panel laid over the
 * picture; the three ways on are books in it, and the star is a star in it.
 *
 * The world is drawn in colour and shown in grey: a veil over the whole of
 * it takes the colour out (.veil, backdrop-filter). Only the gold star is
 * above the veil, the one thing in colour. When the Kindle falls asleep, the
 * unicorn leaps out of its sleep picture and catches the star, and a hole
 * opens in the veil from the star out across the window: the world is lit,
 * from the star outward — the Kindle's sleep picture with it.
 *
 * Anything you can press is in black ink and behaves like the panel: it
 * changes in steps, and a whole change clears to black and white first.
 *
 * The world is in depths (.depth), which world.js slides against each other
 * with the pointer. The Kindle is the plane they turn about.
 *
 * Sizes inside .screen are real device pixels (--u).
 */

/* ------------------------------------------------------------- the paper */

:root {
  /* The sky is the page: white, a little warm. Grey only through the veil.
   * Pencil is the world's line, at two weights. */
  --sky: #fdfcf8;
  --pencil: #858583;
  --pencil-2: #a9a9a7;
  --paper: #ffffff;
  --text-line: #d9d9d7;
  /* The colours of the lit world, off the colour sleep picture. */
  --gold: #ffd75e;
  --gold-line: #dea23a;
  --sea: #8ab8ef;
  --rose: #f3a7bf;
  /* A flying book seen from below its pages: the page block, then the
   * cover past it, in the book's own colour (--c). */
  --leaves: #f4efe4;
}

@media (prefers-color-scheme: dark) {
  /* Night: a dark sky. The drawings keep their colours, a little dimmed. */
  :root {
    --sky: #0c0c0e;
    --pencil: #7c7c7e;
    --pencil-2: #58585a;
    --paper: #1a1a1b;
    --text-line: #333335;
    --leaves: #232325;
    --gold: #f2c84f;
    --gold-line: #b98424;
  }
}

body.home {
  background: var(--sky);
}

/* The bar is written on the sky, not laid over it. */
.home .chrome {
  position: absolute;
  inset: 0 0 auto;
}

.home .topbar,
.home .topbar.stuck {
  background: transparent;
  border-bottom: 0;
}

.home .topbar-in {
  max-width: 1360px;
  align-items: center;
}

/* The bar is above the veil, so the mark is not greyed by it: it is greyed
 * here instead, and comes into colour with the world the unicorn lights.
 * Without script there is no veil and no story, and the <noscript> rules in
 * the page leave it in colour. */
.home .brand img {
  filter: grayscale(1);
  transition: filter 1.4s ease 0.3s;
}

.home:has(.world.lit) .brand img {
  filter: none;
}

/* ------------------------------------------------------------- the world */

/* One screen, and never more than one.
 *
 * The floor used to be a flat 600px, which is a floor the window can be
 * under: a phone held sideways is 375 tall, and the world went on being
 * 600, so the title, the two buttons, the facts and the Kindle itself all
 * sat below the fold and the page scrolled — the reader got the logo, the
 * globe and nothing to do. min() keeps the floor from ever rising above
 * the window. Nothing else has to change for it: the device is already
 * sized in svh (--dh0), so it shrinks with the room it is given. */
.world {
  position: relative;
  height: 100svh;
  min-height: min(600px, 100svh);
  overflow: hidden;
  isolation: isolate;
  background: var(--sky);
}

.depth {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* One stacking order for the whole world. The hero sets no z-index of its
 * own, so its parts take their places in this one: the Kindle, the words and
 * the signpost at 5, the Kindle's subtitle at 7; the star at 10, above the
 * veil (9), so it is in colour while everything else is grey. */
.d-sky { z-index: 0; }
.d-earth { z-index: 2; }

/* Margin round the sky, which moves most, so a slide never shows an edge. */
.d-sky {
  inset: -24px;
}

/* ----------------------------------------------------------------- sky */

.sky {
  position: absolute;
  inset: 0;
}

/* The moon and the planet keep to the right-hand margin, out of the way
 * of the Kindle and the words. Cut out of the colour sleep picture. */
.moon,
.planet {
  position: absolute;
  height: auto;
  max-width: none;
}

.moon {
  left: 90%;
  top: 9%;
  width: clamp(56px, 6vw, 92px);
}

.planet {
  left: 91.5%;
  top: 37%;
  width: clamp(60px, 6.4vw, 100px);
}

@media (prefers-color-scheme: dark) {
  .moon,
  .planet {
    filter: brightness(0.86);
  }
}

.spk {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: calc(var(--s) * 1px);
  height: calc(var(--s) * 1px);
  overflow: visible;
  fill: var(--gold);
  stroke: var(--gold-line);
  stroke-width: 1.1;
  stroke-linejoin: round;
}

.spk use {
  transform-box: fill-box;
  transform-origin: center;
  animation: twinkle calc(4s + var(--ph) * 0.45s) ease-in-out infinite;
  animation-delay: calc(var(--ph) * -0.9s);
}

@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  46% { transform: scale(0.74) rotate(10deg); }
  54% { transform: scale(1.14) rotate(-4deg); }
}

/* The wave: when the Kindle comes up as Android, the stars light one after
 * another outward from it. world.js sets each star's delay from its
 * distance. */
.spk.wave use {
  animation: flare 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) var(--wave, 0s) 1 both;
}

@keyframes flare {
  0% { transform: scale(1); }
  30% { transform: scale(1.9) rotate(45deg); fill: #fff3c4; }
  100% { transform: scale(1) rotate(90deg); }
}

/* Small round dots, as the sleep picture scatters them: blue, pink, gold. */
.dot {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sea);
}

.dot:nth-of-type(3n + 2) { background: var(--rose); }
.dot:nth-of-type(3n) { background: var(--gold); }

.dot.wave {
  animation: dot-flare 0.7s ease-out var(--wave, 0s) 1 both;
}

@keyframes dot-flare {
  30% { transform: scale(2.4); }
}

/* A shooting star, the way the sleep screen draws one: a thin arc and a
 * small star at its head. world.js throws one now and then. */
.shoot {
  position: absolute;
  width: 240px;
  height: 90px;
  opacity: 0;
}

.shoot svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: var(--gold-line);
  stroke-width: 1.3;
  stroke-linecap: round;
}

.shoot .head {
  fill: var(--gold);
}

/* ------------------------------------------------------------ the Earth
 *
 * Across the bottom of the window, the top of a great globe, turning once in
 * four minutes; the world's landmarks stand round its rim and turn with it.
 * Only the cap shows: the centre is below the window. --R is the radius,
 * --top where the top of it is. */

.d-earth {
  --R: clamp(520px, 62vw, 150svh);
  --top: 74svh;
}

.earth {
  position: absolute;
  left: 50%;
  top: calc(var(--top) + var(--R));
  width: 0;
  height: 0;
}

/* A point at the centre, turning; everything on the globe hangs off it. */
.spinner {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  animation: spin 240s linear infinite;
  will-change: transform;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* The drawing's circle is 1950 px across in a 1954 px picture. */
.globe {
  position: absolute;
  left: calc(var(--R) * -1.0021);
  top: calc(var(--R) * -1.0021);
  width: calc(var(--R) * 2.0041);
  height: auto;
  max-width: none;
}

/* Each landmark stands on the rim, straight out from the centre, its foot
 * a little into the ground: placed at the centre, turned to its angle, then
 * moved out by the radius. --h is its height in the sheet it was cut from;
 * the sheet's scale is 2600 px to the radius, which keeps the tallest one
 * at the top of the globe clear of the words above it. */
.lm {
  position: absolute;
  left: 0;
  top: 0;
  height: calc(var(--h) * var(--R) / 2600);
  width: auto;
  max-width: none;
  transform-origin: 50% 100%;
  transform: translate(-50%, -100%) rotate(var(--a)) translateY(calc(var(--R) * -0.988));
}

/* A cloud resting on the rim between landmarks, from the six of the
 * generated cloud sheet: placed at the centre, turned to its angle, moved
 * out to the ground; it bobs a little away from the ground and back. --s
 * varies the size. */
.cl {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform: rotate(var(--a)) translateY(calc(var(--R) * -0.975));
}

.cl img {
  position: absolute;
  left: 0;
  bottom: 0;
  width: calc(var(--R) * 0.2 * var(--s, 1));
  height: auto;
  max-width: none;
  translate: -50% 0;
  animation: puff 7s ease-in-out var(--d, 0s) infinite;
}

@keyframes puff {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(calc(var(--R) * -0.014)); }
}

@media (prefers-color-scheme: dark) {
  .cl img {
    filter: invert(1) hue-rotate(180deg) brightness(0.9);
  }
}

/* The air round it, and the edge of the disc a shade deeper. This does not
 * turn. */
.globe-shade {
  position: absolute;
  left: calc(var(--R) * -1);
  top: calc(var(--R) * -1);
  width: calc(var(--R) * 2);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 80%, rgba(30, 60, 120, 0.1) 100%);
  box-shadow: 0 0 calc(var(--R) * 0.05) calc(var(--R) * 0.012) rgba(150, 196, 255, 0.45);
}

@media (prefers-color-scheme: dark) {
  .globe,
  .lm {
    filter: brightness(0.82);
  }

  .globe-shade {
    background: radial-gradient(circle, transparent 72%, rgba(0, 0, 0, 0.35) 100%);
    box-shadow: 0 0 calc(var(--R) * 0.06) calc(var(--R) * 0.015) rgba(90, 140, 230, 0.35);
  }
}

/* ----------------------------------------------------- books on the wing
 *
 * Round the world, low over the landmarks, as they fly round the globe in
 * the sleep picture: .orbit turns about the centre of the Earth, faster than
 * the Earth does, and each .sat holds a book out past the rim, so it banks
 * with the curve as it goes. Three, a third of a turn apart. */

.orbit {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  animation: spin 130s linear infinite;
  will-change: transform;
}

.sat {
  position: absolute;
  left: 0;
  top: 0;
  transform: rotate(var(--a)) translateY(calc(var(--R) * -1.1));
}

.fly {
  --cover-ink: var(--c, #a3a3a1);
  --fw: clamp(52px, calc(var(--R) * 0.1), 112px);
  position: absolute;
  left: calc(var(--fw) / -2);
  top: calc(var(--fw) * -0.35);
  width: var(--fw);
  aspect-ratio: 3 / 2.1;
  perspective: 620px;
}

.fly-b {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: fly-bob var(--t) ease-in-out var(--d) infinite;
}

@keyframes fly-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(4deg); }
}

.fly-3d {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateZ(var(--rz));
}

/* A page: paper, a pencil edge, lines of text inside a margin, and the
 * page block and the cover showing past its outer edges. */
.fly .hp,
.fly .leaf b {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  padding: 13% 9% 15%;
  border: 1.3px solid var(--pencil);
  background:
    var(--gut, none) padding-box,
    repeating-linear-gradient(
      to bottom,
      transparent 0 5px,
      var(--text-line) 5px 6.4px
    ) content-box,
    linear-gradient(var(--paper), var(--paper)) padding-box;
}

.fly .hp.l {
  --gut: linear-gradient(to left, rgba(0, 0, 0, 0.13), transparent 26%);
  left: 0;
  border-radius: 4px 1px 1px 4px;
  transform-origin: right center;
  transform: rotateY(34deg);
  box-shadow: -2px 3px 0 -1.2px var(--paper), -2px 3px 0 0 var(--pencil-2),
    -4px 6px 0 -1.2px var(--leaves), -4px 6px 0 0 var(--pencil-2),
    -6px 9px 0 -0.6px var(--cover-ink);
}

.fly .hp.r {
  --gut: linear-gradient(to right, rgba(0, 0, 0, 0.13), transparent 26%);
  left: 50%;
  border-radius: 1px 4px 4px 1px;
  transform-origin: left center;
  transform: rotateY(-34deg);
  box-shadow: 2px 3px 0 -1.2px var(--paper), 2px 3px 0 0 var(--pencil-2),
    4px 6px 0 -1.2px var(--leaves), 4px 6px 0 0 var(--pencil-2),
    6px 9px 0 -0.6px var(--cover-ink);
}

.fly .leaf {
  position: absolute;
  left: 50%;
  top: 0;
  width: 50%;
  height: 100%;
  transform-style: preserve-3d;
  transform-origin: left center;
  transform: rotateY(-34deg) translateZ(0.6px);
}

.fly .leaf b {
  left: 0;
  width: 100%;
  border-radius: 1px 4px 4px 1px;
  backface-visibility: hidden;
}

.fly .leaf b + b {
  border-radius: 4px 1px 1px 4px;
  transform: rotateY(180deg);
}

/* Turned: lifted off the right-hand page and laid on the left. The ease is
 * a hand's — a quick lift, a slow fall. */
.fly.turn .leaf {
  animation: leaf 1.25s cubic-bezier(0.38, 0.02, 0.24, 1) 1;
}

@keyframes leaf {
  0% { transform: rotateY(-34deg) translateZ(0.6px); }
  100% { transform: rotateY(-146deg) translateZ(0.6px); }
}

/* --------------------------------------------------------------- the hero */

.hero {
  position: absolute;
  inset: 0;
}

/* One grid, two columns, one height.
 *
 * The Kindle sets the height: about two thirds of the window, unless that
 * would make it wider than its share of the width. The stage is exactly
 * that tall and both columns share its top and bottom: the words start
 * level with the top of the Kindle, and the scene at the foot of the
 * right-hand column ends on the line the Kindle stands on.
 *
 * The right-hand column is as wide as its widest line of words (600px at
 * most), and the pair is centred in the window: given the whole remaining width, the words
 * kept to its left half and left the window's right side empty, the pair
 * sitting to the left. The gap between them (9vw) is a little less than the
 * margins either side, so they read as one group with room to breathe.
 *
 * The Kindle's height is a floor, not the height. It is capped by its share
 * of the width, so in a tall narrow window (a tablet held upright) it is
 * small — and if the stage were exactly that tall, the words beside it
 * would have taken the whole of it and left the vista below them a few
 * pixels to stand a signpost in. So the stage is at least as tall as the
 * Kindle and at least as tall as the right-hand column needs, whichever is
 * more, and grows upward into sky there was plenty of. The Kindle does not
 * grow with it: it keeps its size and its foot on the baseline. */
.stage {
  --dh0: calc(100svh - var(--chrome, 60px) - 22svh);
  --dw: min(36vw, var(--dh0) * 117 / 169);
  --dh: calc(var(--dw) * 169 / 117);
  /* What the signpost asks for: three boards at their smallest, and the
   * 96px of post, mound and head-room around them. Below this it starts
   * crushing itself. Same arithmetic as .signpost's own height. */
  --vista-min: calc(30px * 3 + 96px);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 11svh;
  min-height: var(--dh);
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: var(--dw) fit-content(600px);
  grid-template-rows: auto minmax(var(--vista-min), 1fr);
  grid-template-areas:
    "dev copy"
    "dev vista";
  justify-content: center;
  column-gap: clamp(56px, 9vw, 140px);
}

/* No z-index here: the size container with a stacking order of its own
 * makes Chrome draw the panel black under the veil. The holder and the
 * shadow carry it instead. */
.stand {
  grid-area: dev;
  position: relative;
  container-type: size;
  min-height: 0;
}

/* The pointer tilts it (world.js writes the transform). It does not float:
 * its foot is on the baseline, with everything else. Flat, not
 * preserve-3d: under the veil's backdrop-filter a 3D-composited panel draws
 * black in Chrome. */
.hold {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: end center;
}

.stand .pw3 {
  height: min(100cqh, 100cqw / 117 * 169);
  width: auto;
}

/* Where the Kindle meets the ground. */
.contact {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: -6px;
  width: calc(min(100cqh, 100cqw / 117 * 169) * 117 / 169 * 1.04);
  height: 14px;
  translate: -50% 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.16);
  filter: blur(4px);
}

/* The power button is on the bottom edge. Pressed once, when it wakes. */
.press {
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 9%;
  aspect-ratio: 1;
  margin-left: -4.5%;
  border: 1.5px solid var(--k);
  border-radius: 50%;
  opacity: 0;
  translate: 0 50%;
  pointer-events: none;
}

.press.go {
  animation: press 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) 1;
}

@keyframes press {
  0% { opacity: 0.9; transform: scale(0.3); }
  100% { opacity: 0; transform: scale(2.6); }
}

/* ------------------------------------------------------------ the subtitle
 *
 * On the Kindle's chin, under the panel, where the name would be printed:
 * what it is doing, one line per act, in light ink on the black shell.
 * Always one line: sized from the device's width (--kw), so that the
 * longest (21 characters across 77.6% of the width) fits on any window. */

.caption {
  --kw: min(100cqh * 117 / 169, 100cqw);
  position: absolute;
  z-index: 2;
  left: 11.2%;
  right: 11.2%;
  bottom: 0;
  height: 15.9%;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  pointer-events: none;
}

.lines {
  display: grid;
  width: 100%;
}

.lines p {
  grid-area: 1 / 1;
  margin: 0;
  font-size: calc(var(--kw) * 0.034);
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.9);
  /* One line where it fits, two where it does not: the chin has room for
   * two, and a sentence that runs off the side of the machine does not. */
  text-wrap: balance;
  opacity: 0;
  translate: 0 4px;
  transition: opacity 0.35s ease, translate 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.lines p.on {
  opacity: 1;
  translate: 0 0;
  transition-delay: 0.18s;
}

/* --------------------------------------------------------------- the words
 *
 * As the product pages that do this well lay it out: a label, a headline
 * in two lines, a paragraph that says what it is, the two things to do, and
 * three short facts. */

.copy {
  grid-area: copy;
  position: relative;
  z-index: 5;
  display: grid;
  justify-items: start;
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 clamp(16px, 2.6svh, 26px);
  padding: 5px 12px 6px;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--g2);
  background: var(--w);
  border: var(--hair) solid var(--g4);
  border-radius: 999px;
}

/* The top of the capitals, not the top of the line box, is what has to sit
 * level with the top of the Kindle; the label above takes that place now. */
.copy h1 {
  margin: 0;
  font-size: clamp(36px, 4.8vw, 68px);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

/* The headline in its own clip, so it can rise into place. */
.copy h1 .ln {
  display: block;
  overflow: clip;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.copy h1 .ln > span {
  display: inline-block;
}

.lede {
  margin: clamp(14px, 2.4svh, 22px) 0 0;
  max-width: 34em;
  font-size: clamp(15px, 1.2vw, 17.5px);
  line-height: 1.7;
  color: var(--g2);
  text-wrap: pretty;
}

html[data-lang="en"] .lede {
  max-width: 31em;
}

.cta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: clamp(20px, 3.4svh, 32px);
}

/* The unicorn's place at the end of the story: hung off the right end of
 * the star button, with no width of its own, so it follows that button
 * wherever the row puts it — including onto a second line, which is where
 * a sibling of the button would have been stranded. It is laid out from
 * the start, because world.js measures it to know where to bring the
 * unicorn, and only shown once the star is in the button. */
.starbtn {
  position: relative;
}

.waiter {
  position: absolute;
  left: 100%;
  /* As tall as the button, so the figure can be placed against its
   * baseline or its top edge with a percentage. */
  top: 0;
  bottom: 0;
  width: 0;
  pointer-events: none;
}

.waiter img {
  position: absolute;
  left: 10px;
  bottom: -4px;
  /* A fixed size, not one that grows with the window: it stands in the
   * gap between the paragraph above the buttons and the three facts
   * below them, and that gap does not grow. Taller than about 75 px and
   * its horn reaches into the paragraph. */
  width: 72px;
  height: auto;
  max-width: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: float-rest 5.2s ease-in-out infinite;
}

.cta.waiting .waiter img {
  visibility: visible;
  opacity: 1;
}

/* A narrow window: the column reaches the edge and the full-sized figure
 * would be clipped, so it is smaller and tucked in — still beside the
 * button, because standing on top of it would reach the line above. */
@media (max-width: 1000px) {
  .waiter img {
    left: 6px;
    width: 60px;
  }
}

/* A phone: the two buttons take the whole line, so there is no beside at
 * all. It perches on the right end of the button, over the star it has
 * just put there, clear of the label. */
@media (max-width: 760px) {
  .waiter {
    left: auto;
    right: 0;
  }

  .waiter img {
    left: auto;
    right: -6px;
    bottom: calc(100% - 8px);
    width: 72px;
  }
}

/* Beside the filled download button, this one must not invert: two black
 * buttons side by side, and the one you are pointing at is the one that
 * looks like the other. It thickens its own stroke instead, and the star
 * grows a little — the emphasis is the outline, not the ground. */
.cta .starbtn:hover,
.cta .starbtn:focus-visible {
  background: var(--w);
  color: var(--k);
  box-shadow: inset 0 0 0 var(--rule) var(--k);
}

/* #spark is a solid shape, not a line drawing: the sparkle the unicorn
 * carries, the same path. Drawn with .ico's hairline it all but disappears
 * — a 2-unit stroke in a 492-unit viewBox is 0.06 px at this size — so here
 * it is filled, like every other star on the page. Ink now, gold once the
 * star is in it; the colour is part of the lighting, so it fades. */
.cta .starbtn .ico {
  fill: currentColor;
  stroke: none;
  transition: scale 0.12s steps(2, end), fill 0.45s ease, stroke 0.45s ease;
}

.cta .starbtn:hover .ico,
.cta .starbtn:focus-visible .ico {
  scale: 1.12;
}

.world.lit .starbtn .ico {
  animation: star-in 0.9s cubic-bezier(0.2, 1.6, 0.4, 1) 1;
}

@keyframes star-in {
  0% { transform: scale(0.4) rotate(-90deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Four, two by two. */
/* Three of them, one line: short enough to be read in a glance, in the
 * order the demo shows them. They wrap only where the column cannot hold
 * them. */
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 22px;
  margin: clamp(14px, 2.2svh, 20px) 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--g3);
}

.facts li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.facts li::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

/* -------------------------------------------------------------- the vista
 *
 * The bottom of the right-hand column. A size container: the signpost and
 * the star are sized from it, so they always fit between the words and the
 * baseline. --sx, --sy: where the star is; --hw: how wide the unicorn is
 * once it holds it. */

.vista {
  grid-area: vista;
  position: relative;
  container-type: size;
  min-height: 0;
  --hw: min(24cqw, 66cqh);
  --sx: 80cqw;
  --sy: 20cqh;
}

/* ---------------------------------------------------------- the signpost
 *
 * The ways on, as a signpost planted in the Earth: one board each. The
 * boards are black on white, the page's own two colours — the words are
 * what matters, and against the landmarks and the globe white is the one
 * thing nothing else in the world is. The post is metal. Pointed at, a
 * board turns over (white on black, the way the panel marks a thing
 * chosen), slides out the way it points, and swings round level on its
 * nail. */

.signpost {
  --bh: clamp(30px, 15cqh, 38px);
  position: absolute;
  z-index: 5;
  left: clamp(4px, 2cqw, 20px);
  bottom: 0;
  width: 220px;
  height: min(100%, calc(var(--bh) * 3 + 96px));
}

.post {
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 4px;
  width: 10px;
  background: linear-gradient(90deg, #e1e4e8, #a3a9b1);
  border: var(--rule) solid var(--k);
  border-radius: 4px 4px 2px 2px;
}

/* A little mound of earth where it goes in. (Not .foot: that is the
 * page footer in ink.css.) */
.mound {
  position: absolute;
  left: 2px;
  bottom: 0;
  width: 42px;
  height: 12px;
  border-radius: 50% 50% 0 0;
  background: #8fbf6a;
  border: var(--rule) solid var(--k);
  border-bottom: 0;
}

.board {
  position: absolute;
  left: 12px;
  top: calc(16px + var(--i) * (var(--bh) + 10px));
  height: var(--bh);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 calc(var(--bh) * 0.62) 0 16px;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--sign-ink);
  text-decoration: none;
  transform-origin: 9px 50%;
  rotate: var(--tilt);
  outline: none;
  transition:
    rotate 0.6s cubic-bezier(0.3, 1.5, 0.5, 1),
    translate 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  /* The sign's two colours, swapped when it is pointed at. They are the
   * board's own, not the page's (--k turns pale in the dark), because the
   * signpost is part of the drawing. */
  --sign: #ffffff;
  --sign-ink: #16161a;
  --sign-edge: #16161a;
}

/* The plate: a dark arrow, and the sign's colour 2px inside it. */
.board::before,
.board::after {
  content: "";
  position: absolute;
  z-index: -1;
  clip-path: polygon(0 0, calc(100% - var(--bh) * 0.42) 0, 100% 50%, calc(100% - var(--bh) * 0.42) 100%, 0 100%);
}

.board::before {
  inset: 0;
  background: var(--sign-edge);
}

/* With its nail, on the plate itself (not on the label, which is two, one
 * hidden per language). */
.board::after {
  inset: 2px 3px 2px 2px;
  background:
    radial-gradient(circle at 6.5px 50%, var(--sign-ink) 0 2.5px, transparent 3px),
    var(--sign);
}

.board .ver {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--sign-ink);
  opacity: 0.75;
}

/* Pointed at: turned over, out along its arrow, level. */
.board:hover,
.board:focus-visible {
  --sign: #16161a;
  --sign-ink: #ffffff;
  --sign-edge: #16161a;
  rotate: 0deg;
  translate: 8px 0;
}

@media (prefers-color-scheme: dark) {
  /* Night: the board is still a white sign, dimmed with the rest of the
   * drawing rather than glaring out of the dark. */
  .board {
    --sign: #e7e5df;
  }

  /* Turned over at night the board would be black on a black sky, so the
   * line around it is the light one. */
  .board:hover,
  .board:focus-visible {
    --sign: #16161a;
    --sign-ink: #e7e5df;
    --sign-edge: #e7e5df;
  }
}

.board.swing {
  animation: swing 0.9s cubic-bezier(0.3, 0.7, 0.4, 1) 1;
}

@keyframes swing {
  0% { rotate: var(--tilt); }
  25% { rotate: -7deg; }
  50% { rotate: 4deg; }
  72% { rotate: -2deg; }
  100% { rotate: 0deg; }
}

/* ------------------------------------------------- the star, the unicorn
 *
 * .halo is the box the unicorn fills once it holds the star, placed so that
 * the star in that drawing is at (--sx, --sy). Before then only the gold
 * star in it shows, and only the star can be pressed: it calls the unicorn
 * now. After, the whole figure is the link to star the project, with a line
 * under it saying so. In the hug drawing (602 x 868) the star is centred at
 * 78.3% across, 49.1% down, and is 40% of the width across. */

.halo {
  position: absolute;
  z-index: 10;
  left: calc(var(--sx) - 0.783 * var(--hw));
  top: calc(var(--sy) - 0.491 * var(--hw) * 1.442);
  width: var(--hw);
  aspect-ratio: 602 / 868;
  color: var(--k);
  text-decoration: none;
  pointer-events: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.halo-pad {
  position: absolute;
  inset: 0;
  animation: float 5.2s ease-in-out infinite;
}

/* Given away: the star has been pushed into the button in the words, so
 * there is nothing left here — the vista is the signpost and the Earth
 * again, and the link to star the project is the button. */
.halo.given {
  display: none;
}

@keyframes float-rest {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

/* A warm glow behind the star, breathing. */
.halo-pad::before {
  content: "";
  position: absolute;
  left: 78.3%;
  top: 49.1%;
  width: 92%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 94, 0.55), rgba(255, 214, 94, 0) 62%);
  animation: glow 3.2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { opacity: 0.55; scale: 0.9; }
  50% { opacity: 1; scale: 1.08; }
}

.goldstar {
  position: absolute;
  height: auto;
  max-width: none;
  pointer-events: auto;
  cursor: pointer;
}

/* The star (204 x 229), where it hangs over the Earth. */
.goldstar {
  left: 58.3%;
  top: 33.5%;
  width: 40%;
  animation: twinkle 3.4s ease-in-out infinite;
}

.halo:hover .goldstar,
.halo:focus-visible .goldstar {
  animation-duration: 1.2s;
}

/* Before it is caught, pointing at the star says what pressing it does.
 * After, the button in the words says where it goes. */
.halo-label {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  pointer-events: none;
  font-size: 13.5px;
  line-height: 1.3;
  white-space: nowrap;
}

.halo-label .ask {
  position: absolute;
  left: 78.3%;
  top: calc(49.1% + 0.25 * var(--hw) + 10px);
  padding: 6px 12px 7px;
  background: var(--w);
  border: var(--rule) solid var(--k);
  translate: -50% 4px;
  opacity: 0;
  transition: opacity 0.25s ease, translate 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.halo:hover .ask,
.halo:focus-visible .ask {
  opacity: 1;
  translate: -50% 0;
}

.halo:focus-visible .goldstar {
  outline: var(--rule) solid var(--k);
  outline-offset: 4px;
}

@media (prefers-color-scheme: dark) {
  .goldstar {
    filter: brightness(0.92);
  }
}

/* The unicorn on its way out of the Kindle. .jb is a point that world.js
 * moves (translate, rotate, scale — compositor only); every pose is drawn
 * at its own size centred on that point, and faded in and out on the same
 * clock. */
.jumper {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.jb {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  will-change: transform;
}

.jb .pose {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  height: auto;
  translate: -50% -50%;
  opacity: 0;
}

/* A soft light it sits up in. */
.jglow {
  position: absolute;
  left: -520px;
  top: -520px;
  width: 1040px;
  height: 1040px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0, rgba(255, 255, 255, 0.5) 30%, rgba(255, 255, 255, 0) 62%);
  opacity: 0;
}

/* The star, caught: a ring going out and sparks thrown off. */
.burst {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.burst .ring {
  position: absolute;
  width: 200px;
  height: 200px;
  margin: -100px 0 0 -100px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow: 0 0 24px rgba(255, 214, 94, 0.6);
  opacity: 0;
}

.burst svg {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  overflow: visible;
  fill: var(--gold);
  stroke: var(--gold-line);
  stroke-width: 30;
  stroke-linejoin: round;
}

/* The phone's star, over the Kindle. Like .jb, a point world.js moves; the
 * drawing is centred on it at the width world.js gives it, in a warm glow,
 * twinkling while it waits. */
.mstar {
  position: absolute;
  z-index: 10;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  will-change: transform;
}

.mstar img {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  height: auto;
  translate: -50% -50%;
  animation: twinkle 3.4s ease-in-out infinite;
}

.mglow {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--gw, 160px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 94, 0.55), rgba(255, 214, 94, 0) 62%);
  animation: glow 3.2s ease-in-out infinite;
}

/* The star button, when the star has landed in it: it takes the colour the
 * star was carrying, and keeps it. The edge is in user units, like .burst —
 * about a pixel once the symbol is scaled into this 1.05em box.
 *
 * Declared after the lit world's own pop, with the same weight, so that the
 * world lighting a moment later does not play the animation again. */
.world .starbtn.got .ico {
  fill: var(--gold);
  stroke: var(--gold-line);
  stroke-width: 34;
  stroke-linejoin: round;
  animation: star-land 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) 1;
}

/* Pointing at it must not take the gold back off (.starbtn:hover sets
 * color, and the star is no longer currentColor once it is gold). */
.world .starbtn.got:hover .ico,
.world .starbtn.got:focus-visible .ico {
  fill: var(--gold);
}

@keyframes star-land {
  0% { transform: scale(1.9) rotate(-40deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* While the unicorn is coming for it, the star holds still. Once it is
 * held, the figure floats again from there. */
.halo.busy .halo-pad {
  animation-play-state: paused;
}

/* -------------------------------------------------------------- the veil
 *
 * Over the whole world: everything under it in grey, and a little dimmer,
 * as the panel would show it. The star is above it. When the star is caught
 * a hole opens in it, centred on the star (--vx, --vy): --r is its radius,
 * --soft how soft its edge is, so the colour comes in as a wash. */

.veil {
  --vx: 80%;
  --vy: 55%;
  --hole: 0px;
  --r: 0px;
  --soft: 0px;
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  -webkit-backdrop-filter: grayscale(1) brightness(0.965);
  backdrop-filter: grayscale(1) brightness(0.965);
  -webkit-mask-image: radial-gradient(
    circle at var(--vx) var(--vy),
    transparent calc(var(--hole) + var(--r)),
    #000 calc(var(--hole) + var(--r) + var(--soft))
  );
  mask-image: radial-gradient(
    circle at var(--vx) var(--vy),
    transparent calc(var(--hole) + var(--r)),
    #000 calc(var(--hole) + var(--r) + var(--soft))
  );
}

/* Lit: there is nothing left for it to do. */
.world.lit .veil {
  display: none;
}

/* ------------------------------------------------- the edges of the page
 *
 * All three sit on an edge of a `viewport-fit=cover` page, so each one adds
 * the inset it is nearest: on a phone with a home indicator the bottom row
 * would otherwise be under it, and in landscape the left and right would be
 * under the notch. --bot is that bottom, named once. */

:root {
  --bot: calc(clamp(8px, 1.6svh, 16px) + env(safe-area-inset-bottom, 0px));
}

.smallprint {
  position: absolute;
  z-index: 7;
  right: max(var(--gutter), env(safe-area-inset-right, 0px));
  bottom: var(--bot);
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--g3);
  max-width: 46em;
  text-align: right;
}

.smallprint a {
  color: var(--g2);
  margin-left: 6px;
}

.playpause {
  position: absolute;
  z-index: 7;
  left: max(var(--gutter), env(safe-area-inset-left, 0px));
  bottom: var(--bot);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--w);
  border: var(--hair) solid var(--g4);
  color: var(--g3);
  cursor: pointer;
}

.playpause:hover {
  border-color: var(--k);
  color: var(--k);
}

.playpause svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
  stroke: none;
}

.playpause .i-play,
.playpause[aria-pressed="true"] .i-pause {
  display: none;
}

.playpause[aria-pressed="true"] .i-play {
  display: block;
}

/* The two ends of the story, in one place at the foot of the window:
 * "play it again" once the world is lit, and "skip to the end" while it is
 * still running on a layout where the gold star — the other way there — is
 * not on the page. They are each other's opposite and are never both up,
 * so they are one button in two states and share everything but their
 * arrow. One rule, so the pair cannot drift apart: the first time they
 * were written separately, .skipend was given a display and lost the
 * [hidden] guard with it, and stood there through the whole story on every
 * screen. */
.replay,
.skipend {
  position: absolute;
  z-index: 7;
  left: calc(max(var(--gutter), env(safe-area-inset-left, 0px)) + 38px);
  bottom: var(--bot);
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px 0 9px;
  background: var(--w);
  border: var(--hair) solid var(--g4);
  color: var(--g2);
  font-size: 12.5px;
  cursor: pointer;
}

.replay:hover,
.replay:focus-visible,
.skipend:hover,
.skipend:focus-visible {
  border-color: var(--k);
  color: var(--k);
}

.replay svg,
.skipend svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The display above beats the browser's own [hidden] rule, so the pair
 * take it back themselves. Both of them are hidden most of the time. */
.replay[hidden],
.skipend[hidden] {
  display: none;
}

.replay:not([hidden]),
.skipend:not([hidden]) {
  animation: ink 0.4s steps(4, jump-none) 1 backwards;
}

/* ---------------------------------------------------------- the bar's tools
 *
 * The sound switch and the language. On a wide screen they are simply on
 * the bar, and the rest of .tools (the ways on, the small print) is not
 * shown: the signpost and the foot of the window have those. On a phone
 * .tools is a drawer under .menu-btn (the phone section). It is a popover,
 * so here the browser's popover box is undone. */
.menu-btn,
.ways,
.tools-note {
  display: none;
}

.tools {
  position: static;
  inset: auto;
  display: flex;
  align-items: center;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  overflow: visible;
}

.tools-row {
  display: flex;
  align-items: center;
}

/* ----------------------------------------------------- sound, in the bar */

/* An icon, the same weight as the language beside it: four bars rising to
 * the middle and falling again — a level meter, which is what sound looks
 * like, and not the chart that bars climbing left to right look like. Off:
 * grey, still, and struck through. On: ink, the slash wiped away, and the
 * bars moving with what you hear (sound.js drives them from the analyser,
 * never lower than a smaller copy of the still pattern, so they never sink
 * to four dots). The word is only shown in the phone's drawer. */
.snd {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  min-width: 32px;
  justify-content: center;
  margin-right: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--g3);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.snd:hover,
.snd:focus-visible,
.snd[aria-pressed="true"] {
  color: var(--k);
}

.snd-l {
  display: none;
}

.eq {
  /* The ground the slash is cut out of, so it reads over the bars. It must
   * be whatever is actually behind the button: on the home page the bar is
   * transparent (.home .topbar), so that is the sky — not --page, which is
   * what ink.css paints the bar elsewhere. In the phone drawer it is
   * overridden to --paper. */
  --surface: var(--sky);
  position: relative;
  display: flex;
  /* A sound is drawn about a line, not standing on the floor: the bars grow
   * up and down from the middle, which is what makes it read as a waveform
   * and not as a chart. (2026-10-28; they stood on a baseline before.) */
  align-items: center;
  gap: 2.5px;
  height: 16px;
}

.eq i {
  display: block;
  width: 3px;
  /* Fully round caps, so each bar is a stroke rather than a column. */
  border-radius: 999px;
  background: currentColor;
  transition: height 0.12s ease;
}

/* Five, short at both ends and tallest in the middle, symmetrical: the
 * shape a sound is drawn as. */
.eq i:nth-child(1) { height: 4px; }
.eq i:nth-child(2) { height: 10px; }
.eq i:nth-child(3) { height: 16px; }
.eq i:nth-child(4) { height: 10px; }
.eq i:nth-child(5) { height: 4px; }

/* Struck through while it is off: the line itself, and a thicker one of the
 * page's own colour under it, so the bars are cut rather than crossed. */
.eq::before,
.eq::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 1px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  rotate: 34deg;
  transform-origin: 0 50%;
  scale: 1 1;
  transition: scale 0.18s ease, opacity 0.18s ease;
}

.eq::before {
  height: 5px;
  margin-top: -1.5px;
  background: var(--surface);
}

.snd[aria-pressed="true"] .eq::before,
.snd[aria-pressed="true"] .eq::after {
  scale: 0 1;
  opacity: 0;
}

/* Once, after the world has drawn itself: the bars run up and down once,
 * left to right, to say what they are. Nothing plays until pressed. */
.snd.hint {
  animation: hint-ink 1.6s ease-in-out 1;
}

.snd.hint .eq i {
  transform-origin: 50% 50%;
  animation: hint-bar 0.8s ease-in-out 2;
}

.snd.hint .eq i:nth-child(2) { animation-delay: 0.08s; }
.snd.hint .eq i:nth-child(3) { animation-delay: 0.16s; }
.snd.hint .eq i:nth-child(4) { animation-delay: 0.24s; }
.snd.hint .eq i:nth-child(5) { animation-delay: 0.32s; }

@keyframes hint-ink {
  20%, 80% { color: var(--k); }
}

@keyframes hint-bar {
  50% { transform: scaleY(0.4); }
}

/* The drawer's button on a phone says it is there the same way it used
 * to be said here. */
@keyframes hint-snd {
  50% { border-color: var(--k); color: var(--k); box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06); }
}


/* -------------------------------------------- the window clearing (GC16) */

.gc16 {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  visibility: hidden;
  background: #000;
}

.gc16.go {
  animation: gc16 0.34s linear 1;
}

/* Black, white, then the content — and the content arrives a beat late,
 * the way a waveform finishes. */
@keyframes gc16 {
  0%, 34% { visibility: visible; background: #000; opacity: 1; }
  35%, 70% { visibility: visible; background: var(--sky); opacity: 1; }
  100% { visibility: visible; background: var(--sky); opacity: 0; }
}

/* ------------------------------------------------------------- the intro
 *
 * Every load: the sky comes up star by star, the Earth rises with the
 * cloud, the Kindle rises in front of it, asleep. Then the words, a line at
 * a time, the button, the signpost growing out of the ground, the star —
 * and then the Kindle is woken. All of it eased, none of it in steps: the
 * steps belong to the panel, inside the Kindle. --k scales every delay.
 *
 * What rises is the Kindle's holder and its shadow, not .stand: an
 * animated transform there would give .stand a stacking context and put
 * the Kindle behind the Earth. */

.world[data-intro] { --k: 1; }

@keyframes ink {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes up-in {
  from { opacity: 0; translate: 0 18px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes pop-in {
  0% { opacity: 0; scale: 0.3; }
  60% { opacity: 1; scale: 1.15; }
  100% { opacity: 1; scale: 1; }
}

@keyframes rise {
  from { translate: 0 40svh; }
}

@keyframes surface {
  from { opacity: 0; translate: 0 60px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes line-in {
  from { transform: translateY(108%); }
  to { transform: translateY(0); }
}

@keyframes plant {
  0% { scale: 1 0; }
  70% { scale: 1 1.05; }
  100% { scale: 1 1; }
}

.world[data-intro] .spk,
.world[data-intro] .dot {
  animation: pop-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1 backwards;
  animation-delay: calc(var(--k) * (0.2s + var(--ph, 3) * 0.07s + var(--y) * 0.006s));
}

.world[data-intro] .moon,
.world[data-intro] .planet {
  animation: up-in 1.2s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--k) * 0.3s) 1 backwards;
}

.world[data-intro] .d-earth > .earth {
  animation: rise 2.4s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--k) * 0.1s) 1 backwards;
}

.world[data-intro] .hold,
.world[data-intro] .contact {
  animation: surface 1.6s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--k) * 0.55s) 1 backwards;
}

.world[data-intro] .eyebrow {
  animation: up-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--k) * 0.9s) 1 backwards;
}

/* Until world.js has cut it into lines, the headline waits. */
.world[data-intro] .copy h1:not(.split) {
  visibility: hidden;
}

.world[data-intro] .copy h1 .ln > span {
  animation: line-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) 1 backwards;
  animation-delay: calc(var(--k) * 1s + var(--n) * 0.12s);
}

.world[data-intro] .lede {
  animation: up-in 1s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--k) * 1.35s) 1 backwards;
}

.world[data-intro] .cta {
  animation: up-in 1s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--k) * 1.5s) 1 backwards;
}

.world[data-intro] .facts {
  animation: up-in 1s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--k) * 1.65s) 1 backwards;
}

.world[data-intro] .post,
.world[data-intro] .mound {
  transform-origin: 50% 100%;
  animation: plant 0.8s cubic-bezier(0.3, 1.4, 0.5, 1) calc(var(--k) * 1.5s) 1 backwards;
}

.world[data-intro] .board {
  animation: up-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1 backwards;
  animation-delay: calc(var(--k) * (1.75s + var(--i) * 0.1s));
}

.world[data-intro] .halo {
  animation: pop-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--k) * 2s) 1 backwards;
}

.world[data-intro] .caption {
  animation: ink 0.8s ease calc(var(--k) * 1.6s) 1 backwards;
}

.world[data-intro] .snd,
.world[data-intro] .playpause,
.world[data-intro] .replay,
.world[data-intro] .skipend,
.world[data-intro] .smallprint {
  animation: ink 0.8s ease calc(var(--k) * 2.2s) 1 backwards;
}

/* ------------------------------------------------------------ the dialog */

.pick {
  width: min(760px, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100svh - 40px);
  padding: 0;
  border: var(--rule) solid var(--k);
  background: var(--w);
  color: var(--k);
  overflow: auto;
}

.pick::backdrop {
  background: rgba(0, 0, 0, 0.18);
}

@media (prefers-color-scheme: dark) {
  .pick::backdrop {
    background: rgba(0, 0, 0, 0.6);
  }
}

.pick-in {
  position: relative;
  padding: clamp(24px, 4vw, 40px);
}

/* Opening is a refresh: the panel clears, then draws. */
.pick[open] .pick-in {
  animation: pick-clear 0.34s linear 1;
}

@keyframes pick-clear {
  0%, 34% { background: var(--k); color: var(--k); }
  35%, 70% { background: var(--w); color: var(--w); }
  100% { background: var(--w); color: var(--k); }
}

/* One sheet to another is a different thing from opening one.
 *
 * The page already has a grammar for this, the one the device's screen
 * uses (README, "the six transitions"): a whole new screen is a clear, and
 * a step forward inside the same thing is a push. Going from the download
 * sheet to the guide is the second — it is the same panel, with another
 * sheet on it — but it was drawn as the first, so the old one vanished and
 * the new one flashed black and redrew. That is the jolt.
 *
 * So: the one leaving slides out and fades, the one arriving slides in
 * from the right, and neither clears. The backdrop belongs to the arriving
 * sheet alone, or the two would stack and the page behind would darken
 * for the length of the swap.
 *
 * The two are the same size and in the same place, so any moment where
 * both are half-transparent is one page of words read through another.
 * The timing keeps that window short rather than pretty: the one leaving
 * goes quickly and early (ease-in, 220ms), the one arriving waits 90ms
 * before it starts to show. In between there is a beat of the dimmed page,
 * which is what one sheet leaving and another arriving actually looks
 * like. */
.pick.swap-in {
  animation: sheet-in 0.34s cubic-bezier(0.25, 0.6, 0.25, 1) 0.09s 1 backwards;
}

/* Arriving this way, it does not repaint: the push is the whole change. */
.pick.swap-in .pick-in {
  animation: none;
}

.pick.swap-out {
  animation: sheet-out 0.22s cubic-bezier(0.4, 0, 1, 1) 1 forwards;
  pointer-events: none;
}

.pick.swap-out::backdrop {
  background: transparent;
}

@keyframes sheet-in {
  from { opacity: 0; translate: 6% 0; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes sheet-out {
  from { opacity: 1; translate: 0 0; }
  60% { opacity: 0.12; }
  to { opacity: 0; translate: -3% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pick.swap-in,
  .pick.swap-out {
    animation: none;
  }
}

.pick h2 {
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.03em;
  margin: 0 0 clamp(20px, 3vw, 30px);
}

/* The guide and the changelog are the same panel, wider: they hold what
 * used to be two pages of their own, laid out by page.css. The close
 * button stays put while the sheet scrolls under it. */
.sheet {
  width: min(1000px, calc(100vw - 2 * var(--gutter)));
}

.sheet .pick-in {
  padding: clamp(18px, 3vw, 34px) 0 clamp(28px, 5vw, 56px);
}

/* Inside a sheet the page's own top offset is wrong — there is no bar
 * above it, only the panel's own edge. */
.sheet section[id] {
  scroll-margin-top: 8px;
}

.sheet .pagehead {
  padding-top: 8px;
}

.sheet .pick-x {
  position: sticky;
  float: right;
  top: 10px;
  right: 10px;
  z-index: 5;
  background: var(--w);
  border-radius: 50%;
}

.pick-x {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--k);
  cursor: pointer;
}

.pick-x svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Which Kindle: a list, because the answer is one of twelve and only three
 * of them lead anywhere. The one chosen is drawn to scale beside what can
 * be done with it. */
.choose {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: clamp(18px, 3vw, 26px);
}

.choose-l {
  font-size: 13.5px;
  color: var(--g2);
}

/* The box and its arrow are the page's, not the system's. */
.choose-w {
  position: relative;
  flex: 1 1 18em;
  min-width: 0;
  max-width: 28em;
  display: block;
}

.choose-w::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 17px;
  width: 8px;
  height: 8px;
  border: solid var(--k);
  border-width: 0 var(--rule) var(--rule) 0;
  rotate: 45deg;
  pointer-events: none;
}

.choose-s {
  width: 100%;
  height: 42px;
  padding: 0 38px 0 12px;
  border: var(--rule) solid var(--k);
  border-radius: 0;
  background: var(--w);
  color: var(--k);
  font: inherit;
  font-size: 15px;
  appearance: none;
  cursor: pointer;
}

.choose-s:focus-visible {
  outline: var(--rule) solid var(--k);
  outline-offset: 2px;
}

.choose-s option:disabled {
  color: var(--g3);
}

/* Only the chosen one is shown; world.js puts its value on the dialog. What
 * can be said about the machine, and the files under it. */
.offer {
  display: none;
}

.pick[data-model="pw3"] .offer[data-for="pw3"],
.pick[data-model="voyage"] .offer[data-for="voyage"],
.pick[data-model="oasis1"] .offer[data-for="oasis1"] {
  display: block;
}

.offer-say {
  min-width: 0;
}

.offer-say p {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--g1, var(--g2));
}

.offer-h {
  font-size: 17px !important;
  font-weight: 650;
  color: var(--k) !important;
}

.offer-files {
  font-family: var(--mono);
  font-size: 12px !important;
  color: var(--g3) !important;
}

.offer-go {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 14px !important;
}

.offer-guide {
  color: var(--k);
  font-size: 14px;
}

.offer-note {
  color: var(--g3) !important;
  font-size: 13px !important;
}

/* ------------------------------------------------------- the files
 *
 * The download list: what the file is called, what it is for, how big,
 * which version, when it was built, and the button. One row each, under
 * the machine they belong to. */

.files {
  grid-column: 1 / -1;
  list-style: none;
  margin: clamp(18px, 3vw, 26px) 0 0;
  padding: 0;
  border-top: var(--hair) solid var(--g4);
}

.files li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px clamp(14px, 2.4vw, 24px);
  padding: 16px 0;
  border-bottom: var(--hair) solid var(--g4);
}

.f-name {
  grid-column: 1;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.f-what {
  grid-column: 1;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--g2);
}

.f-what code {
  font-family: var(--mono);
  font-size: 0.92em;
}

.f-meta {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--g3);
}

/* The button sits against the top of its row, level with the file name. */
.f-get {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: start;
  white-space: nowrap;
  padding: 9px 16px;
  font-size: 14px;
}

/* ------------------------------------------------------ the ways out
 *
 * Everything that is not a file: a page of this site, or a link out. */

.ways-out {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: clamp(16px, 2.6vw, 22px);
  font-size: 13.5px;
}

.ways-out a {
  color: var(--k);
}

.ways-out a[target="_blank"]::after {
  content: " ↗";
  color: var(--g3);
}

/* ------------------------------------------- the install guide, in three
 *
 * Preparation, the install itself, and everything else. The install offers
 * two ways to the same end — an assistant walking the reader through it, or
 * the five steps — so each is a block of its own with its own heading, kept
 * apart by a rule rather than by a box. */

.way + .way {
  margin-top: clamp(26px, 4vw, 40px);
  padding-top: clamp(20px, 3vw, 28px);
  border-top: var(--rule) solid var(--k);
}

.way > h3 {
  margin: 0 0 12px;
  font-size: clamp(17px, 1.5vw, 19px);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.way > p {
  margin: 0 0 14px;
  max-width: 34em;
  color: var(--g1, var(--g2));
}

/* Everything that is not the install: one question a line, opened only by
 * the reader who has that question. */
.qa > details {
  border-top: var(--hair) solid var(--g4);
}

.qa > details:last-of-type {
  border-bottom: var(--hair) solid var(--g4);
}

.qa > details > summary {
  padding: 14px 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--k);
}

.qa > details > summary::marker {
  color: var(--g3);
}

.qa > details[open] > summary {
  padding-bottom: 6px;
}

.qa-in {
  padding: 0 0 18px;
  max-width: 44em;
}

.qa-in > p {
  margin: 0 0 10px;
  color: var(--g1, var(--g2));
}

.qa-in > p:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------- the prompt
 *
 * Folded away until asked for: the whole install, written as one prompt. */

.ai {
  margin-top: clamp(16px, 2.6vw, 22px);
  border-top: var(--hair) solid var(--g4);
  padding-top: 14px;
}

.ai > summary {
  font-size: 13.5px;
  cursor: pointer;
  color: var(--k);
}

.ai > summary::marker {
  color: var(--g3);
}

.ai-in p {
  margin: 12px 0 10px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--g2);
}

.ai-text {
  margin: 0;
  max-height: 16em;
  overflow: auto;
  padding: 14px 16px;
  border: var(--hair) solid var(--g4);
  background: var(--sunk);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ai-text b {
  font-weight: 600;
}

.ai-go {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ai-copy {
  padding: 8px 16px;
  font-size: 13.5px;
}

.ai-done {
  font-size: 13px;
  color: var(--g3);
}

/* Narrow: each file's button drops under its own row rather than squeezing
 * it. */
@media (max-width: 560px) {
  .files li {
    grid-template-columns: minmax(0, 1fr);
  }

  .f-get {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 10px;
  }
}

.pick .more {
  margin: clamp(18px, 3vw, 26px) 0 0;
  padding-top: 16px;
  border-top: var(--hair) solid var(--g4);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--g2);
}

.pick .more a {
  display: inline-block;
  margin-top: 6px;
  color: var(--k);
}

.pick .more a::after {
  content: " ↗";
  color: var(--g3);
}

/* ------------------------------------------------- the two reading dialogs
 *
 * The install guide and the changelog, opened from the signpost over the
 * page rather than on pages of their own. Same panel as the download
 * dialog; set for reading: a measure of about 34 em, numbered steps, a
 * folded table of error codes, a timeline. */

.pick.doc {
  width: min(720px, calc(100vw - 2 * var(--gutter)));
}

.doc h2 {
  margin-bottom: 10px;
}

.doc h3 {
  margin: 28px 0 12px;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.doc-lede {
  margin: 0;
  max-width: 34em;
  font-size: 15px;
  line-height: 1.7;
  color: var(--g2);
}

.need {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 14.5px;
  line-height: 1.55;
}

.need li {
  position: relative;
  padding-left: 18px;
}

.need li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--k);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 14px;
}

.steps li {
  counter-increment: step;
  position: relative;
  display: grid;
  gap: 3px;
  padding-left: 44px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--g2);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: var(--rule) solid var(--k);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--k);
}

.steps b {
  font-size: 15.5px;
  color: var(--k);
}

.tips {
  margin: 0;
  display: grid;
  gap: 10px;
}

.tips > div {
  display: grid;
  grid-template-columns: 6.5em 1fr;
  gap: 4px 16px;
  font-size: 14.5px;
  line-height: 1.6;
}

.tips dt {
  font-weight: 600;
}

.tips dd {
  margin: 0;
  color: var(--g2);
}

.codes {
  margin-top: 26px;
  border-top: var(--hair) solid var(--g4);
  padding-top: 14px;
}

.codes summary {
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
}

.codes-in {
  margin-top: 12px;
  overflow-x: auto;
}

.codes table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.5;
}

.codes th,
.codes td {
  padding: 7px 10px 7px 0;
  border-bottom: var(--hair) solid var(--g4);
  text-align: left;
  vertical-align: top;
}

.codes tbody th {
  font-family: var(--mono);
  font-weight: 600;
  white-space: nowrap;
}

.codes td:last-child {
  color: var(--g2);
}

.doc-foot {
  margin-top: 26px;
  display: flex;
  justify-content: flex-end;
}

/* The changelog as a line down the left with a dot per build. */
.timeline {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.timeline > li {
  position: relative;
  padding: 0 0 20px 26px;
  border-left: var(--hair) solid var(--g4);
  margin-left: 5px;
}

.timeline > li:last-child {
  border-left-color: transparent;
}

.timeline > li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--w);
  border: var(--rule) solid var(--k);
}

.timeline > li:first-child::before {
  background: var(--k);
}

.timeline time {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--g3);
}

.timeline h3 {
  margin: 2px 0 6px;
  font-size: 16px;
}

.timeline h3 em {
  margin-left: 8px;
  padding: 1px 8px 2px;
  font-style: normal;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--w);
  background: var(--k);
  border-radius: 999px;
  vertical-align: 2px;
}

.timeline p,
.timeline ul {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--g2);
}

.timeline ul {
  margin-top: 6px;
  padding-left: 1.1em;
  list-style: disc;
}

.next-h {
  border-top: var(--hair) solid var(--g4);
  padding-top: 22px;
}

/* ------------------------------------------------------------ the phone
 *
 * One screen, top to bottom: the headline, the paragraph, the Kindle with
 * its subtitle, the two buttons and the three facts, as one block in the
 * middle of the window, the Earth behind its foot. The facts are pills
 * here rather than a line, so the globe does not get into them. The label
 * and the scene beside the Kindle are left out: the signpost's ways on are
 * in the drawer, and the star comes out over the Kindle instead
 * (world.js). */

@media (max-width: 760px) {
  /* The drawer: hung from the top right, under its button, unrolling
   * downwards. Ink on paper like the dialogs; the page behind dims a
   * little. */
  .menu-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 34px;
    padding: 0;
    border: var(--hair) solid var(--g4);
    border-radius: 999px;
    background: none;
    color: var(--k);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .menu-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
  }

  .menu-btn .shut,
  .menu-btn:has(+ .tools:popover-open) .bars {
    display: none;
  }

  .menu-btn:has(+ .tools:popover-open) .shut {
    display: block;
  }

  .menu-btn:has(+ .tools:popover-open) {
    border-color: var(--k);
  }

  .menu-btn.hint {
    animation: hint-snd 1.4s ease-in-out 2;
  }

  .tools:not(:popover-open) {
    display: none;
  }

  .tools {
    position: fixed;
    inset: calc(var(--chrome, 60px) - 8px) max(var(--gutter), env(safe-area-inset-right, 0px)) auto auto;
    display: block;
    width: min(300px, calc(100vw - 2 * var(--gutter)));
    border: var(--rule) solid var(--k);
    background: var(--w);
    color: var(--k);
    animation: drawer 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) 1;
  }

  .tools::backdrop {
    background: rgba(0, 0, 0, 0.12);
  }

  .ways {
    display: block;
  }

  .ways a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 18px;
    font-size: 15.5px;
    color: var(--k);
    text-decoration: none;
  }

  .ways a + a {
    border-top: var(--hair) solid var(--g4);
  }

  .ways a::after {
    content: "→";
    margin-left: auto;
    color: var(--g3);
  }

  .ways a[data-link]::after {
    content: "↗";
  }

  .ways a:active {
    background: var(--k);
    color: var(--w);
  }

  .ways .ver {
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 400;
    color: var(--g3);
  }

  .tools-row {
    justify-content: space-between;
    padding: 12px 18px;
    border-top: var(--rule) solid var(--k);
  }

  .tools .snd {
    margin-right: 0;
    font-size: 14px;
  }

  /* The drawer is white, not the sky: the slash is cut out of that. */
  .tools .eq {
    --surface: var(--paper);
  }

  .tools .snd-l {
    display: inline;
  }

  .tools .lang {
    gap: 12px;
  }

  .tools .lang button {
    padding: 6px 2px;
    font-size: 13px;
  }

  .tools-note {
    display: block;
    margin: 0;
    padding: 11px 18px 13px;
    border-top: var(--hair) solid var(--g4);
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--g3);
  }

  .tools-note a {
    margin-left: 4px;
    color: var(--g2);
  }

  @keyframes drawer {
    from { clip-path: inset(0 0 100% 0); }
    to { clip-path: inset(0 0 0 0); }
  }

  .stage {
    /* The Kindle as wide as the column, unless the window is too short for
     * that; what is left over goes above and below the whole block. */
    --kh: calc((100vw - 2 * var(--gutter)) * 169 / 117 + 26px);
    top: calc(var(--chrome, 56px) + 0.5svh);
    /* Clear of the pause button and its neighbour, which stand at --bot and
     * are 28px tall: the block ends above them rather than running the
     * facts underneath them. On a window tall enough it costs nothing; on a
     * short one the Kindle gives up the height, which is the row that has
     * it to give. Without this, every phone under about 800px — an
     * iPhone SE or 8, most Androids at 640 — hid its last line of facts
     * behind the buttons. */
    bottom: calc(var(--bot) + 36px);
    height: auto;
    max-width: none;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, var(--kh)) auto auto;
    grid-template-areas: "h" "lede" "dev" "cta" "facts";
    align-content: center;
  }

  .copy {
    display: contents;
  }

  .eyebrow {
    display: none;
  }

  .copy h1,
  .lede,
  .cta,
  .facts {
    position: relative;
    z-index: 5;
    justify-self: center;
    text-align: center;
  }

  /* Under the buttons, over the Earth: each on a little paper label so
   * the globe behind does not get into the words. */
  .facts {
    grid-area: facts;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--g2);
  }

  .facts li {
    justify-content: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--sky) 86%, transparent);
  }

  .facts li::before {
    display: none;
  }

  .copy h1 {
    grid-area: h;
    font-size: clamp(30px, 9vw, 40px);
  }

  .lede,
  html[data-lang="en"] .lede {
    grid-area: lede;
    max-width: 30em;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.6;
  }

  .stand {
    margin: 14px 0 12px;
  }

  .cta {
    grid-area: cta;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 10px;
    margin-top: 0;
  }

  .cta .btn {
    font-size: 13.5px;
    padding: 10px 12px;
  }

  .vista {
    display: none;
  }

  /* The globe's top behind the Kindle's foot and the buttons. */
  .d-earth {
    --R: max(118vw, 420px);
    --top: 76svh;
  }


  .moon { left: 2%; top: 7%; width: 34px; }
  .planet { left: 86%; top: 8%; width: 44px; }

  .smallprint {
    display: none;
  }

  /* Over to the right, out of the way of the drawer button; --bot rather
   * than a flat 1svh, so they clear the home indicator on a phone that has
   * one instead of sitting under it. */
  .playpause {
    left: auto;
    right: var(--gutter);
    bottom: var(--bot);
  }

  .replay,
  .skipend {
    left: auto;
    right: calc(var(--gutter) + 38px);
    bottom: var(--bot);
  }
}

/* --------------------------------------------------------- stillness */

/* The pause button: the world holds still with the Kindle. */
.world.still *,
.world.still *::before,
.world.still *::after {
  animation-play-state: paused !important;
}

/* Except a change already under way: frozen there, the panel would keep
 * two screens on it, and the window would stay black. Both finish, and
 * then nothing starts another. */
.world.still .layer.on,
.world.still .gc16.go {
  animation-play-state: running !important;
}


@media (prefers-reduced-motion: reduce) {
  .spk use,
  .cl img,
  .spinner,
  .orbit,
  .fly-b,
  .halo-pad,
  .halo-pad::before,
  .goldstar,
  .board.swing {
    animation: none;
  }

  .world[data-intro] * {
    animation: none !important;
  }

  .board,
  .lines p {
    transition: none;
  }
}

/* ----------------------------------------------------------- the scenes */

/* A transition for every change of screen, act to act and step to step —
 * and not the same one every time: what moves says what kind of change it
 * is. Five of them, named on the screen as data-swap by scenes.js:
 *
 *   open   an app starting — it grows out of the point pressed
 *   clear  the system painting a whole new screen, top to bottom, the way
 *          eips paints one: no fade, a wipe
 *   push   a step sideways inside an app — in from the right, the old one
 *          a little to the left
 *   rise   something coming up off the bottom edge: the keyboard, the
 *          candidates above it
 *   page   a page turning: the next page slides over, quickly
 *   sleep  the screen going out, on the picture it was found on
 *
 * They are the site's, not the device's. The device has no transition at
 * all — its windows are swapped and the panel refreshes
 * (docs/open-items.md) — so imitating it would mean having none, and a
 * panel flashing black and white on every change is the one thing the eye
 * follows instead of the screen. */
.screen {
  /* Slower than a UI transition would be, on purpose: these stand for a
   * panel redrawing itself, and the reader is watching the change, not
   * waiting for it (2026-10-25, with the new pacing in scenes.js). */
  --swap: 420ms;
  --swap-act: 560ms;
  --swap-ease: cubic-bezier(0.25, 0.6, 0.25, 1);
  /* Where the last press landed, as scenes.js measured it. */
  --ox: 50%;
  --oy: 50%;
}

.scene {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--swap-act) var(--swap-ease),
    visibility var(--swap-act);
}

/* Which scene is up is decided in scenes.js, because two acts can share
 * one scene element — the library and the boot are the same screen. */
.scene.on {
  visibility: visible;
  opacity: 1;
}

/* A fingertip, shown the way screen recordings show one: it comes down,
 * holds, and lifts. Not part of the panel, so it is smooth. scenes.js puts
 * it on the thing pressed. */
.touch {
  position: absolute;
  z-index: 10;
  left: var(--tx, 50%);
  top: var(--ty, 50%);
  width: calc(120 * var(--u));
  aspect-ratio: 1;
  margin: calc(-60 * var(--u)) 0 0 calc(-60 * var(--u));
  border-radius: 50%;
  background: radial-gradient(circle, rgba(40, 40, 38, 0.32) 0 45%, rgba(40, 40, 38, 0.16) 46% 100%);
  opacity: 0;
  pointer-events: none;
}

.touch.go {
  animation: touch 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1;
}

@keyframes touch {
  0% { opacity: 0; transform: scale(1.5); }
  22% { opacity: 1; transform: scale(0.86); }
  48% { opacity: 1; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.35); }
}

/* What is under the fingertip inverts while it is down, as the stock
 * system does it: one partial refresh in, one out. */
.screen .pressed {
  background: var(--screen-ink) !important;
  color: var(--screen-bg) !important;
}

.layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  visibility: hidden;
  opacity: 0;
  background: var(--screen-bg);
  transition: opacity var(--swap) var(--swap-ease), visibility var(--swap);
}

/* A photograph of the panel fills it exactly: the shots are 1072 x 1448,
 * the screen's own size, already shown as the panel shows them
 * (tools/panelise.py), so nothing here touches their tone. */
.shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The sleep picture fills the panel exactly, as it does on the device. */
.sleepshot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The one that is up is over the one it replaces; the one it replaces
 * keeps its place underneath, marked `out`, until the change is over. */
.layer.on {
  z-index: 2;
  visibility: visible;
  opacity: 1;
  transform-origin: var(--ox) var(--oy);
  animation: sw-open var(--swap) var(--swap-ease) 1;
}

.layer.out {
  z-index: 1;
  visibility: visible;
  transform-origin: var(--ox) var(--oy);
  animation: sw-open-out var(--swap) var(--swap-ease) 1 forwards;
}

/* An app starting: out of the point that was pressed. */
@keyframes sw-open {
  from { opacity: 0; transform: scale(0.93); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes sw-open-out {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(1.04); }
}

/* The system painting a whole new screen: a wipe, top to bottom, with no
 * fade — the new screen is already there, being revealed. */
.screen[data-swap="clear"] .layer.on {
  transition: none;
  animation: sw-clear 460ms cubic-bezier(0.4, 0, 0.15, 1) 1;
}

.screen[data-swap="clear"] .layer.out {
  animation: none;
  opacity: 1;
}

@keyframes sw-clear {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* A step sideways inside an app. */
.screen[data-swap="push"] .layer.on {
  animation-name: sw-push;
}

.screen[data-swap="push"] .layer.out {
  animation-name: sw-push-out;
}

@keyframes sw-push {
  from { opacity: 0; transform: translateX(9%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes sw-push-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-5%); }
}

/* Something coming up off the bottom edge: the keyboard, and the row of
 * candidates that appears over it. */
.screen[data-swap="rise"] .layer.on {
  animation-name: sw-rise;
  animation-duration: 260ms;
}

.screen[data-swap="rise"] .layer.out {
  animation-name: sw-fade-out;
  animation-duration: 260ms;
}

@keyframes sw-rise {
  from { opacity: 0; transform: translateY(4%); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes sw-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* A page turning: the next page comes over, quickly, and does not fade —
 * a page is not translucent. */
.screen[data-swap="page"] .layer.on {
  transition: none;
  animation: sw-page 280ms cubic-bezier(0.22, 0.9, 0.3, 1) 1;
}

.screen[data-swap="page"] .layer.out {
  animation: sw-page-out 280ms cubic-bezier(0.22, 0.9, 0.3, 1) 1 forwards;
}

@keyframes sw-page {
  from { transform: translateX(14%); }
  to { transform: translateX(0); }
}

@keyframes sw-page-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-4%); }
}

/* Out, on the picture it was found on. */
.screen[data-swap="sleep"] .layer.on {
  animation: sw-sleep 520ms var(--swap-ease) 1;
}

@keyframes sw-sleep {
  from { opacity: 0; transform: scale(1.035); }
  to { opacity: 1; transform: scale(1); }
}

/* A reader who asked for less motion gets the screens cut, not crossed.
 * This has to come after the rules above, not with the other reduced-motion
 * rules higher up the file: a media query adds no weight, so the later rule
 * would win. */
@media (prefers-reduced-motion: reduce) {
  .scene,
  .layer {
    transition: none;
  }

  .layer.on,
  .layer.out,
  .screen[data-swap] .layer.on,
  .screen[data-swap] .layer.out {
    animation: none;
  }

  .layer.out {
    visibility: hidden;
    opacity: 0;
  }
}

/* ------------------------------------------------------- scene 1: library */

/* Everything here is laid out in device pixels of the real screen, measured
 * off a photograph of the device: positions absolute, so one number here is
 * one number there. The stock system's own greys, not the site's. */
.lib {
  display: block;
  --lib-grey: #d6d5d1;
  font-size: calc(30 * var(--u));
}

.lib-bar {
  position: absolute;
  left: calc(26 * var(--u));
  right: calc(26 * var(--u));
  top: calc(40 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(14 * var(--u));
  font-size: calc(28 * var(--u));
  font-variant-numeric: tabular-nums;
  color: #55544f;
}

/* The handle the notification shade is pulled down by: a shallow chevron,
 * centred on the top edge. */
.lib-pull {
  position: absolute;
  left: 50%;
  top: calc(-6 * var(--u));
  width: calc(116 * var(--u));
  height: calc(26 * var(--u));
  margin-left: calc(-58 * var(--u));
  border-bottom: calc(4 * var(--u)) solid #8d8c87;
  border-radius: 0 0 calc(70 * var(--u)) calc(70 * var(--u)) / 0 0 calc(26 * var(--u)) calc(26 * var(--u));
}

.lib-wifi {
  margin-left: auto;
}

.lib-wifi,
.lib-bat {
  width: calc(34 * var(--u));
  height: calc(34 * var(--u));
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.lib-bat {
  width: calc(40 * var(--u));
}

.lib-pc {
  font-size: calc(26 * var(--u));
}

/* The search field: a pill the width of the screen but for the menu. */
.lib-find {
  position: absolute;
  left: calc(26 * var(--u));
  top: calc(122 * var(--u));
  width: calc(914 * var(--u));
  height: calc(100 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(22 * var(--u));
  padding-inline: calc(34 * var(--u));
  border: calc(2 * var(--u)) solid #a9a8a3;
  border-radius: calc(50 * var(--u));
  font-size: calc(36 * var(--u));
  color: #55544f;
}

.lib-find svg {
  flex: none;
  width: calc(36 * var(--u));
  height: calc(36 * var(--u));
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

/* The three dots to the right of the field. */
.lib-menu {
  position: absolute;
  left: calc(1004 * var(--u));
  top: calc(156 * var(--u));
  width: calc(8 * var(--u));
  height: calc(8 * var(--u));
  border-radius: 50%;
  background: #4a4945;
  box-shadow:
    0 calc(16 * var(--u)) 0 0 #4a4945,
    0 calc(32 * var(--u)) 0 0 #4a4945;
}

.lib-h {
  position: absolute;
  left: calc(26 * var(--u));
  top: calc(286 * var(--u));
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: calc(14 * var(--u));
  font-size: calc(52 * var(--u));
  font-weight: 500;
  letter-spacing: -0.01em;
}

.lib-h b {
  font-weight: 400;
  font-size: calc(44 * var(--u));
  color: #6a6964;
}

/* The one thing in the library: a document the stock system knows nothing
 * about, so it draws a page for a cover and says Unknown. */
.lib-cell {
  position: absolute;
  left: calc(26 * var(--u));
  top: calc(360 * var(--u));
  width: calc(254 * var(--u));
  height: calc(412 * var(--u));
}

.lib-doc {
  position: absolute;
  left: calc(26 * var(--u));
  top: calc(22 * var(--u));
  width: calc(50 * var(--u));
  height: calc(66 * var(--u));
  border: calc(3 * var(--u)) solid #3a3935;
  border-radius: calc(4 * var(--u));
  clip-path: polygon(0 0, 68% 0, 100% 24%, 100% 100%, 0 100%);
}

.lib-doc::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: calc(18 * var(--u));
  height: calc(18 * var(--u));
  border-left: calc(3 * var(--u)) solid #3a3935;
  border-bottom: calc(3 * var(--u)) solid #3a3935;
}

/* How much of it has been read, on a tag with a notched foot. */
.lib-pct {
  position: absolute;
  right: calc(8 * var(--u));
  top: 0;
  width: calc(76 * var(--u));
  height: calc(64 * var(--u));
  display: grid;
  place-items: center;
  padding-bottom: calc(10 * var(--u));
  background: #262521;
  color: var(--screen-bg);
  font-size: calc(26 * var(--u));
  font-weight: 600;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}

.lib-info {
  position: absolute;
  inset: calc(96 * var(--u)) 0 0 0;
  background: var(--lib-grey);
  padding: calc(18 * var(--u)) calc(16 * var(--u));
}

.lib-t,
.lib-a {
  display: block;
  line-height: 1.3;
}

.lib-t {
  font-size: calc(30 * var(--u));
  font-weight: 700;
}

.lib-a {
  font-size: calc(28 * var(--u));
  color: #4f4e4a;
}

/* Downloaded: a filled circle with a tick in it, bottom left. */
.lib-ok {
  position: absolute;
  left: calc(16 * var(--u));
  bottom: calc(14 * var(--u));
  width: calc(44 * var(--u));
  height: calc(44 * var(--u));
  border-radius: 50%;
  background: #262521;
}

.lib-ok::after {
  content: "";
  position: absolute;
  left: calc(12 * var(--u));
  top: calc(14 * var(--u));
  width: calc(20 * var(--u));
  height: calc(10 * var(--u));
  border-left: calc(4 * var(--u)) solid var(--screen-bg);
  border-bottom: calc(4 * var(--u)) solid var(--screen-bg);
  rotate: -45deg;
}

.lib-dots {
  position: absolute;
  right: calc(26 * var(--u));
  bottom: calc(40 * var(--u));
  width: calc(7 * var(--u));
  height: calc(7 * var(--u));
  border-radius: 50%;
  background: #4a4945;
  box-shadow:
    0 calc(14 * var(--u)) 0 0 #4a4945,
    0 calc(28 * var(--u)) 0 0 #4a4945;
}

.lib-rule {
  position: absolute;
  left: calc(26 * var(--u));
  right: calc(26 * var(--u));
  top: calc(800 * var(--u));
  height: calc(2 * var(--u));
  background: #b5b4af;
}

.lib-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(40 * var(--u));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  font-size: calc(32 * var(--u));
  color: #3a3935;
}

.lib-foot span {
  justify-self: center;
}

.lib-foot .here {
  border-bottom: calc(3 * var(--u)) solid #3a3935;
  padding-bottom: calc(4 * var(--u));
}

.lib-foot i {
  width: calc(2 * var(--u));
  height: calc(40 * var(--u));
  background: #8d8c87;
}

/* The tap: the stock system darkens the one pressed. */
.scene-1.is-tapped .lib-cell.entry .lib-info {
  background: #262521;
  color: var(--screen-bg);
}

.scene-1.is-tapped .lib-cell.entry .lib-a {
  color: #d6d5d1;
}

.scene-1.is-tapped .lib-cell.entry .lib-ok {
  background: var(--screen-bg);
}

.scene-1.is-tapped .lib-cell.entry .lib-ok::after {
  border-color: #262521;
}

.scene-1.is-tapped .lib-cell.entry .lib-dots {
  background: var(--screen-bg);
  box-shadow:
    0 calc(14 * var(--u)) 0 0 var(--screen-bg),
    0 calc(28 * var(--u)) 0 0 var(--screen-bg);
}

/* A window too short for the scenery.
 *
 * A phone held sideways is 375 tall. The signpost is a post, three boards
 * and a mound, and the column it stands in is the flexible row of the
 * hero's grid — so when the copy above it has taken what it needs, the
 * signpost was left with three pixels and crushed itself into them.
 *
 * Here the three ways stay — they are the only way to the changelog and
 * the source — but they stand in a row, without the post, the mound or
 * the tilt. The star goes: there is no sky to hang it in. world.js asks
 * the star whether it is on screen rather than asking a breakpoint, so it
 * notices and offers "skip to the end" in its place.
 *
 * container-type is dropped with it: size containment means the column
 * cannot be sized by what is in it, which is exactly what a row of boards
 * needs it to do. Nothing else here is measured in cq units once the star
 * is gone. */
@media (min-width: 761px) and (max-height: 620px) {
  /* The row of boards is in the flow, so the vista is sized by it rather
   * than reserving the upright signpost's 186px. */
  .stage {
    grid-template-rows: auto auto;
  }

  .vista {
    container-type: normal;
  }

  .signpost {
    --bh: 28px;
    position: static;
    width: auto;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 6px;
  }

  .post,
  .mound {
    display: none;
  }

  .board {
    position: static;
    height: var(--bh);
    rotate: none;
    font-size: 13px;
  }

  .board:hover,
  .board:focus-visible {
    rotate: none;
    translate: 0;
  }

  .halo {
    display: none;
  }
}
