/* pdfmetro.com: the look "Line", the app's own identity.
   Tokens first. They mirror the app's src/ui/palette.ts and src/ui/tokens.ts
   (C:\app\pdf_app). Change a colour there and here together.

   Rules of the look, in short:
   - Big Shoulders Display 800 in capitals for page titles and stop names only.
     Overpass 400 for everything else, Overpass 700 for labels and emphasis.
     Never capitals in Overpass.
   - Square corners (2px at most) on every card, button and panel. No shadows,
     no blur: depth comes from colour blocks, borders, 3px lines, 4px colour
     edges and offset. (A drawing of a phone keeps the phone's own rounded
     outer corners: it depicts hardware.)
   - Circles are stops on the line and nothing else. A square mustard stop
     with a dark edge means "still to come".
   - Signal Orange is for the line, its stops and edges, never small text.
     Cobalt is for links and buttons.
   - One orange route line per page, down the side of the content, with a
     start bar and a terminus.
   - Motion is CSS only, all of it inside prefers-reduced-motion:
     no-preference, and only the hero drawing loops.

   Contents
     1. Tokens            8. Home page
     2. Fonts             9. Privacy and Support (the line map)
     3. Base             10. 404
     4. Header (sign)    11. App drawings (shared parts)
     5. Footer           12. Drawing: reading (hero) and its close-up
     6. The route line   13. Drawings: Your PDFs, Pages, Contents
     7. Type, buttons,   14. Motion
        cards, notes */

/* =========================================================
   1. Tokens
   ========================================================= */

:root {
  color-scheme: light dark;

  /* Day (the app's names in comments) */
  --ground: #EEF1F3;      /* Platform */
  --card: #FFFFFF;
  --text: #111A22;        /* Signage Black */
  --muted: #5C6670;       /* Concrete: 5.2 on Platform, 4.6 on the desk */
  --rule: #D3D9DE;
  --rule-strong: #B9C2CA; /* borders that must be seen (notes, outlines) */
  --desk: #E0E5E9;
  --line: #E0480B;        /* Signal Orange: the line and its stops, never small text */
  --link: #1F4FC4;        /* Cobalt */
  --link-press: #1C429C;  /* Cobalt 25% toward Signage Black: the app's accentPressed */
  --on-link: #FFFFFF;
  --todo: #F4B400;        /* Mustard */
  --todo-edge: #111A22;   /* mustard always has a dark edge */
  --highlight: rgba(244, 180, 0, 0.45); /* the highlighter: Mustard at 45% */

  /* The sign: the header, the footer and the dark band on the home page */
  --sign: #111A22;
  --on-sign: #EEF1F3;     /* 15.5 */
  --sign-muted: #A3ADB7;  /* 7.7 */
  --sign-rule: #2C3843;
  --sign-link: #86AAFF;   /* Night Cobalt: Cobalt itself is too dark on the sign (7.7) */

  /* Type */
  --font-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Overpass", "Segoe UI", Roboto, Arial, sans-serif;

  --fs-title: clamp(44px, 4.2vw + 27px, 88px);
  --fs-stop: clamp(34px, 1.4vw + 26px, 48px);
  --fs-stop-doc: clamp(30px, 0.6vw + 26px, 36px);
  --fs-lede: clamp(19px, 0.35vw + 17.5px, 22px);
  --fs-body: clamp(16px, 0.25vw + 15px, 18px);
  --fs-card: clamp(20px, 0.2vw + 19px, 22px);
  --fs-label: 14px;

  /* Shape */
  --radius: 2px;
  --bar: 3px;
  --edge: 4px;

  /* Space: an 8px grid */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --section: 64px;        /* between sections: 64 on phones, up to 128 */

  /* The container */
  --wrap: 1200px;
  --pad: 16px;
  --content-left: max(var(--pad), (100% - var(--wrap)) / 2);

  /* The route line: where it sits and how far the content stands off it */
  --line-x: 14px;         /* centre of the line from the left of the content */
  --gutter: 40px;         /* left edge of the text */
  --stop: 18px;           /* a ring stop at a section */
  --stop-here: 26px;      /* the stop for where you are (the page title) */
  --stop-fill: var(--ground);

  --header-h: 56px;
  --measure: 44rem;
  --ease: cubic-bezier(0.3, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0C1F3F;    /* Night Service */
    --card: #15305A;      /* Carriage */
    --text: #EAF0FA;      /* Lamp White */
    --muted: #A3B3CF;
    --rule: #22406E;
    --rule-strong: #2F5185;
    --desk: #081630;
    --line: #FF7A3D;      /* Night Orange */
    --link: #86AAFF;      /* Night Cobalt */
    --link-press: #A4BFFE; /* Night Cobalt 30% toward Lamp White: the app's night accentPressed */
    --on-link: #0C1F3F;   /* Night Service on Night Cobalt: 7.2 */
    --todo: #FFD34A;      /* Night Mustard */
    --todo-edge: #EAF0FA;
    --highlight: rgba(255, 211, 74, 0.38);

    --sign: #081630;      /* the night desk */
    --on-sign: #EAF0FA;
    --sign-muted: #A3B3CF;
    --sign-rule: #22406E;
    --sign-link: #86AAFF;
  }
}

@media (min-width: 720px) {
  :root {
    --pad: 32px;
    --line-x: 20px;
    --gutter: 68px;
    --stop: 22px;
    --stop-here: 30px;
    --header-h: 64px;
    --section: clamp(96px, 8vw, 128px);
  }
}

/* =========================================================
   2. Fonts (self-hosted; the same files the app ships, subset to Latin)
   ========================================================= */

@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/big-shoulders-display-800.8860f749.woff2") format("woff2");
}

@font-face {
  font-family: "Overpass";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/overpass-400.096e3123.woff2") format("woff2");
}

@font-face {
  font-family: "Overpass";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/overpass-700.8c10b5b8.woff2") format("woff2");
}

/* =========================================================
   3. Base
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--ground);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* A short page still ends with the footer at the foot of the window. */
main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

p {
  text-wrap: pretty;
}

strong,
b {
  font-weight: 700;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
}

::selection {
  background: var(--highlight);
  color: inherit;
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 32px);
}

/* The icons: the app's pictograms, 2px round-ended strokes on a 24 grid. */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ic {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ic-dot {
  fill: currentColor;
  stroke: none;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--pad));
  margin-inline: auto;
  padding-left: max(var(--pad), env(safe-area-inset-left, 0px));
  padding-right: max(var(--pad), env(safe-area-inset-right, 0px));
}

/* Skip link */
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 30;
  padding: var(--s-3) var(--s-4);
  background: var(--card);
  color: var(--link);
  font-weight: 700;
  border-radius: var(--radius);
  border: var(--bar) solid var(--link);
}

.skip:focus {
  top: 8px;
}

/* =========================================================
   4. Header: the sign
   ========================================================= */

.sign {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--sign);
  color: var(--on-sign);
  border-bottom: 1px solid var(--sign-rule);
  view-transition-name: sign;
}

.sign-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--on-sign);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

/* The mark: the line itself, a short orange segment with one ring stop. */
.mark {
  width: 20px;
  height: 34px;
  flex: none;
}

.mark-line {
  fill: none;
  stroke: var(--line);
  stroke-width: 3;
}

.mark-stop {
  fill: var(--sign);
  stroke: var(--line);
  stroke-width: 3;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 27px;
  line-height: 1;
  letter-spacing: 0.03em;
  padding-top: 3px; /* Big Shoulders sits high in its box */
}

.nav ul {
  display: flex;
  gap: var(--s-5);
}

.nav a {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--header-h);
  color: var(--on-sign);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  padding-top: 3px;
  text-decoration: none;
}

/* The 4px bar under the hovered and the current item */
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--edge);
  background: var(--line);
  transform: scaleX(0);
  transform-origin: left center;
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.sign :focus-visible,
.foot :focus-visible,
.band-sign :focus-visible {
  outline-color: var(--sign-link);
}

.nav a:focus-visible {
  outline-offset: -3px;
}

@media (min-width: 720px) {
  .mark {
    width: 22px;
    height: 40px;
  }

  .wordmark {
    font-size: 31px;
  }

  .nav ul {
    gap: var(--s-6);
  }

  .nav a {
    font-size: 17px;
  }
}

/* =========================================================
   5. Footer: the sign again, at the end of the page
   ========================================================= */

.foot {
  background: var(--sign);
  color: var(--on-sign);
  padding-top: var(--s-7);
  padding-bottom: var(--s-7);
  font-size: 15px;
  line-height: 1.6;
}

.foot-inner {
  display: grid;
  gap: var(--s-6);
}

.foot-brand p {
  color: var(--sign-muted);
}

.foot-brand .brand {
  margin-bottom: var(--s-3);
  color: var(--on-sign);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s-5);
  font-weight: 700;
}

.foot a {
  color: var(--sign-link);
}

.foot-links a {
  display: inline-block;
  padding: 10px 0;
  font-size: 16px;
}

.foot-note {
  color: var(--sign-muted);
  max-width: 34rem;
}

@media (min-width: 720px) {
  .foot {
    padding-top: var(--s-8);
    padding-bottom: var(--s-8);
  }

  .foot-inner {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 1.4fr);
    align-items: start;
    gap: var(--s-7);
  }

  .foot-links {
    flex-direction: column;
  }

  .foot-links a {
    padding: 4px 0;
  }
}

/* =========================================================
   6. The route line (the signature element)
   One per page. The line is drawn once down the whole route (.spine),
   from a start bar to a terminus, and runs unbroken through every band.
   Every stop name sits beside a ring stop on it.
   ========================================================= */

.spine {
  position: relative;
  --spine-top: var(--s-7);
  --spine-bottom: var(--s-8);
}

.spine::before {
  content: "";
  position: absolute;
  top: var(--spine-top);
  bottom: var(--spine-bottom);
  left: calc(var(--content-left) + var(--line-x) - 11px);
  width: 22px;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line), var(--line)),
    linear-gradient(var(--line), var(--line)),
    linear-gradient(var(--line), var(--line));
  background-repeat: no-repeat;
  background-size:
    var(--bar) 100%,
    22px var(--edge),
    22px var(--edge);
  background-position:
    50% 0,
    0 0,
    0 100%;
}

/* A stop on the line, beside a stop name or a page title.
   The element's left edge is the text's left edge (line + gutter). */
.stop {
  position: relative;
}

.stop::before {
  content: "";
  position: absolute;
  left: calc(var(--line-x) - var(--gutter) - var(--stop) / 2);
  top: calc(0.5lh - var(--stop) / 2 + var(--nudge, 0px));
  width: var(--stop);
  height: var(--stop);
  border-radius: 50%;
  border: var(--bar) solid var(--line);
  background: var(--stop-fill);
}

/* The stop for where you are: larger, with a 4px ring. */
.stop-here::before {
  left: calc(var(--line-x) - var(--gutter) - var(--stop-here) / 2);
  top: calc(0.5lh - var(--stop-here) / 2 + var(--nudge, 0px));
  width: var(--stop-here);
  height: var(--stop-here);
  border-width: var(--edge);
}

/* =========================================================
   7. Type, buttons, cards, notes
   ========================================================= */

.title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: var(--fs-title);
  line-height: 0.94;
  letter-spacing: 0.01em;
  text-wrap: balance;
  --nudge: -0.04em; /* the display face's capitals sit high in the line */
}

.stop-name {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: var(--fs-stop);
  line-height: 1;
  letter-spacing: 0.02em;
  text-wrap: balance;
  --nudge: -0.04em;
}

.label {
  font-weight: 700;
  font-size: var(--fs-label);
  line-height: 20px;
  letter-spacing: 0.01em;
}

.lede {
  font-size: var(--fs-lede);
  line-height: 1.5;
  max-width: 36rem;
}

.intro {
  color: var(--muted);
  font-size: var(--fs-lede);
  line-height: 1.5;
  max-width: var(--measure);
  margin-top: var(--s-4);
}

.prose {
  max-width: var(--measure);
}

.prose > * + * {
  margin-top: 1em;
}

/* Lists: square markers, since circles are kept for stops */
.squares > li {
  position: relative;
  padding-left: 24px;
}

.squares > li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: calc(0.5lh - 5px);
  width: 8px;
  height: 8px;
  background: var(--text);
}

.squares > li + li {
  margin-top: 0.75em;
}

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 22px 10px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  translate: 0 1px;
}

.btn-primary {
  background: var(--link);
  border-color: var(--link);
  color: var(--on-link);
}

.btn-primary:hover,
.btn-primary:active {
  background: var(--link-press);
  border-color: var(--link-press);
}

.btn-secondary {
  background: transparent;
  border-color: var(--text);
  color: var(--text);
}

.btn-secondary:hover,
.btn-secondary:active {
  background: var(--text);
  color: var(--ground);
}

/* "Still to come": a bordered label with the square mustard stop */
.todo {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 16px 9px 12px;
  border: 2px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--card);
  font-weight: 700;
  font-size: 15px;
  line-height: 22px;
}

.todo::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border-radius: 1px;
  background: var(--todo);
  border: 2px solid var(--todo-edge);
}

/* A note that takes a whole paragraph */
.todo-note {
  display: flex;
  max-width: var(--measure);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  padding: 16px 20px 14px 16px;
}

.todo-note::before {
  margin-top: 4px;
}

/* Cards: square corners, no shadow, the 4px orange left edge */
.card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: var(--s-5) var(--s-5) var(--s-5) calc(var(--s-5) + var(--edge));
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(2 * var(--edge));
  background: var(--line);
  border-radius: var(--radius) 0 0 var(--radius);
  transform: scaleX(0.5);
  transform-origin: left center;
}

/* Link cards: a whole card is the link */
.linkcards {
  display: grid;
  gap: var(--s-4);
}

.linkcard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  min-height: 100%;
  padding: var(--s-5) var(--s-5) var(--s-5) calc(var(--s-5) + var(--edge));
  border: 2px solid transparent;
  color: var(--text);
  text-decoration: none;
}

.linkcard:hover {
  text-decoration: none;
  border-color: var(--link);
}

.linkcard-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  min-width: 0;
}

.linkcard-title {
  color: var(--link);
  font-weight: 700;
  font-size: clamp(22px, 0.6vw + 19px, 28px);
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.linkcard-text {
  color: var(--muted);
}

.linkcard-go {
  width: 32px;
  height: 32px;
  color: var(--link);
}

.linkcard:hover .linkcard-go {
  translate: 4px 0;
}

.linkcard::before {
  left: -2px;
  top: -2px;
  bottom: -2px;
}

.linkcard:hover::before {
  transform: scaleX(1);
}

@media (min-width: 720px) {
  .linkcards {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-5);
  }

  .linkcard {
    padding: var(--s-6) var(--s-6) var(--s-6) calc(var(--s-6) + var(--edge));
  }
}

/* =========================================================
   8. Home page
   ========================================================= */

.home {
  --spine-top: calc(var(--hero-top) - 28px);
  --spine-bottom: var(--s-8);
  --hero-top: var(--s-8);
}

/* A section on the line: its text starts at the gutter. */
.leg {
  padding-top: var(--section);
}

.leg-in {
  padding-left: var(--gutter);
}

/* --- The hero ------------------------------------------------- */

.hero {
  padding-top: var(--hero-top);
  padding-inline: var(--pad);
}

.hero-text {
  padding-left: var(--gutter);
}

.hero .todo {
  margin-bottom: var(--s-6);
}

.hero .title {
  margin-bottom: var(--s-5);
}

.hero .lede {
  margin-bottom: var(--s-6);
}

/* The drawing stands on a desk-coloured panel that runs off the right edge. */
.hero-art {
  display: flex;
  justify-content: center;
  margin-top: var(--s-7);
  margin-left: var(--gutter);
  margin-right: calc(-1 * var(--pad));
  padding: var(--s-6) var(--pad) var(--s-6) var(--s-5);
  background: var(--desk);
}

.hero-art .phone {
  --phone-w: min(300px, calc(78svh * 300 / 645));
}

@media (min-width: 960px) {
  .home {
    --hero-top: clamp(72px, 7vw, 112px);
  }

  .hero {
    display: grid;
    grid-template-columns:
      minmax(var(--pad), 1fr)
      minmax(0, calc(var(--wrap) * 0.54))
      minmax(0, calc(var(--wrap) * 0.46))
      minmax(var(--pad), 1fr);
    padding-top: 0;
    padding-inline: 0;
  }

  .hero-text {
    grid-column: 2;
    padding-top: var(--hero-top);
    padding-right: var(--s-7);
    padding-bottom: var(--s-8);
  }

  .hero-art {
    grid-column: 3 / 5;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    padding: var(--s-7) var(--pad) var(--s-7) clamp(32px, 5vw, 88px);
  }

  .hero-art .phone {
    --phone-w: clamp(280px, 22vw, 320px);
  }
}

/* --- What it will do: the feature cards ------------------------ */

.features {
  display: grid;
  gap: var(--s-4);
  margin-top: var(--s-7);
}

.feature {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-5) var(--s-5) var(--s-6) calc(var(--s-5) + var(--edge));
}

.feature h3 {
  font-weight: 700;
  font-size: var(--fs-card);
  line-height: 1.3;
}

.tile {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: var(--s-3);
  background: var(--desk);
  border-radius: var(--radius);
  color: var(--text);
}

.tile .ic {
  width: 28px;
  height: 28px;
}

.feature:hover {
  translate: 0 -2px;
}

.feature:hover::before {
  transform: scaleX(1);
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }

  .feature:last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .features {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--s-5);
  }

  .feature {
    grid-column: span 2;
    padding: var(--s-6) var(--s-6) var(--s-7) calc(var(--s-6) + var(--edge));
  }

  .feature:nth-child(n + 4),
  .feature:last-child {
    grid-column: span 3;
  }
}

/* --- Bands: full-width colour blocks the line runs through ----- */

.band {
  margin-top: var(--section);
  padding-top: var(--section);
  padding-bottom: var(--section);
}

.band-desk {
  background: var(--desk);
  --stop-fill: var(--desk);
}

.band-sign {
  background: var(--sign);
  color: var(--on-sign);
  --stop-fill: var(--sign);
}

/* Where you are: the paragraph beside a close-up of the line */
.where {
  display: grid;
  gap: var(--s-7);
  align-items: center;
}

.where .prose {
  margin-top: var(--s-5);
  font-size: var(--fs-lede);
  line-height: 1.55;
  max-width: 30rem;
}

@media (min-width: 900px) {
  .where {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: var(--s-8);
  }
}

/* A look inside: three screens */
.inside-row {
  display: flex;
  gap: var(--s-5);
  margin-top: var(--s-7);
  margin-right: calc(-1 * var(--pad));
  padding: 4px var(--pad) var(--s-4) 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}

.inside-row:focus-visible {
  outline-offset: 0;
}

.shot {
  flex: 0 0 min(78%, 300px);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.shot .phone {
  --phone-w: 100%;
}

.shot figcaption {
  max-width: 300px;
}

.shot figcaption b {
  display: block;
  font-size: var(--fs-card);
  line-height: 1.3;
  margin-bottom: var(--s-1);
}

.shot figcaption span {
  display: block;
  color: var(--muted);
}

@media (min-width: 900px) {
  .inside-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(24px, 4vw, 64px);
    margin-right: 0;
    padding: 0;
    overflow: visible;
  }

  .shot .phone {
    --phone-w: min(100%, 300px);
  }
}

/* How it treats your files: a departures board */
.band-sign .intro {
  color: var(--sign-muted);
}

.board {
  margin-top: var(--s-7);
  border-top: 1px solid var(--sign-rule);
}

.board > li {
  display: grid;
  gap: var(--s-2) var(--s-7);
  padding: var(--s-5) 0 var(--s-5) calc(var(--s-5) + var(--edge));
  border-bottom: 1px solid var(--sign-rule);
  position: relative;
}

.board > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--s-5);
  bottom: var(--s-5);
  width: var(--edge);
  background: var(--line);
}

.board h3 {
  font-weight: 700;
  font-size: var(--fs-card);
  line-height: 1.3;
}

.board p {
  color: var(--sign-muted);
  max-width: 40rem;
}

@media (min-width: 768px) {
  .board > li {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: baseline;
    padding-top: var(--s-6);
    padding-bottom: var(--s-6);
  }

  .board > li::before {
    top: var(--s-6);
    bottom: var(--s-6);
  }
}

/* The closing link cards, then the terminus */
.closing {
  padding-top: var(--section);
  padding-bottom: calc(var(--s-8) + var(--s-7));
}

/* =========================================================
   9. Privacy and Support: the page as a line map
   Narrow: the line runs beside the content, a stop at each section.
   From 1024px: a sticky map of the page on the left is the route line,
   and the content on the right carries no second line.
   ========================================================= */

.doc-page {
  --spine-top: calc(var(--s-8) - 28px);
  --spine-bottom: var(--s-8);
}

.doc {
  padding-top: var(--s-8);
  padding-bottom: calc(var(--s-8) + var(--s-5));
}

.doc-body {
  padding-left: var(--gutter);
}

.doc-head .title {
  margin-bottom: var(--s-5);
}

.doc-head .label {
  color: var(--muted);
  margin-bottom: var(--s-4);
}

.doc-head .lede {
  max-width: var(--measure);
}

.doc-head .todo-note {
  margin-top: var(--s-6);
}

.part {
  padding-top: var(--s-8);
}

.part .stop-name {
  font-size: var(--fs-stop-doc);
  margin-bottom: var(--s-4);
}

/* Support: Get in touch */
.contact {
  max-width: var(--measure);
  display: grid;
  gap: var(--s-5);
  justify-items: start;
}

.contact p {
  font-size: var(--fs-lede);
  line-height: 1.5;
}

/* The map */
.map {
  display: none;
}

@media (min-width: 1024px) {
  .doc-page::before {
    display: none;
  }

  .doc {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, var(--measure));
    gap: clamp(48px, 7vw, 112px);
    align-items: start;
    padding-top: var(--s-9);
  }

  .doc-body {
    padding-left: 0;
  }

  .doc-body .stop::before {
    display: none;
  }

  .map {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + var(--s-7));
  }

  .part {
    padding-top: var(--s-9);
  }
}

.map-list {
  position: relative;
  padding: 26px 0 22px;
  scroll-target-group: auto;
  background-image:
    linear-gradient(var(--line), var(--line)),
    linear-gradient(var(--line), var(--line)),
    linear-gradient(var(--line), var(--line));
  background-repeat: no-repeat;
  background-size:
    var(--bar) 100%,
    22px var(--edge),
    22px var(--edge);
  background-position:
    calc(var(--line-x) - 1.5px) 0,
    calc(var(--line-x) - 11px) 0,
    calc(var(--line-x) - 11px) 100%;
}

.map-list a {
  position: relative;
  display: block;
  padding: 9px 0 7px 48px;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
  text-decoration: none;
}

.map-list a:hover {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.map-list a::before {
  content: "";
  position: absolute;
  left: calc(var(--line-x) - 8px);
  top: calc(9px + 0.5lh - 8px);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: var(--bar) solid var(--line);
  background: var(--ground);
}

/* Where you are, in browsers that can tell (a progressive extra). */
.map-list a:target-current {
  color: var(--text);
}

.map-list a:target-current::before {
  left: calc(var(--line-x) - 12px);
  top: calc(9px + 0.5lh - 12px);
  width: 24px;
  height: 24px;
  border-width: var(--edge);
}

/* =========================================================
   10. 404
   ========================================================= */

.lost-page {
  --spine-top: calc(var(--s-9) - 28px);
  --spine-bottom: var(--s-8);
}

.lost {
  padding-top: var(--s-9);
  padding-bottom: calc(var(--s-8) + var(--s-6));
}

.lost-in {
  padding-left: var(--gutter);
}

.lost .title {
  max-width: 12em;
  margin-bottom: var(--s-5);
}

.lost .linkcards {
  margin-top: var(--s-7);
}

@media (min-width: 1024px) {
  .lost .linkcards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =========================================================
   11. App drawings: shared parts
   Decorative re-drawings of real screens. They keep their own colours
   whatever the visitor's setting, like screenshots: .dr-day and .dr-night
   scope them. Every size inside a phone is in --u, one 300th of the
   phone's width, so a drawing scales as one picture.
   ========================================================= */

.dr-day {
  --d-screen: #EEF1F3;
  --d-card: #FFFFFF;
  --d-text: #111A22;
  --d-muted: #5C6670;
  --d-off: #7A838B;
  --d-rule: #D3D9DE;
  --d-desk: #E0E5E9;
  --d-line: #E0480B;
  --d-accent: #1F4FC4;
  --d-on-accent: #FFFFFF;
  --d-bubble: #111A22;
  --d-on-bubble: #EEF1F3;
  --d-page: #FFFFFF;
  --d-ink: #D5D8DC;
  --d-ink-dark: #3A4047;
}

.dr-night {
  --d-screen: #0C1F3F;
  --d-card: #15305A;
  --d-text: #EAF0FA;
  --d-muted: #A3B3CF;
  --d-off: #A3B3CF;
  --d-rule: #22406E;
  --d-desk: #081630;
  --d-line: #FF7A3D;
  --d-accent: #86AAFF;
  --d-on-accent: #0C1F3F;
  --d-bubble: #EAF0FA;
  --d-on-bubble: #0C1F3F;
  --d-page: #1D1E21;
  --d-ink: #4A4C51;
  --d-ink-dark: #DCDDE0;
}

/* The phone: hardware, so its outer corners are round. */
.phone {
  container-type: inline-size;
  flex: none;
  width: var(--phone-w, 300px);
  max-width: 100%;
  aspect-ratio: 300 / 645;
  padding: 3%;
  background: #111A22;
  border-radius: 12.4% / 5.8%;
  outline: 1px solid #2B3742;
  outline-offset: -1px;
}

.screen {
  --u: calc(100cqw / 300);
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--u) * 28);
  background: var(--d-screen);
  color: var(--d-text);
  font-family: var(--font-body);
  font-size: calc(var(--u) * 11);
  line-height: 1.3;
  letter-spacing: 0;
  user-select: none;
}

.screen .ic {
  width: calc(var(--u) * 15);
  height: calc(var(--u) * 15);
}

/* The status bar: a plain time and simple glyphs */
.sb {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--u) * 30);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--u) * 4) calc(var(--u) * 20) 0;
  font-size: calc(var(--u) * 10);
  line-height: 1;
}

.sb-glyphs {
  width: calc(var(--u) * 30);
  height: calc(var(--u) * 9);
  fill: currentColor;
}

/* The top bar */
.tb {
  position: absolute;
  top: calc(var(--u) * 30);
  left: 0;
  right: 0;
  height: calc(var(--u) * 42);
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 16);
  padding: 0 calc(var(--u) * 12) 0 calc(var(--u) * 12);
  background: var(--d-screen);
  border-bottom: calc(var(--u) * 0.6) solid var(--d-rule);
}

.tb-title {
  flex: 1;
  min-width: 0;
  margin-left: calc(var(--u) * -2);
  font-weight: 700;
  font-size: calc(var(--u) * 12.3);
  line-height: 1;
  padding-top: calc(var(--u) * 1.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tb-done {
  color: var(--d-accent);
  font-weight: 700;
  font-size: calc(var(--u) * 12);
  line-height: 1;
  padding-top: calc(var(--u) * 1.5);
}

/* The gesture bar at the foot of the screen */
.gb {
  position: absolute;
  left: 50%;
  bottom: calc(var(--u) * 6);
  width: calc(var(--u) * 74);
  height: calc(var(--u) * 3);
  margin-left: calc(var(--u) * -37);
  border-radius: calc(var(--u) * 2);
  background: var(--d-text);
  z-index: 3;
}

/* A page of a document, and its text drawn as grey bars */
.pg {
  background: var(--d-page);
  padding: calc(var(--u) * 26) calc(var(--u) * 24) 0;
}

.pg i {
  display: block;
  height: calc(var(--u) * 3);
  margin-top: calc(var(--u) * 5);
  background: var(--d-ink);
}

.pg i.s {
  width: 62%;
}

.pg i.m {
  width: 86%;
}

.pg i.g {
  margin-top: calc(var(--u) * 13);
}

.pg-doc {
  display: block;
  font-weight: 700;
  font-size: calc(var(--u) * 12);
  line-height: 1.2;
  color: var(--d-ink-dark);
  margin-bottom: calc(var(--u) * 14);
}

.pg-h {
  display: block;
  font-weight: 700;
  font-size: calc(var(--u) * 11);
  line-height: 1.2;
  color: var(--d-ink-dark);
  margin-bottom: calc(var(--u) * 7);
}

.pg-words {
  display: block;
  font-size: calc(var(--u) * 6.6);
  line-height: 1.45;
  color: #5A6068;
  margin-bottom: calc(var(--u) * 2);
}

/* =========================================================
   12. Drawing: reading (the hero) and its close-up
   ========================================================= */

/* The desk below the top bar */
.rd {
  position: absolute;
  top: calc(var(--u) * 72);
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  background: var(--d-desk);
}

/* The document: pages one under another, moved as one */
.rd-doc {
  position: absolute;
  top: calc(var(--u) * 6);
  left: calc(var(--u) * 5.5);
  width: calc(var(--u) * 249);
  translate: 0 calc(var(--u) * -358);
}

.rd-doc .pg {
  height: calc(var(--u) * 352);
  margin-bottom: calc(var(--u) * 6);
}

/* The route line at the right edge.
   Stops sit at page n: 28 + (n - 1) x 44 (in --u, from the top of the desk). */
.rt {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: calc(var(--u) * 27);
}

.rt-line {
  position: absolute;
  left: calc(var(--u) * 9.4);
  width: calc(var(--u) * 2.2);
  top: calc(var(--u) * 14);
  height: calc(var(--u) * 514);
  background: var(--d-line);
}

.rt-bar {
  position: absolute;
  left: calc(var(--u) * 5.3);
  width: calc(var(--u) * 10.4);
  height: calc(var(--u) * 2.4);
  background: var(--d-line);
}

.rt-bar-top {
  top: calc(var(--u) * 13);
}

.rt-bar-end {
  top: calc(var(--u) * 526.6);
}

.rt-stop {
  position: absolute;
  left: calc(var(--u) * 6);
  top: calc(var(--u) * (var(--y) - 4.6));
  width: calc(var(--u) * 9.2);
  height: calc(var(--u) * 9.2);
  border-radius: 50%;
  border: calc(var(--u) * 2) solid var(--d-line);
  background: var(--d-desk);
}

.rt-tick {
  position: absolute;
  left: calc(var(--u) * 6);
  top: calc(var(--u) * (var(--y) - 0.8));
  width: calc(var(--u) * 9.2);
  height: calc(var(--u) * 1.6);
  background: var(--d-line);
}

.p1 { --y: 28; }
.p2 { --y: 72; }
.p3 { --y: 116; }
.p4 { --y: 160; }
.p5 { --y: 204; }
.p6 { --y: 248; }
.p7 { --y: 292; }
.p8 { --y: 336; }
.p9 { --y: 380; }
.p10 { --y: 424; }
.p11 { --y: 468; }
.p12 { --y: 512; }

/* Where you are: the larger stop, and the bubble beside it */
.rt-cur {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--u) * 72);
  height: 0;
  z-index: 2;
}

.rt-here {
  position: absolute;
  left: calc(var(--u) * 1.5);
  top: calc(var(--u) * -9);
  width: calc(var(--u) * 18);
  height: calc(var(--u) * 18);
  border-radius: 50%;
  border: calc(var(--u) * 2.8) solid var(--d-line);
  background: var(--d-screen);
  outline: calc(var(--u) * 2.2) solid var(--d-screen);
}

.rt-bub {
  position: absolute;
  right: calc(var(--u) * 29.3);
  top: 0;
  translate: 0 -50%;
  white-space: nowrap;
  background: var(--d-bubble);
  color: var(--d-on-bubble);
  border-radius: calc(var(--u) * 1);
  padding: calc(var(--u) * 8) calc(var(--u) * 10) calc(var(--u) * 6.5);
}

.rt-bub b {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: calc(var(--u) * 19);
  line-height: 1;
  letter-spacing: 0.02em;
}

.rt-bub span {
  display: block;
  margin-top: calc(var(--u) * 3);
  font-weight: 700;
  font-size: calc(var(--u) * 10);
  line-height: 1.1;
}

.rd-chip {
  position: absolute;
  left: calc(var(--u) * 8.4);
  top: calc(var(--u) * 512);
  background: var(--d-bubble);
  color: var(--d-on-bubble);
  border-radius: calc(var(--u) * 1);
  padding: calc(var(--u) * 5.5) calc(var(--u) * 7) calc(var(--u) * 4);
  font-weight: 700;
  font-size: calc(var(--u) * 11);
  line-height: 1.1;
  white-space: nowrap;
}

/* Without motion (and before it starts): The rent, page 2. */
.is-a,
.is-c {
  opacity: 0;
}

/* The close-up of the line in "Where you are": the reading drawing's
   right edge at about 1.7 times the hero's size, cropped from the page's left text margin
   to the line, without a phone. */
.closeup {
  container-type: inline-size;
  width: 100%;
  max-width: 540px;
  justify-self: center;
  border: 2px solid var(--rule-strong);
  border-radius: var(--radius);
}

.closeup-in {
  --u: calc(100cqw / 258);
  position: relative;
  aspect-ratio: 258 / 165;
  overflow: hidden;
  background: var(--d-desk);
  color: var(--d-text);
  font-family: var(--font-body);
}

.closeup-in .rd-doc {
  left: calc(var(--u) * -18);
  translate: 0 calc(var(--u) * -324.6);
}

/* The sentence wraps short so the bubble covers only the ends of grey bars. */
.closeup-in .pg-words {
  max-width: 54%;
}

.closeup-in .rt {
  right: 0;
  width: calc(var(--u) * 27);
}

/* =========================================================
   13. Drawings: Your PDFs, Pages, Contents
   ========================================================= */

/* --- Your PDFs ----------------------------------------------- */

.lib {
  position: absolute;
  top: calc(var(--u) * 30);
  left: 0;
  right: 0;
  bottom: 0;
  padding: calc(var(--u) * 20) calc(var(--u) * 11) 0;
}

.lib-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: calc(var(--u) * 25);
  line-height: 1;
  letter-spacing: 0.01em;
  padding-top: calc(var(--u) * 2);
}

.lib-open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 6);
  height: calc(var(--u) * 32);
  margin-top: calc(var(--u) * 14);
  background: var(--d-accent);
  color: var(--d-on-accent);
  border-radius: calc(var(--u) * 1);
  font-weight: 700;
  font-size: calc(var(--u) * 11.5);
  line-height: 1;
}

.lib-open .ic {
  width: calc(var(--u) * 12);
  height: calc(var(--u) * 12);
  margin-top: calc(var(--u) * -1.5);
}

.lib-open span {
  padding-top: calc(var(--u) * 1.5);
}

.lib-label {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 6);
  margin-top: calc(var(--u) * 18);
  color: var(--d-muted);
  font-weight: 700;
  font-size: calc(var(--u) * 9);
  line-height: 1;
}

.lib-label::after {
  content: "";
  flex: 1;
  height: calc(var(--u) * 2);
  background: var(--d-line);
}

.lib-rows {
  margin-top: calc(var(--u) * 8);
}

.lib-row {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 9);
  min-height: calc(var(--u) * 56);
  padding: calc(var(--u) * 7) calc(var(--u) * 8) calc(var(--u) * 7) calc(var(--u) * 8);
  background: var(--d-card);
  border-left: calc(var(--u) * 2.8) solid var(--d-line);
}

.lib-row + .lib-row {
  margin-top: calc(var(--u) * 3);
}

.lib-thumb {
  flex: none;
  width: calc(var(--u) * 30);
  height: calc(var(--u) * 40);
  padding: calc(var(--u) * 5) calc(var(--u) * 4);
  background: var(--d-page);
  border: calc(var(--u) * 0.6) solid var(--d-rule);
}

.lib-thumb i {
  display: block;
  height: calc(var(--u) * 1.6);
  margin-top: calc(var(--u) * 2.4);
  background: var(--d-ink);
}

.lib-thumb i:first-child {
  width: 70%;
  margin-top: 0;
  height: calc(var(--u) * 2.4);
  background: var(--d-ink-dark);
}

.lib-thumb i.s {
  width: 60%;
}

.lib-name {
  flex: 1;
  min-width: 0;
}

.lib-name b {
  display: block;
  font-size: calc(var(--u) * 11);
  line-height: 1.25;
}

.lib-name span {
  display: block;
  margin-top: calc(var(--u) * 2);
  color: var(--d-muted);
  font-weight: 700;
  font-size: calc(var(--u) * 8.6);
  line-height: 1.2;
}

.lib-row .ic {
  width: calc(var(--u) * 14);
  height: calc(var(--u) * 14);
  margin-right: calc(var(--u) * 2);
}

.lib-foot {
  margin-top: calc(var(--u) * 14);
  color: var(--d-muted);
  font-weight: 700;
  font-size: calc(var(--u) * 9.2);
  line-height: 1.2;
}

/* --- Pages (the organiser) ----------------------------------- */

.org {
  position: absolute;
  top: calc(var(--u) * 72);
  left: 0;
  right: 0;
  bottom: calc(var(--u) * 77);
  overflow: hidden;
  background: var(--d-desk);
}

.org-hint {
  padding: calc(var(--u) * 7) calc(var(--u) * 11) 0;
  color: var(--d-muted);
  font-size: calc(var(--u) * 10.4);
  line-height: 1.32;
}

/* A row of pages standing on a line, each with its numbered stop */
.org-row {
  position: absolute;
  left: 0;
  right: 0;
  height: calc(var(--u) * 131);
}

.org-row-1 {
  top: calc(var(--u) * 44);
}

.org-row-2 {
  top: calc(var(--u) * 182);
}

.org-row-3 {
  top: calc(var(--u) * 320);
}

.org-row::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--u) * 118);
  height: calc(var(--u) * 2.2);
  background: var(--d-line);
}

.org-pg {
  position: absolute;
  top: 0;
  width: calc(var(--u) * 72);
  height: calc(var(--u) * 102);
}

.org-pg:nth-child(1) {
  left: calc(var(--u) * 15.3);
}

.org-pg:nth-child(2) {
  left: calc(var(--u) * 104.5);
}

.org-pg:nth-child(3) {
  left: calc(var(--u) * 193.7);
}

.org-pg .pg {
  height: 100%;
  overflow: hidden;
  padding: calc(var(--u) * 9) calc(var(--u) * 8) 0;
  border: calc(var(--u) * 0.5) solid var(--d-rule);
}

.org-pg .pg i {
  height: calc(var(--u) * 1.8);
  margin-top: calc(var(--u) * 3);
}

.org-pg .pg i.h {
  width: 70%;
  height: calc(var(--u) * 3.4);
  margin-top: 0;
  margin-bottom: calc(var(--u) * 6);
  background: var(--d-ink-dark);
}

.org-pg .pg i.g {
  margin-top: calc(var(--u) * 8);
}

/* The page you were on carries an orange edge */
.org-pg.is-on .pg {
  border: calc(var(--u) * 2) solid var(--d-line);
}

.org-pg b {
  position: absolute;
  left: 50%;
  top: calc(var(--u) * 107.6);
  display: grid;
  place-items: center;
  width: calc(var(--u) * 23);
  height: calc(var(--u) * 23);
  margin-left: calc(var(--u) * -11.5);
  border-radius: 50%;
  border: calc(var(--u) * 2.4) solid var(--d-line);
  background: var(--d-card);
  font-weight: 700;
  font-size: calc(var(--u) * 9);
  line-height: 1;
  padding-top: calc(var(--u) * 1.2);
}

.obar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--u) * 77);
  display: flex;
  padding: calc(var(--u) * 9) calc(var(--u) * 4) 0;
  background: var(--d-screen);
  border-top: calc(var(--u) * 0.6) solid var(--d-rule);
}

.obar span {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 3);
  font-weight: 700;
  font-size: calc(var(--u) * 8.2);
  line-height: 1.15;
  text-align: center;
}

.obar .is-off {
  color: var(--d-off);
}

/* --- Contents, by night --------------------------------------- */

.tb-dim {
  background: #0A1A37;
  color: #8A96AC;
  border-bottom: 0;
}

.toc {
  position: absolute;
  top: calc(var(--u) * 72);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--d-card);
  border-top: calc(var(--u) * 2.1) solid var(--d-line);
}

.toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--u) * 38);
  padding: 0 calc(var(--u) * 11);
  border-bottom: calc(var(--u) * 0.6) solid var(--d-rule);
  font-weight: 700;
  font-size: calc(var(--u) * 12.3);
  line-height: 1;
}

.toc-head b {
  padding-top: calc(var(--u) * 1.5);
}

.toc-list {
  position: relative;
  padding-top: calc(var(--u) * 8);
}

.toc-list::before {
  content: "";
  position: absolute;
  left: calc(var(--u) * 12.6);
  width: calc(var(--u) * 2);
  top: calc(var(--u) * 27.2);
  bottom: calc(var(--u) * 19.2);
  background: var(--d-line);
}

.toc-list span {
  position: relative;
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 10);
  height: calc(var(--u) * 38.4);
  padding: calc(var(--u) * 1.5) calc(var(--u) * 11) 0 calc(var(--u) * 27.7);
  font-weight: 700;
  font-size: calc(var(--u) * 11);
  line-height: 1.2;
}

.toc-list span::before {
  content: "";
  position: absolute;
  left: calc(var(--u) * 9.7);
  top: calc(50% - var(--u) * 3.9);
  width: calc(var(--u) * 7.8);
  height: calc(var(--u) * 7.8);
  border-radius: 50%;
  border: calc(var(--u) * 1.6) solid var(--d-line);
  background: var(--d-card);
}

.toc-list .is-here::before {
  left: calc(var(--u) * 6.8);
  top: calc(50% - var(--u) * 6.8);
  width: calc(var(--u) * 13.6);
  height: calc(var(--u) * 13.6);
  border-width: calc(var(--u) * 3);
}

.toc-list em {
  margin-left: auto;
  font-style: normal;
  color: var(--d-muted);
  font-size: calc(var(--u) * 10);
}

/* =========================================================
   14. Motion
   CSS only. Everything below runs only for visitors who have not asked
   for less motion; without it every page is static and complete. Only
   the hero drawing loops.
   ========================================================= */

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  html {
    scroll-behavior: smooth;
  }

  a,
  .btn,
  .nav a::after,
  .card,
  .card::before,
  .linkcard,
  .linkcard-go,
  .feature {
    transition-duration: 180ms;
    transition-timing-function: var(--ease);
    transition-property: color, background-color, border-color, text-decoration-color, translate, transform;
  }

  /* First paint on the home page: the line draws downward, the title's stop arrives. */
  .home::before {
    animation: line-draw 850ms var(--ease) both;
  }

  .home .hero .stop::before {
    animation: stop-in 320ms var(--ease) 260ms both;
  }

  .home .hero .todo {
    animation: fade-in 320ms var(--ease) 120ms both;
  }

  /* A section heading you were sent to: its stop fills once, calmly. */
  .stop:target::before {
    animation: arrive 1400ms ease-out 250ms;
  }

  /* The hero drawing: the stop glides from heading to heading, the
     page moves under it, the bubble and the chip change with it. 12s. */
  .phone-hero .rt-cur {
    animation: cur-move 12s cubic-bezier(0.55, 0, 0.25, 1) infinite;
  }

  .phone-hero .rd-doc {
    animation: doc-move 12s cubic-bezier(0.55, 0, 0.25, 1) infinite;
  }

  .phone-hero .is-b {
    animation: show-b 12s linear infinite;
  }

  .phone-hero .is-c {
    animation: show-c 12s linear infinite;
  }

  .phone-hero .is-a {
    animation: show-a 12s linear infinite;
  }

  /* Sections ease in as they enter the view, where the browser can tie
     an animation to scrolling. Elsewhere they are simply there. */
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}

@keyframes line-draw {
  from {
    clip-path: inset(0 0 100% 0);
  }
  99% {
    clip-path: inset(0 0 calc(100% - 100svh) 0);
  }
  to {
    clip-path: none;
  }
}

@keyframes stop-in {
  from {
    opacity: 0;
    scale: 0.4;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 16px;
  }
}

@keyframes arrive {
  from {
    background: var(--line);
  }
}

/* B = The rent (page 2), C = Repairs (page 4), A = The property (page 1).
   Hold 3s, glide 1s: B, C, A, back to B. */
@keyframes cur-move {
  0%, 25% { translate: 0 0; }
  33.33%, 58.33% { translate: 0 calc(var(--u) * 88); }
  66.67%, 91.67% { translate: 0 calc(var(--u) * -44); }
  100% { translate: 0 0; }
}

@keyframes doc-move {
  0%, 25% { translate: 0 calc(var(--u) * -358); }
  33.33%, 58.33% { translate: 0 calc(var(--u) * -1074); }
  66.67%, 91.67% { translate: 0 0; }
  100% { translate: 0 calc(var(--u) * -358); }
}

@keyframes show-b {
  0%, 25% { opacity: 1; }
  28%, 97% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes show-c {
  0%, 30.5% { opacity: 0; }
  33.33%, 58.33% { opacity: 1; }
  61.33%, 100% { opacity: 0; }
}

@keyframes show-a {
  0%, 63.8% { opacity: 0; }
  66.67%, 91.67% { opacity: 1; }
  94.67%, 100% { opacity: 0; }
}

/* Belt and braces: with reduced motion nothing moves at all. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
