/*
  Components, v1. One block per component; each block's rules, states and
  markup are documented in design/components/<Component>/README.md and drawn
  in its preview.html. Every value comes from tokens.css.
  Components that change layout query their own container, so they read the
  same in a page and in a narrow preview frame. The header and footer span the
  screen and switch at 60rem. Components inside the page column switch at
  54rem of their own width: the 960px screen less its two 48px gutters, so on
  a page everything switches together with the type.
*/

/* ---------- Button ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--space-12);
  max-width: 100%;
  padding: var(--space-3) var(--space-5);
  border: var(--border-strong) solid transparent;
  border-radius: var(--radius-sm);
  font-size: var(--size-ui);
  line-height: var(--leading-ui);
  font-weight: var(--weight-medium);
  text-align: center;
  text-decoration: none;
  text-wrap: balance;
  transition-property: background-color, border-color, color;
  transition-duration: var(--duration-fast);
  transition-timing-function: var(--ease-out);
}

/* Press: a one-pixel drop by position, never by transform, so the label stays sharp. */
.button:active {
  position: relative;
  top: 1px;
}

.button--primary {
  background: var(--signature);
  color: var(--on-signature);
}

.button--primary:active {
  background: var(--signature-pressed);
}

.button--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}

.button--secondary:active {
  background: var(--wash);
}

.button--link {
  min-height: var(--tap);
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-align: start;
  transition-property: text-decoration-thickness;
}

@media (hover: hover) {
  .button--primary:hover {
    background: var(--signature-hover);
  }

  .button--primary:active {
    background: var(--signature-pressed);
  }

  .button--secondary:hover {
    background: var(--wash);
  }

  .button--link:hover {
    text-decoration-thickness: 2px;
  }
}

.button--wide {
  width: 100%;
}

/* Sending: the label says so; the button stays put and ignores a second press. */
.button[aria-disabled="true"] {
  cursor: progress;
}

/* ---------- Logo ----------
   "tinta." outlined from Libre Franklin 700 at 100 units to the em (master:
   site/img/logo.svg). Sized in em, so the text it sits in sets its size: its
   letters are that type's letters and its baseline sits on the line's. The
   letters take the text's colour; the full stop is the pen's blue (v3.2). */

.logo {
  display: inline-block;
  width: 2.309em;
  height: 0.752em;
  /* The a's overshoot reaches 0.01em below the baseline. */
  vertical-align: -0.01em;
  overflow: visible;
}

.logo__word {
  fill: currentColor;
}

.logo__stop {
  fill: var(--signature);
}

/* In a forced-colours mode (Windows high contrast) the full stop takes the
   letters' colour, so it stays visible on whatever ground the reader chose. */
@media (forced-colors: active) {
  .logo__stop {
    fill: currentColor;
  }
}

/* ---------- Wordmark: the logo in the menu bar, the link home ---------- */

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  min-width: var(--tap);
  /* Room for the focus ring on both sides, taken back by the margin so the
     logo's ink still starts on the page's edge. */
  padding-inline: var(--space-2);
  margin-inline: calc(-1 * var(--space-2));
  /* The title size: the logo is 69px wide on a phone and 92px from 960px. */
  font-size: var(--size-title);
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}

/* ---------- Nav ---------- */

/* The menu bar is a strip of heavy cotton paper laid across the top of the
   page, its lower edge torn by hand (RB's pick on HY-297, round 3, item 4: "the
   torn paper is the only one with real soul"). It stays at the top, so the
   page's words slide under the torn edge as you scroll. The paper is the page's
   own colour; the edge is a photograph from Paper with its own shadow, white
   paper on the light page and black paper with a pale tear on the dark one,
   never a flipped picture. One scale at every width: the tear sits on the bar's
   lower edge and its shadow reaches --strip-under below it. */
.site-header {
  --strip-art: 77px;
  --strip-under: 13px;
  --strip-edge: url("../img/nav/strip-edge-light.webp");
  container: header / inline-size;
  position: sticky;
  top: 0;
  /* Over everything the pages raise (3 at most), under the skip link (10). */
  z-index: 9;
}

[data-theme="dark"] .site-header {
  --strip-edge: url("../img/nav/strip-edge-dark.webp");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-header {
    --strip-edge: url("../img/nav/strip-edge-dark.webp");
  }
}

/* Paper down to the photographed band, however tall the open menu makes the
   bar, then the torn edge repeated across the width (it meets itself with no
   seam). */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 calc(-1 * var(--strip-under)) 0;
  z-index: -1;
  background:
    linear-gradient(var(--paper), var(--paper)) 0 0 / 100% calc(100% - var(--strip-art) + 30px) no-repeat,
    var(--strip-edge) right bottom / auto var(--strip-art) repeat-x;
  pointer-events: none;
}

/* The bar stays on screen, so whatever the page scrolls to (a link to a
   heading, the next control a keyboard reaches) stops below it. */
html {
  scroll-padding-top: calc(var(--space-16) + var(--space-6));
}

@media (min-width: 60rem) {
  html {
    scroll-padding-top: calc(var(--space-24) + var(--space-6));
  }
}

/* A link to a heading on the same page scrolls there instead of jumping, so
   the reader sees where they went (HY-455). js/theme.js sets the class once
   the page has loaded, so a page opened at a heading lands on it at once.
   Scripts that must hold the page still ask for an instant scroll. */
@media (prefers-reduced-motion: no-preference) {
  html.glides {
    scroll-behavior: smooth;
  }
}

/* The strip's one moment, laid on the page, settling a few pixels. It plays
   only where the page's head script asks for it with this class, on the first
   page of a visit (RB, HY-297: "play once first only"); everywhere else, and
   with reduced motion, the strip is simply there. */
html.strip-lay .site-header {
  animation: strip-lay 460ms cubic-bezier(0.2, 0, 0, 1) both;
}

@keyframes strip-lay {
  from { translate: 0 -14px; }
  to { translate: 0 0; }
}

.site-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--space-4);
}

/* The wordmark sets the bar's height, so opening the menu never moves it: a
   44px link with margins making 64. At the top of the page its focus ring
   then shows whole; a 64px link put the ring's top edge off the screen. */
.site-header__bar > .wordmark {
  margin-block: calc((var(--space-16) - var(--tap)) / 2);
  /* The logo is a mark, not words to read, so the browser's text size does not
     grow it here (the language's name still grows). At Very large text it took
     the room Menu needed and pushed it under the logo (HY-325). */
  font-size: min(var(--size-title), 30px);
}

/* The theme switch (js/main.js): one grey mark, the paper you would switch to,
   the moon on light paper and the sun on dark, darkening to ink on a pale disc
   when pointed at or pressed (RB on HY-435, 2026-11-13: "the navbar is way too
   busy"; back in the bar at every width on HY-451: "its a lot cleaner than
   what we had before and we have the space for it"). First of the bar's
   controls after the language, so it sits beside Menu on a phone and before
   the links on a computer, where the keyboard meets it in the order the eye
   does (decision 81). Hidden until the script can work it. */
.theme-switch {
  display: grid;
  place-items: center;
  min-width: var(--tap);
  min-height: var(--tap);
  /* Close to the language, the two read as one pair of controls; on a 360 phone
     the row then keeps room for Menu with a little to spare (it holds at 344). */
  margin-left: -10px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  color: var(--ink-muted);
  transition: color var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
}

.theme-switch[hidden] {
  display: none;
}

/* With script coming (js/theme.js marks the page before it paints), the
   switch holds its place, unseen, until js/main.js wires it and shows it, so
   the row does not move when it appears. */
.scripted .theme-switch[hidden] {
  display: grid;
  visibility: hidden;
}

/* Under 360px, or with the browser's larger text on a phone, the row's gaps
   close to 8px, so the logo, the language, the mark and Menu keep one row:
   measured from 320px at normal text and from 360px at Very large. The mark
   then sits flush with the language, its tap box touching, never overlapping
   (HY-325). */
@container header (width < 22.5rem) {
  .site-header__bar {
    column-gap: var(--space-2);
  }

  .theme-switch {
    margin-left: calc(-1 * var(--space-2));
  }
}

.theme-switch:active {
  color: var(--ink);
  background: var(--wash);
}

@media (hover: hover) {
  .theme-switch:hover {
    color: var(--ink);
    background: var(--wash);
  }
}

/* The mark turns (HY-454; RB: "the sun morphs into the moon or viceversa").
   One drawing holds both: a disc, the shadow that bites it into a crescent,
   and eight rays. Toward the sun, the shadow slides off up and to the right,
   the disc draws in to the sun's size and the rays grow out of it one after
   another round the dial; toward the moon the rays draw back in, the disc
   swells and the shadow slides over it from the same side. The mark follows
   the page's paper, not the button, so a dark page opens on the sun with
   nothing moving; it turns only when the paper changes. Inside the torn-page
   change it waits for the tear to reach the bar. */
.theme-mark {
  --turn-wait: 0ms;
  width: 15px;
  height: 15px;
  overflow: visible;
}

html:active-view-transition-type(theme) .theme-mark {
  --turn-wait: 240ms;
}

.theme-mark__disc {
  fill: currentColor;
  r: 7px;
  transition: r 300ms calc(var(--turn-wait) + 90ms) cubic-bezier(0.45, 0, 0.2, 1);
}

.theme-mark__shadow {
  fill: #000;
  cx: 13.34px;
  cy: 7.05px;
  transition:
    cx 320ms calc(var(--turn-wait) + 150ms) cubic-bezier(0, 0, 0.2, 1),
    cy 320ms calc(var(--turn-wait) + 150ms) cubic-bezier(0, 0, 0.2, 1);
}

/* The mask's black and white are the drawing's own, never a forced colour. */
.theme-mark mask * {
  forced-color-adjust: none;
}

.theme-mark__ray {
  --ray: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
  transition:
    stroke-dashoffset 150ms calc(var(--turn-wait) + (7 - var(--ray)) * 14ms) cubic-bezier(0.4, 0, 1, 1),
    opacity 1ms calc(var(--turn-wait) + 150ms + (7 - var(--ray)) * 14ms);
}

.theme-mark__ray:nth-of-type(2) { --ray: 1; }
.theme-mark__ray:nth-of-type(3) { --ray: 2; }
.theme-mark__ray:nth-of-type(4) { --ray: 3; }
.theme-mark__ray:nth-of-type(5) { --ray: 4; }
.theme-mark__ray:nth-of-type(6) { --ray: 5; }
.theme-mark__ray:nth-of-type(7) { --ray: 6; }
.theme-mark__ray:nth-of-type(8) { --ray: 7; }

[data-theme="dark"] .theme-mark__disc {
  r: 3.4px;
  transition: r 300ms calc(var(--turn-wait) + 70ms) cubic-bezier(0.45, 0, 0.2, 1);
}

[data-theme="dark"] .theme-mark__shadow {
  cx: 21px;
  cy: -1px;
  transition:
    cx 260ms var(--turn-wait) cubic-bezier(0.4, 0, 1, 1),
    cy 260ms var(--turn-wait) cubic-bezier(0.4, 0, 1, 1);
}

[data-theme="dark"] .theme-mark__ray {
  stroke-dashoffset: 0;
  opacity: 1;
  transition:
    stroke-dashoffset 240ms calc(var(--turn-wait) + 190ms + var(--ray) * 26ms) cubic-bezier(0, 0, 0.2, 1),
    opacity 1ms calc(var(--turn-wait) + 190ms + var(--ray) * 26ms);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-mark__disc {
    r: 3.4px;
    transition: r 300ms calc(var(--turn-wait) + 70ms) cubic-bezier(0.45, 0, 0.2, 1);
  }

  :root:not([data-theme="light"]) .theme-mark__shadow {
    cx: 21px;
    cy: -1px;
    transition:
      cx 260ms var(--turn-wait) cubic-bezier(0.4, 0, 1, 1),
      cy 260ms var(--turn-wait) cubic-bezier(0.4, 0, 1, 1);
  }

  :root:not([data-theme="light"]) .theme-mark__ray {
    stroke-dashoffset: 0;
    opacity: 1;
    transition:
      stroke-dashoffset 240ms calc(var(--turn-wait) + 190ms + var(--ray) * 26ms) cubic-bezier(0, 0, 0.2, 1),
      opacity 1ms calc(var(--turn-wait) + 190ms + var(--ray) * 26ms);
  }
}

/* With less motion the mark simply changes, all at once. */
@media (prefers-reduced-motion: reduce) {
  .theme-mark * {
    transition-property: none !important;
  }
}

/* The language switch (HY-295; the speech bubble retired by RB on HY-435,
   2026-11-13: "the navbar is way too busy ... less loud, more function over
   form"). Both languages printed as their two-letter codes, EN then ES on
   every page, and the one you are reading underlined in the pen's blue, the
   same mark as the page you are on; pointed at, the other one gets the
   menu's light pencil line, so the pair reads as a toggle with two sides
   (RB: "something is needed to indicate that it is a toggle"). A slash
   stands between the two, quieter than either (RB on HY-451, 2026-11-13:
   "combine it with the slash from B ... the slash to indicate that it is a
   toggle, and the underline + shade difference"). The whole pair is one
   link to the other language, named by that language's name; the slash is
   drawn by the stylesheet, so it is never read out. It works without the
   script, so it takes the push to the right itself and hands the theme
   switch none. */
.lang-switch {
  display: inline-flex;
  align-items: center;
  /* The pen line ends 2px past its word; the gap gives the slash those back. */
  gap: calc(var(--space-1) + 2px);
  min-width: var(--tap);
  min-height: var(--tap);
  margin-left: auto;
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--size-small);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease-out);
}

.lang-switch__code {
  position: relative;
  display: grid;
  grid-template-columns: max-content;
  /* Pointed at, the other language comes up to full ink as its pencil line
     is drawn, not a frame before it (HY-455). */
  transition: color 260ms var(--ease-pen);
}

/* The slash is the pair's middle item; the second code moves past it. */
.lang-switch::before {
  content: "/";
  content: "/" / "";
  order: 1;
  color: var(--ink-muted);
  font-weight: var(--weight-regular);
}

.lang-switch__code + .lang-switch__code {
  order: 2;
}

/* The bar's pen line, the same under the language in force and the page you
   are on (RB on HY-451, 2026-11-13: "yes, lets make the underline
   consistent"). It is the site's fountain pen (RB, 2026-11-14: "option 3
   (standard fountain pen) everywhere except the circles/loops"): a shallow
   arch, fine at both ends and full between, 1px before the word and 2px
   after it (RB: "it should have some extra to both sides, its just way too
   much particularly to the right of the shorthand EN"). One drawing,
   stretched to the word; its height is in em, so the nib grows with the
   text. It sits just under the letters (RB: "the underline should be closer
   to the word, too much padding"), up in the room the line box keeps for
   descenders. */
.lang-switch__code::after,
.nav__link::after {
  content: "";
  position: absolute;
  top: 100%;
  left: -0.0625em;
  right: -0.125em;
  height: 0.5em;
  margin-top: -0.36em;
  background: currentColor;
  mask: url("../img/nav/pen-fountain.svg") 0 0 / 100% 100% no-repeat;
  clip-path: inset(0 100% 0 0);
  pointer-events: none;
}

.lang-switch__code--now {
  color: var(--ink);
}

.lang-switch__code--now::after {
  clip-path: inset(0);
  background: var(--signature);
}

/* The pencil line of a link pointed at is drawn in; when the pointer leaves,
   it fades rather than vanishing in one frame, and only then is it rolled
   back up, unseen (HY-455). The pen lines of where you are never fade. */
.lang-switch__code:not(.lang-switch__code--now)::after,
.nav__link:not([aria-current="page"])::after {
  opacity: 0;
  transition: opacity 160ms var(--ease-out), clip-path 0s 160ms;
}

@media (hover: hover) {
  /* Not while the language turns: the pointer still rests on the switch then,
     and the pencil would fight the pen lifting off (HY-454). The :where keeps
     the rule in a browser that does not know the turn. */
  html:not(:where(:active-view-transition-type(language))) .lang-switch:hover .lang-switch__code:not(.lang-switch__code--now) {
    color: var(--ink);
  }

  html:not(:where(:active-view-transition-type(language))) .lang-switch:hover .lang-switch__code:not(.lang-switch__code--now)::after {
    clip-path: inset(0);
    background: var(--pencil);
    opacity: 1;
    transition: clip-path 260ms var(--ease-pen);
  }
}

.lang-switch:active {
  background: var(--wash);
}

/* Windows high contrast may drop the drawn lines: the system's underline marks
   the language in force instead. */
@media (forced-colors: active) {
  .lang-switch {
    color: LinkText;
  }

  .lang-switch__code--now {
    text-decoration: underline 2px;
    text-underline-offset: 0.3em;
  }

  .lang-switch__code::after {
    display: none;
  }
}

/* The page changing paper: once the theme switch runs inside the browser's
   page transition with the type "theme" (a change for the engineers, HY-297),
   the page is torn away from the top, the other paper uncovered behind a torn
   edge, the strip's own, that travels down the page. Until then the page
   simply changes. */
@property --strip-tear {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

html:active-view-transition-type(theme)::view-transition-old(root) {
  animation: none;
}

html:active-view-transition-type(theme)::view-transition-new(root) {
  mask-image: url("../img/nav/strip-edge-light.webp"), linear-gradient(#000, #000);
  mask-repeat: repeat-x, no-repeat;
  mask-size: auto 160px, 100% calc(max(0px, var(--strip-tear) * (100vh + 260px) - 230px));
  mask-position: 0 calc(var(--strip-tear) * (100vh + 260px) - 260px), 0 0;
  animation: strip-tear 820ms cubic-bezier(0.45, 0, 0.25, 1) both;
}

@keyframes strip-tear {
  from { --strip-tear: 0; }
  to { --strip-tear: 1; }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }
}

/* The language turn (HY-454): the language switch leads to the same page in
   the other language, and the page is carried across instead of blinking.
   js/theme.js lets only that link through and names each line of words and
   each picture the reader can see by its place in the page, the same on both
   pages, so each one travels from where it sat in one language to where it
   sits in the other. On the way its words go soft like wet ink and settle as
   the other language: the old words blur and fade first, the new ones come up
   out of the blur behind them, so two sets of words are never read through
   each other. The words keep their size while their box moves. The menu bar
   stays put; only its words and the pen line move (below). Distinct from the
   theme's torn page on purpose (RB: "language toggle and dark mode toggle cant
   have the same animation"). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

html:active-view-transition-type(language)::view-transition-group(*) {
  animation-duration: 620ms;
  animation-timing-function: cubic-bezier(0.45, 0, 0.2, 1);
}

html:active-view-transition-type(language)::view-transition-group(root) {
  animation-duration: 420ms;
}

html:active-view-transition-type(language)::view-transition-old(*.turn-words),
html:active-view-transition-type(language)::view-transition-new(*.turn-words) {
  inline-size: auto;
  block-size: auto;
}

html:active-view-transition-type(language)::view-transition-old(*.turn-words) {
  animation: turn-ink-out 260ms cubic-bezier(0.5, 0, 1, 1) both;
}

html:active-view-transition-type(language)::view-transition-new(*.turn-words) {
  animation: turn-ink-in 440ms 190ms cubic-bezier(0, 0, 0.2, 1) both;
}

@keyframes turn-ink-out {
  to { opacity: 0; filter: blur(8px); }
}

@keyframes turn-ink-in {
  from { opacity: 0; filter: blur(8px); }
}

/* The bar is the same paper in both languages, and on every page: the arriving
   one shows at once, and what differs in it moves on the page itself. The
   language you leave fades to the quieter shade, the one you arrive in comes
   up to full ink. */
html:active-view-transition-type(language, page)::view-transition-old(site-header) {
  animation: none;
  opacity: 0;
}

html:active-view-transition-type(language, page)::view-transition-new(site-header) {
  animation: none;
}

/* The language switch and the theme mark travel from their place in one
   language to their place in the other, with the menu's words (on a computer
   the Spanish words are longer and push them about 100px left); the arriving
   pair is shown from the start, so the pen lifts and lands as it travels. */
html:active-view-transition-type(language)::view-transition-old(lang-switch),
html:active-view-transition-type(language)::view-transition-old(theme-switch) {
  animation: none;
  opacity: 0;
}

html:active-view-transition-type(language)::view-transition-new(lang-switch),
html:active-view-transition-type(language)::view-transition-new(theme-switch) {
  animation: none;
}

/* The arriving page can be shown before js/main.js has revealed the theme
   switch (about one turn in four on home, which is long to read; on a page
   change, 11 of 20 at 1280 showed the bar without it for 2 or 3 frames,
   HY-455). During the turn and the page change the stylesheet shows it, so
   the mark is always in the bar and never blinks out; js/main.js wires it a
   moment later. */
html:active-view-transition-type(language, page) .theme-switch[hidden] {
  visibility: visible;
}

html:active-view-transition-type(language) .lang-switch__code {
  animation: turn-code-out 260ms var(--ease-out) both;
}

html:active-view-transition-type(language) .lang-switch__code--now {
  animation: turn-code-in 260ms 160ms var(--ease-out) both;
}

@keyframes turn-code-out {
  from { color: var(--ink); }
}

@keyframes turn-code-in {
  from { color: var(--ink-muted); }
}

/* The pen line moves the way a pen does: it lifts off the language you leave,
   the line going from its start toward its tip as the pen did, and is put down
   under the one you arrive in, drawn left to right. */
html:active-view-transition-type(language) .lang-switch__code:not(.lang-switch__code--now)::after {
  animation: turn-pen-lift 220ms cubic-bezier(0.55, 0, 0.7, 1) both;
}

html:active-view-transition-type(language) .lang-switch__code--now::after {
  animation: turn-pen-land 300ms 190ms var(--ease-pen) both;
}

@keyframes turn-pen-lift {
  from { clip-path: inset(0); background: var(--signature); opacity: 1; }
  to { clip-path: inset(0 0 0 100%); background: var(--signature); opacity: 1; }
}

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

/* The next sheet (HY-455; RB: "navigating the website needs to feel smooth and
   seamless, like a highly polished app product instead of a cheap website").
   Every other link of the site changes page as the next sheet of one folder:
   the torn strip stays put (js/theme.js names only the bar), the page under it
   lifts a little and lets go, and the next one settles up into its place. Quick,
   because it plays on every click; distinct from the language's wet ink and the
   theme's torn page. The browser's Back runs it the other way. */
html:active-view-transition-type(page)::view-transition {
  background: var(--paper);
}

html:active-view-transition-type(page)::view-transition-old(root) {
  animation: page-lift 170ms var(--ease-out) both;
}

html:active-view-transition-type(page)::view-transition-new(root) {
  animation: page-settle 340ms 100ms var(--ease-out) both;
}

html:active-view-transition-type(page):active-view-transition-type(back)::view-transition-old(root) {
  animation-name: page-lift-back;
}

html:active-view-transition-type(page):active-view-transition-type(back)::view-transition-new(root) {
  animation-name: page-settle-back;
}

/* Left from under an open phone menu or the film's dark room, the old page
   gives the bar no name (js/theme.js), so the new bar has no twin: it settles
   with the new sheet instead of showing first. */
html:active-view-transition-type(page)::view-transition-new(site-header):only-child {
  animation: page-settle 340ms 100ms var(--ease-out) both;
}

@keyframes page-lift {
  to { opacity: 0; translate: 0 -12px; }
}

@keyframes page-settle {
  from { opacity: 0; translate: 0 18px; }
}

@keyframes page-lift-back {
  to { opacity: 0; translate: 0 12px; }
}

@keyframes page-settle-back {
  from { opacity: 0; translate: 0 -18px; }
}

/* In the bar, the pen lifts off the page you leave and is put down under the
   one you chose, as it does between the two languages. */
html:active-view-transition-type(page) .nav__link--left::after {
  animation: turn-pen-lift 220ms cubic-bezier(0.55, 0, 0.7, 1) both;
}

html:active-view-transition-type(page) .nav__link[aria-current="page"]::after {
  animation: turn-pen-land 300ms 150ms var(--ease-pen) both;
}

/* The phone's Menu button: three lines drawn with the theme switch's pen, a
   little uneven; opening the menu draws an X over where they were, left to
   right, the way a hand crosses something out (RB's pick on HY-297: "the pen is
   perfect"). The words "Menu" and "Close" stay the button's text, written by
   js/main.js, so a screen reader hears them as before; they are only hidden
   from sight (a script's textContent would wipe any icon put inside, so the
   marks are the button's own ::before and ::after). Nothing plays on load: the
   lines come back by fading, and only the X is drawn. */
.nav-toggle {
  position: relative;
  width: var(--tap);
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 0;
  color: var(--ink);
  transition: background-color var(--duration-fast) var(--ease-out);
}

.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  inset: 10px;
  background: currentColor;
  mask: url("../img/nav/menu-lines.svg") center / 100% 100% no-repeat;
  pointer-events: none;
}

.nav-toggle::before {
  transition: opacity 160ms var(--ease-out);
}

.nav-toggle::after {
  mask-image: url("../img/nav/menu-close.svg");
  opacity: 0;
}

.nav-toggle[aria-expanded="true"]::before {
  opacity: 0;
  transition-duration: 60ms;
}

.nav-toggle[aria-expanded="true"]::after {
  opacity: 1;
  animation: menu-cross-out 300ms var(--ease-pen) both;
}

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

.nav-toggle:active {
  background: var(--wash);
}

@media (hover: hover) {
  .nav-toggle:hover {
    background: var(--wash);
  }
}

/* Windows high contrast keeps the marks in the button's text colour. */
@media (forced-colors: active) {
  .nav-toggle::before,
  .nav-toggle::after {
    background: ButtonText;
  }
}

/* The phone's menu unfolds instead of appearing (HY-455): the strip grows
   down to make room, easing the page down with it, and the links come in one
   after another from just under the bar, the way a folded sheet opens. It
   folds back up, quicker, when closed, and the X lifts off as it goes. Less
   motion opens it at once. */
@media (prefers-reduced-motion: no-preference) {
  .nav-toggle::after {
    transition: opacity 140ms var(--ease-out);
  }

  @container header (width < 60rem) {
    .site-header .nav {
      interpolate-size: allow-keywords;
      /* Clipped to the menu as it grows, with room for the focus rings at
         its edges. */
      clip-path: inset(calc(-1 * var(--space-2)) calc(-1 * var(--space-4)));
      transition:
        height 300ms var(--ease-out),
        padding-block 300ms var(--ease-out),
        border-top-color 300ms var(--ease-out),
        display 300ms allow-discrete;
    }

    .site-header[data-menu="closed"] .nav {
      height: 0;
      padding-block: 0;
      border-top-color: transparent;
      transition-duration: 220ms;
    }

    .site-header .nav__list > li {
      transition:
        opacity 240ms var(--ease-out),
        translate 300ms var(--ease-out);
    }

    /* The button keeps its own colour change when pointed at or pressed. */
    .site-header .nav__cta {
      transition:
        opacity 240ms var(--ease-out),
        translate 300ms var(--ease-out),
        background-color var(--duration-fast) var(--ease-out),
        border-color var(--duration-fast) var(--ease-out),
        color var(--duration-fast) var(--ease-out);
    }

    .site-header[data-menu="open"] .nav__list > li:nth-child(2) { transition-delay: 40ms; }
    .site-header[data-menu="open"] .nav__list > li:nth-child(3) { transition-delay: 80ms; }
    .site-header[data-menu="open"] .nav__cta { transition-delay: 120ms, 120ms, 0s, 0s, 0s; }

    .site-header[data-menu="closed"] :is(.nav__list > li, .nav__cta) {
      opacity: 0;
      transition-duration: 120ms;
    }

    @starting-style {
      .site-header[data-menu="open"] .nav {
        height: 0;
        padding-block: 0;
        border-top-color: transparent;
      }

      .site-header[data-menu="open"] :is(.nav__list > li, .nav__cta) {
        opacity: 0;
        translate: 0 -8px;
      }
    }
  }
}

/* Without the script the menu stays open and the toggle never shows. With it,
   the menu is closed from the first paint, before js/main.js sets data-menu,
   so the page never jumps up when the script arrives (HY-385). */
:root:not(.scripted) .site-header:not([data-menu]) .nav-toggle {
  display: none;
}

.nav {
  flex-basis: 100%;
  padding-block: var(--space-2) var(--space-6);
  border-top: var(--border-hairline) solid var(--rule);
}

.site-header[data-menu="closed"] .nav,
.scripted .site-header:not([data-menu]) .nav {
  display: none;
}

.nav__list {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-4);
}

/* One column as wide as the word, so the underline below can measure the word
   while the link still fills its row in the phone's menu. */
.nav__link {
  position: relative;
  display: grid;
  grid-template-columns: max-content;
  align-content: center;
  min-height: var(--space-12);
  min-width: var(--tap);
  font-size: var(--size-lede);
  font-weight: var(--weight-medium);
  color: var(--ink);
  text-decoration: none;
}

/* The page you are on is underlined by hand, with the bar's pen line (drawn
   with the language switch's, above), across the whole word (RB on HY-297:
   "just make it cover the whole word"). Placed in the word's column, it is
   exactly as wide as the word in either language. It is the pen's blue, the
   person's mark of where you are; pointed at, another link gets the same line
   drawn left to right in a light pencil, a preview, so the bar never shows
   two pages as current (RB on HY-325: "current tab and hovered option look
   the exact same"). */
.nav__link::after {
  grid-area: 1 / 1 / 2 / 2;
}

.nav__link[aria-current="page"]::after {
  clip-path: inset(0);
  background: var(--signature);
}

@media (hover: hover) {
  .nav__link:not([aria-current="page"]):hover::after {
    clip-path: inset(0);
    background: var(--pencil);
    opacity: 1;
    transition: clip-path 260ms var(--ease-pen);
  }
}

/* Windows high contrast may drop the drawn line: the system's own underline
   marks the page instead, solid where you are, dotted where you point. */
@media (forced-colors: active) {
  .nav__link[aria-current="page"],
  .nav__link:hover {
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.3em;
  }

  .nav__link:not([aria-current="page"]):hover {
    text-decoration-style: dotted;
  }

  .nav__link::after {
    display: none;
  }
}

.nav__cta {
  width: 100%;
}

/* From a large phone to a tablet the open menu is wide, and a button across
   all of it read as a form's (690px at 768). It keeps a button's width under
   the links instead, at least 18rem so the Spanish label sits with air. */
@container header (30rem <= width < 60rem) {
  .nav__cta {
    width: auto;
    min-width: 18rem;
  }
}

/* A phone held sideways can leave the open menu less height than it needs,
   and a bar that stays at the top never shows what hangs below the screen:
   under 283px the button at the menu's foot was cut off, under 233px out of
   reach. There the
   menu scrolls inside itself, under the row that stays, with the tear still in
   view below it. The scrolling box ends a step above the bar's foot, where the
   torn edge's deepest notch reaches (11px), so what scrolls slides under paper,
   never under the tear. The side room keeps the focus rings whole inside the
   box, which would cut them at its edges, and the scroll padding stops a
   control the keyboard reaches with air below it (HY-325). */
@media (max-height: 26rem) {
  @container header (width < 60rem) {
    .site-header[data-menu="open"] .nav {
      max-height: calc(100dvh - var(--space-16) - var(--strip-under) - var(--space-3));
      overflow-y: auto;
      overscroll-behavior: contain;
      padding-inline: var(--space-1);
      margin-inline: calc(-1 * var(--space-1));
      margin-bottom: var(--space-3);
      scroll-padding-block: var(--space-2) var(--space-6);
    }
  }
}

@container header (min-width: 60rem) {
  .site-header__bar {
    flex-wrap: nowrap;
    min-height: var(--space-24);
  }

  .site-header__bar > .wordmark {
    font-size: min(var(--size-title), 40px);
  }

  .nav-toggle,
  :root:not(.scripted) .site-header:not([data-menu]) .nav-toggle {
    display: none;
  }

  .theme-switch {
    margin-right: var(--space-4);
  }

  /* On a computer the row has room: the language's name a size up and set
     like the links, the theme mark larger. */
  .lang-switch {
    font-size: var(--size-ui);
    font-weight: var(--weight-regular);
  }

  .theme-mark {
    width: 18px;
    height: 18px;
  }

  .nav,
  .site-header[data-menu="closed"] .nav,
  .scripted .site-header:not([data-menu]) .nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    flex-basis: auto;
    padding: 0;
    border: 0;
  }

  .nav__list {
    flex-direction: row;
    gap: var(--space-6);
    margin: 0;
  }

  .nav__link {
    justify-content: center;
    min-height: var(--tap);
    font-size: var(--size-ui);
    font-weight: var(--weight-regular);
    white-space: nowrap;
  }

  .nav__cta {
    width: auto;
    white-space: nowrap;
  }
}

/* Spanish names its pages at length, and from 960px to about 1000px the row
   had 7px to spare: the bubble sat 15px from the logo and read as part of it.
   Until the row has room, its three gaps close by a step each (HY-325). */
@container header (60rem <= width < 64rem) {
  .theme-switch {
    margin-right: var(--space-2);
  }

  .nav,
  .site-header[data-menu="closed"] .nav,
  .scripted .site-header:not([data-menu]) .nav {
    gap: var(--space-6);
  }

  .nav__list {
    gap: var(--space-4);
  }
}

/* ---------- Footer: held to the light ----------
   RB's pick on HY-298 (2026-10-23): the foot of every page is the sheet held
   up to a lamp. Real laid paper from Paper, its laid and chain lines and its
   fibers lit from behind, and under the lead the studio's name in the paper
   itself, as a watermark: the mark that has always told an original from a
   copy. The dark page has its own sheet, black laid paper against a cool
   light, never the light sheet dimmed. The lamp comes on once, the first time
   the footer is in view (js/footer.js); without script or with less motion
   the sheet is simply lit. The words: the logo and the tagline with the year,
   the free call and its three ways in, and a map of every page's sections in
   the pages' own headings. Source and how the paper is made:
   design/components/Footer. */

.site-footer {
  container: footer / inline-size;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-top: var(--border-hairline) solid var(--rule);
  font-size: var(--size-small);
  line-height: var(--leading-small);
  /* --footer-tone is each sheet's average colour, measured on the picture:
     the tone its fibers fade into away from the lamp. */
  --footer-sheet: url("../img/footer/sheet-light.webp");
  --footer-tone: 240 236 231;
  --footer-mark-filter: brightness(1.065) saturate(0.8);
}

[data-theme="dark"] .site-footer {
  --footer-sheet: url("../img/footer/sheet-dark.webp");
  --footer-tone: 24 25 29;
  --footer-mark-filter: brightness(2.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-footer {
    --footer-sheet: url("../img/footer/sheet-dark.webp");
    --footer-tone: 24 25 29;
    --footer-mark-filter: brightness(2.6);
  }
}

/* The paper is only fetched once the footer is near (js/footer.js adds
   is-near); without script it comes with the page. */
.site-footer.is-near,
.site-footer.is-lit {
  --footer-paper: var(--footer-sheet);
}

@media (scripting: none) {
  .site-footer {
    --footer-paper: var(--footer-sheet);
  }
}

.site-footer__sheet,
.site-footer__paper,
.site-footer__mark {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.site-footer__paper,
.site-footer__mark {
  background: var(--footer-paper, none) center / cover;
}

/* The watermark is the same paper, only thinner: the same fibers, more light
   through them, its edges soft and rough as a wire mark leaves them. It lies
   in the empty space under the lead (RB's mockup), where no word is printed,
   as wide as the lead's column. Both sizes are measured on the footer
   (cqi), the column's width the same sum the grid makes. */
.site-footer__grid,
.site-footer__paper,
.site-footer__mark {
  --footer-mark-width: min(100cqi - 2 * var(--gutter), 22rem);
  --footer-mark-left: var(--gutter);
}

.site-footer__mark {
  filter: var(--footer-mark-filter);
  -webkit-mask: url("../img/footer/watermark.webp") left var(--footer-mark-left) bottom var(--space-8) / var(--footer-mark-width) auto no-repeat;
  mask: url("../img/footer/watermark.webp") left var(--footer-mark-left) bottom var(--space-8) / var(--footer-mark-width) auto no-repeat;
}

@container footer (min-width: 60rem) {
  .site-footer__grid,
  .site-footer__paper,
  .site-footer__mark {
    --footer-mark-width: calc((min(100cqi - 2 * var(--gutter), var(--page-max)) - var(--space-12)) / 3);
    --footer-mark-left: calc(max(0px, (100cqi - var(--page-max) - 2 * var(--gutter)) / 2) + var(--gutter));
  }
}

/* The lamp stands behind the watermark (HY-456). Around the name the sheet
   shows every fiber; further out less light comes through, the fibers fade
   into the sheet's own tone, and the words lie on calm paper (RB: "i quite
   like the texture but it makes the actual text links hard to read,
   especially in dark mode"). The fade is a wash of the sheet's average
   colour, so the sheet keeps its colour; the watermark's own layer keeps
   every fiber. The lamp's centre is the mark's centre (its picture is 1264
   by 455). Until the sheet is fetched --footer-paper is unset, so this
   declaration drops whole and the wash never shows on its own. */
.site-footer__paper {
  --footer-lamp-x: calc(var(--footer-mark-left) + var(--footer-mark-width) / 2);
  --footer-lamp-y: calc(100% - var(--space-8) - var(--footer-mark-width) * 455 / 1264 / 2);
  background:
    radial-gradient(ellipse 30rem 22rem at var(--footer-lamp-x) var(--footer-lamp-y), rgb(var(--footer-tone) / 0) 30%, rgb(var(--footer-tone) / 0.45) 60%, rgb(var(--footer-tone) / 0.6)),
    var(--footer-paper) center / cover;
}

/* Before the lamp comes on, the sheet is unseen and the footer is the page's
   own paper; while it comes on, its animations set what shows. */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .site-footer:not(.is-lit):not(.is-lighting) :is(.site-footer__paper, .site-footer__mark) {
    opacity: 0;
  }
}

/* The structure RB drew by hand in Paper (HY-321, "the reply slip"): one
   column says who we are and how to reach us (the logo, the free call, its
   three ways in, the watermark under them), the other is the site's map. On
   a phone everything stacks and the map keeps only its three page names; from
   960px of footer the lead and the watermark take four parts and the map
   eight. */
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "lead" "map" "art";
  gap: var(--space-8);
  padding-block: var(--space-12) var(--space-8);
}

@container footer (min-width: 60rem) {
  .site-footer__grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    grid-template-areas: "lead map" "art map";
    grid-template-rows: auto 1fr;
    gap: var(--space-6) var(--space-12);
  }
}

.site-footer__lead {
  grid-area: lead;
  display: grid;
  align-content: start;
  gap: var(--space-4);
}

@container footer (min-width: 60rem) {
  .site-footer__lead {
    gap: var(--space-6);
  }
}

/* The free call and its ways in read as one reply: the sentence, then the
   button's words on a line of their own, then the two quieter ways. */
.site-footer__reply {
  display: grid;
  gap: var(--space-1);
}

/* The logo and the tagline as one lockup at the heading size: the logo's
   letters and the regular tagline share a size and a baseline (v3, v3.2). It
   lives here and on the sharing image, nowhere else. The year sits on the
   same line, small and grey, instead of a row of its own (RB's mockup). */
.site-footer__lockup {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-4);
}

.site-footer__name {
  font-size: var(--size-heading);
}

/* Never "mostly / human": on a 320 phone at the largest text size the
   tagline moves whole to the line under the logo. */
.site-footer__tagline,
.site-footer__year {
  white-space: nowrap;
}

.site-footer__year {
  color: var(--ink-muted);
}

/* The small print on the year's line, in the year's grey and underlined,
   since the year beside it is not a link (HY-384). The line never breaks, so
   the two move under the logo together and "Privacy" never stands alone. Its
   box is a full tap high and centres the word on the line's baseline. */
.site-footer__legal {
  display: inline-flex;
  align-items: center;
  min-width: var(--tap);
  min-height: var(--tap);
  margin-inline-start: var(--space-2);
  color: var(--ink-muted);
  transition:
    color var(--duration-fast) var(--ease-out),
    text-decoration-thickness var(--duration-fast) var(--ease-out);
}

.site-footer__legal:hover {
  color: var(--ink);
}

/* The studio's core message at reading size, the largest words in the
   footer after the logo. It wraps where the line runs out, as RB's frame
   does ("free and / commits you to nothing."), never balanced. */
.site-footer__call {
  max-width: 24em;
  font-size: var(--size-lede);
  line-height: var(--leading-lede);
  text-wrap: pretty;
}

.site-footer__reach {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--size-ui);
  line-height: var(--leading-ui);
}

@container footer (min-width: 60rem) {
  .site-footer__reach {
    column-gap: var(--space-8);
  }
}

.site-footer__book {
  flex-basis: 100%;
}

/* Underlined at rest: these sit beside a sentence in the same ink, and the
   line is what says they can be pressed. */
.site-footer__reach a {
  display: inline-flex;
  align-items: center;
  min-width: var(--tap);
  min-height: var(--tap);
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

.site-footer__book a {
  font-weight: var(--weight-medium);
}

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

/* The watermark's space: as wide as the lead's column, as tall as the mark.
   On a phone it stands a little further from the page names than they stand
   from the call (RB's frame). */
.site-footer__art {
  grid-area: art;
  align-self: end;
  width: var(--footer-mark-width);
  aspect-ratio: 1264 / 455;
  margin-block-start: var(--space-2);
}

@container footer (min-width: 60rem) {
  .site-footer__art {
    margin-block-start: 0;
  }
}

/* On a phone the map is the three page names in one row; each page's own
   sections fold away (RB on HY-321: "hidden"). */
.site-footer__map {
  grid-area: map;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-6);
}

/* Each column as wide as its longest link and the space shared between them,
   so Services' long section names stay on one line wherever they fit. */
@container footer (min-width: 60rem) {
  .site-footer__map {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: space-between;
  }
}

.site-footer__head {
  margin: 0;
  font-size: var(--size-ui);
  line-height: var(--leading-ui);
  font-weight: var(--weight-medium);
  letter-spacing: 0;
}

.site-footer__col ul {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

@container footer (min-width: 60rem) {
  .site-footer__col ul {
    display: block;
  }
}

/* The underline is always there, in no colour, so pointing at a link brings
   its ink and its line up together instead of in one frame (HY-455). */
.site-footer__col a {
  display: inline-flex;
  align-items: center;
  min-width: var(--tap);
  min-height: var(--tap);
  color: var(--ink);
  text-decoration: underline transparent;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
  transition:
    color var(--duration-fast) var(--ease-out),
    text-decoration-color var(--duration-fast) var(--ease-out);
}

/* A link that wraps to two lines keeps air above and below it. */
.site-footer__col li a {
  padding-block: 0.3rem;
  color: var(--ink-muted);
}

.site-footer__col a:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

/* ---------- Section heading ---------- */

.section-heading {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 44rem;
}

.section-heading__intro {
  color: var(--ink-muted);
  font-size: var(--size-lede);
  line-height: var(--leading-lede);
  max-width: var(--measure);
}

/* The page's own opening: one plain sentence at display size. */
.section-heading--page {
  gap: var(--space-6);
  max-width: 52rem;
}

.section-heading--page .section-heading__intro {
  color: var(--ink);
}

.section-heading__actions {
  margin-top: var(--space-2);
}

/* ---------- Prose ---------- */

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

.prose > * + * {
  margin-top: var(--space-5);
}

.prose > h2 {
  margin-top: var(--space-16);
}

.prose > h3 {
  margin-top: var(--space-12);
}

.prose > h2 + *,
.prose > h3 + * {
  margin-top: var(--space-3);
}

/* Running lists only: a component's own list inside prose (a Fork, a Roster)
   carries a class and lays itself out. */
.prose ul:not([class]) {
  padding-left: 1.25em;
}

.prose ul:not([class]) > li + li {
  margin-top: var(--space-2);
}

.prose li::marker {
  color: var(--ink-muted);
}

/* A quote is a figure: the words in the blockquote, the person in the caption. */
.prose .quote blockquote,
.prose .quote figcaption {
  padding-left: var(--space-6);
}

.prose .quote blockquote {
  font-size: var(--size-lede);
  line-height: var(--leading-lede);
}

/* The opening quote mark hangs into the margin so the words align. */
.prose .quote blockquote p:first-child {
  text-indent: -0.42em;
}

.prose figure img {
  border-radius: var(--radius-md);
  outline: var(--border-hairline) solid var(--image-outline);
  outline-offset: -1px;
}

.prose figcaption,
.prose .note {
  margin-top: var(--space-2);
  font-size: var(--size-small);
  line-height: var(--leading-small);
  color: var(--ink-muted);
}

/* ---------- Status label ---------- */

.status {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  border: var(--border-hairline) solid var(--border-control);
  border-radius: var(--radius-sm);
  font-size: var(--size-small);
  line-height: var(--leading-small);
}

.status__key {
  flex: none;
  padding: var(--space-1) var(--space-2);
  border-right: var(--border-hairline) solid var(--border-control);
  color: var(--ink-muted);
}

.status__value {
  min-width: 0;
  padding: var(--space-1) var(--space-3);
  color: var(--ink);
  font-weight: var(--weight-medium);
}

/* ---------- Record: the dated fields of a receipt or a terms box ----------
   The Status label's two-part form, stacked into one box: each key in muted
   ink, its exact value beside it, the keys in one column so the values align.
   How it works dresses it as each step's stub; the thanks page's receipt is
   a carbon copy of its own (pages.css).
   In a narrow column the keys give way before the values (v2.4): "Numbers
   counted" folds onto two lines so that a date, which never breaks, always
   fits inside the box. Before, at 976 to 1024 and on a 320 phone, the dates
   ran up to 23px out through the right border. */

.record {
  display: grid;
  grid-template-columns: minmax(min-content, max-content) minmax(min-content, 1fr);
  width: fit-content;
  max-width: 100%;
  border: var(--border-hairline) solid var(--border-control);
  border-radius: var(--radius-sm);
  font-size: var(--size-small);
  line-height: var(--leading-small);
}

/* A receipt fills in from the script; until then it is not there at all. */
.record[hidden] {
  display: none;
}

.record__key {
  padding: var(--space-1) var(--space-2);
  border-right: var(--border-hairline) solid var(--border-control);
  color: var(--ink-muted);
}

.record__value {
  min-width: 0;
  padding: var(--space-1) var(--space-3);
  color: var(--ink);
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}

.record__key:not(:first-child),
.record__key:not(:first-child) + .record__value {
  border-top: var(--border-hairline) solid var(--border-control);
}

/* ---------- Fork: the two ways a call can end ----------
   Discovery ends one of two ways, and the page shows both side by side, as
   two entries opened by the rule. Each answer is set large; what follows it is
   body text. Paper heads each way: a crane is folded over the yes, the same
   sheet is creased and smoothed flat over the no (a Fold, below; HY-267 round
   2, in place of the painted tick and X). Switches with the page at 54rem of its section's
   width. */

.fork {
  display: grid;
  gap: var(--space-8);
}

.fork__way {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-5);
  border-top: var(--border-strong) solid var(--rule-strong);
}

.fork__answer {
  font-size: var(--size-title);
  line-height: var(--leading-title);
  letter-spacing: var(--tracking-title);
  font-weight: var(--weight-bold);
}

@container (min-width: 54rem) {
  .fork {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Roster: one human on top of the agents ----------
   The studio's masthead, in print: the human's name large with his one line,
   then the nine agents by role, small and alike. The hierarchy is the message.
   Names only: the agents' own lines live in the Cast on the About page. */

.roster {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding-top: var(--space-5);
  border-top: var(--border-strong) solid var(--rule-strong);
}

/* In running text the roster is a new object, so it stands further off. */
.prose > .roster {
  margin-top: var(--space-8);
}

.roster__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.roster__label {
  font-size: var(--size-small);
  line-height: var(--leading-small);
  color: var(--ink-muted);
}

.roster__name {
  font-size: var(--size-title);
  line-height: var(--leading-title);
  letter-spacing: var(--tracking-title);
  font-weight: var(--weight-bold);
}

.roster__agents {
  display: grid;
  gap: var(--space-2) var(--space-6);
  font-size: var(--size-ui);
  line-height: var(--leading-ui);
}

@container (min-width: 54rem) {
  .roster__agents {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Step list ---------- */

.steps {
  container: steps / inline-size;
}

.steps__list {
  display: grid;
  gap: var(--space-8);
}

.step {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  column-gap: var(--space-4);
  row-gap: var(--space-2);
  padding-top: var(--space-5);
  border-top: var(--border-strong) solid var(--rule-strong);
}

/* A step holds exactly two blocks beside its number: the title, then one body. */
.step__number {
  grid-row: 1 / span 2;
  font-size: var(--size-title);
  line-height: 1;
  font-weight: var(--weight-bold);
  font-variant-numeric: lining-nums tabular-nums;
}

.step__title {
  font-size: var(--size-heading);
  line-height: var(--leading-heading);
}

/* The human's promise inside a step: printed in ink, and underlined by his pen (a Mark). */
.step__promise {
  font-weight: var(--weight-medium);
}

@container steps (min-width: 54rem) {
  .steps__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-8);
  }

  .step {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    row-gap: var(--space-3);
  }

  .step__number {
    grid-row: auto;
    margin-bottom: var(--space-3);
  }
}

/* With large text on a phone the number's column left a title too little room
   ("Construcción" broke mid-word at 150% text on a 320 phone, HY-324), so the
   number stands above its title, as on a computer. 12em of the list's own text
   is never reached at the default size from 320 up. */
@container steps (max-width: 12em) {
  .step {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--space-3);
  }

  .step__number {
    grid-row: auto;
    margin-bottom: var(--space-3);
  }
}

/* ---------- Form ---------- */

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  max-width: 36rem;
}

.field {
  display: flex;
  flex-direction: column;
}

.field__label {
  font-size: var(--size-ui);
  line-height: var(--leading-ui);
  font-weight: var(--weight-medium);
}

.field__optional {
  font-weight: var(--weight-regular);
  color: var(--ink-muted);
}

.field__hint {
  margin-top: var(--space-1);
  font-size: var(--size-small);
  line-height: var(--leading-small);
  color: var(--ink-muted);
}

.field__input {
  width: 100%;
  min-height: var(--space-12);
  margin-top: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--field);
  border: var(--border-hairline) solid var(--border-control);
  border-radius: var(--radius-sm);
  font-size: var(--size-body);
  line-height: var(--leading-ui);
  color: var(--ink);
  transition: border-color var(--duration-fast) var(--ease-out);
}

textarea.field__input {
  min-height: 9rem;
  line-height: var(--leading-body);
  resize: vertical;
}

@media (hover: hover) {
  .field__input:hover {
    border-color: var(--ink);
  }
}

.field__input:focus-visible {
  border-color: var(--ink);
}

/* Only after a failed send: red border, red words, and the words say how to fix it. */
.field__input[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: inset 0 0 0 1px var(--error);
}

.field__error {
  margin-top: var(--space-2);
  font-size: var(--size-small);
  line-height: var(--leading-small);
  font-weight: var(--weight-medium);
  color: var(--error);
}

/* A field's error opens a line under it and comes up into it, and closes the
   same way once the field is right, so the fields below ease down and back
   instead of jumping (HY-455). The form's own "did not send" line under the
   button only comes up: nothing below it moves, and its focus ring must not
   be clipped. */
@media (prefers-reduced-motion: no-preference) {
  .field__error {
    transition-property: opacity, translate, display;
    transition-duration: 220ms;
    transition-timing-function: var(--ease-out);
    transition-behavior: allow-discrete;
  }

  .field__error:not(.contact-form__error) {
    interpolate-size: allow-keywords;
    overflow: clip;
    transition-property: opacity, translate, height, margin-top, display;
  }

  .field__error[hidden] {
    display: none;
    opacity: 0;
    translate: 0 -4px;
  }

  .field__error:not(.contact-form__error)[hidden] {
    height: 0;
    margin-top: 0;
  }

  @starting-style {
    .field__error:not([hidden]) {
      opacity: 0;
      translate: 0 -4px;
    }

    .field__error:not(.contact-form__error):not([hidden]) {
      height: 0;
      margin-top: 0;
    }
  }
}

/* A group of ticks or one-of choices (the order slip, HY-326): the fieldset
   reads as one field, with no box of its own, and each choice is a whole
   line a finger can press. On the slip (HY-327) each choice is a printed box
   or ring in ink, ticked by hand when chosen (`choice__mark`); the native
   input stays under it, so the keyboard, the screen reader and the form
   behave as before. */
.field--choices {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field--choices > .field__label {
  padding: 0;
}

/* The box sits on the first line of a label that wraps: 10px above and
   below a 24.75px line make the 44px tap floor. */
.choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-height: var(--tap);
  padding-block: 0.625rem;
  font-size: var(--size-body);
  line-height: var(--leading-ui);
  cursor: pointer;
}

.field--choices > .field__hint + .choice,
.field--choices > .field__label + .choice,
.field--choices > .field__hint + .choices,
.field--choices > .field__label + .choices {
  margin-top: var(--space-1);
}

/* The real input, unseen, exactly under the printed box it answers to. */
.choice input {
  position: absolute;
  top: 0.65rem;
  left: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  opacity: 0;
}

.choice__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  border: 1.5px solid var(--ink);
  border-radius: 1px;
}

.choice input[type="radio"] + .choice__mark {
  border-radius: 50%;
}

/* A tick written in ink: a stand-in until Lorenzo's ballpoint tick. */
.choice input[type="checkbox"]:checked + .choice__mark::after {
  content: "";
  width: 1.125rem;
  height: 1rem;
  background-color: var(--ink);
  -webkit-mask: url("../img/slip/tick.svg") center / contain no-repeat;
  mask: url("../img/slip/tick.svg") center / contain no-repeat;
}

.choice input[type="radio"]:checked + .choice__mark::after {
  content: "";
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background-color: var(--ink);
}

.choice input:focus-visible + .choice__mark {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: var(--focus-offset);
}

@media (hover: hover) {
  .choice:hover .choice__mark {
    background-color: var(--wash);
  }
}

@media (forced-colors: active) {
  .choice__mark {
    border-color: CanvasText;
  }

  .choice input:checked + .choice__mark::after {
    background-color: CanvasText;
    forced-color-adjust: none;
  }
}

/* Choices laid two to a row where the slip is wide enough (the budget). */
.choices {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: var(--space-8);
}

.form__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.form__note {
  font-size: var(--size-small);
  line-height: var(--leading-small);
  color: var(--ink-muted);
}

/* ---------- Callout: the signed promise ----------
   The promise is printed in ink; the human signs under it in blue. The words
   are the agents' print, the signature is the commitment. */

.callout {
  container: callout / inline-size;
  max-width: 52rem;
}

.callout__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-6);
}

.callout__title {
  font-size: var(--size-heading);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
}

/* A title of two sentences breaks between them, never inside one: on a phone
   home's read "Bring us the / problem. Or the idea." (HY-285). */
.callout__title > span {
  display: inline-block;
}

.callout__promise {
  max-width: 15em;
  color: var(--ink);
  font-size: var(--size-display);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  font-weight: var(--weight-bold);
  text-wrap: balance;
}

/* The signature sits under the last line and reaches up into the promise so
   it reads as signed, not captioned. */
.callout__signed {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  margin-top: calc(-1 * var(--space-4));
}

/* The final signature's tail takes almost half its width, so it is drawn a
   quarter wider than the stand-in was, to keep the word itself as tall. It
   never outgrows the column, which large text on a 320px phone would ask;
   the cap adds back the space it is pulled into on the left. */
.callout__signed .signature {
  width: 14rem;
  max-width: calc(100% + var(--space-2));
  margin-left: calc(-1 * var(--space-2));
}

.callout--poster .callout__signed .signature {
  width: 16rem;
}

.callout__body {
  max-width: var(--measure);
  font-size: var(--size-lede);
  line-height: var(--leading-lede);
}

/* With an action: the contact page, where the promise is the page's opening
   and booking is the next step. The button comes straight after the promise
   and the human signs under it, or beside it from 54rem, so the signature
   never pushes the booking below a phone's first screen (HY-235). */
.callout--action {
  max-width: none;
}

.callout--action .callout__signed {
  margin-top: 0;
}

.callout__action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

@container callout (min-width: 54rem) {
  .callout--action .callout__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "promise promise"
      "action signed";
    align-items: start;
    column-gap: var(--space-12);
    row-gap: var(--space-8);
  }

  .callout--action .callout__promise {
    grid-area: promise;
  }

  .callout--action .callout__action {
    grid-area: action;
  }

  .callout--action .callout__signed {
    grid-area: signed;
  }
}

/* Poster: the home page's closing promise, set as large as the system goes.
   On a wide container the body and button sit left, the signature right. */
.callout--poster {
  max-width: none;
}

.callout--poster .callout__promise {
  font-size: var(--size-poster);
  line-height: 1;
  letter-spacing: -0.035em;
  max-width: 11em;
}

/* On a wide container the signature moves up beside the promise's last line,
   as if signed right after the full stop; body and button stay left. Below
   72rem the last line reaches under the signature and it would cross "call.",
   so narrower containers keep the signature under the promise. */
@container callout (min-width: 72rem) {
  .callout--poster .callout__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title title"
      "promise promise"
      "body signed"
      "action signed";
    align-items: start;
    column-gap: var(--space-12);
    row-gap: var(--space-6);
  }

  .callout--poster .callout__title {
    grid-area: title;
  }

  .callout--poster .callout__promise {
    grid-area: promise;
  }

  .callout--poster .callout__signed {
    grid-area: signed;
    margin-top: calc(-0.9 * var(--size-poster));
    padding-right: var(--space-8);
  }

  .callout--poster .callout__signed .signature {
    width: 20rem;
  }

  .callout--poster .callout__body {
    grid-area: body;
  }

  .callout--poster .callout__inner > .button {
    grid-area: action;
    justify-self: start;
  }
}

/* ---------- Mark: the human's pen on a printed word ----------
   A ballpoint line drawn around or under one or two words. The svg stretches
   to the words it marks; non-scaling-stroke keeps the line one pen wide.
   An underline and the About arrow are the site's fountain pen, the menu
   bar's too (RB on HY-451, 2026-11-14: "option 3 (standard fountain pen)
   everywhere except the circles/loops"): a shallow arch, fine where the nib
   touches down and lifts, full between. It is a filled shape, since its
   width changes along it; the underline's box is 12px tall whatever the
   type, so the nib is the same weight under every word while the line
   stretches to the words. The loops keep their ballpoint. */

.mark {
  position: relative;
  white-space: nowrap;
}

/* A marked word and the punctuation after it are one unit (RB, 2026-11-14
   04:25: "a period should never be separated from the word it is next to").
   Where a line is too narrow for both, overflow-wrap would otherwise break
   between the mark and its full stop; the mark's ink still ends under the
   word, since the punctuation sits outside the mark. */
.mark-unit {
  white-space: nowrap;
}

.mark__ink {
  position: absolute;
  max-width: none;
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke: var(--signature);
  stroke-width: var(--pen-width);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mark__nib,
.about-words__arrow path {
  fill: var(--signature);
  stroke: none;
}

.mark__ink path {
  vector-effect: non-scaling-stroke;
}

/* A loop is drawn round the words with the room a hand gives them: its
   rounded corners clear the first and last letters, and the words sit loose
   inside it. It reaches past its own line into the leading above and below
   (RB, HY-265, 2026-10-14: the tight loop "feels weird and robotic"; v2.4 had
   kept it inside the line). The words' neighbours stand off far enough that
   the loop touches no letter on either side; the right side takes more room
   because a comma or a full stop sits flush after a word, where a space would
   have helped on the left. The pen is the same width at every size of type,
   so each side adds the pen's width to its share of the type. */
.mark--circle {
  margin-inline: calc(0.46em + var(--pen-width)) calc(0.58em + var(--pen-width));
}

.mark--circle .mark__ink {
  top: -0.32em;
  left: -0.64em;
  width: calc(100% + 1.28em);
  height: 1.82em;
}

/* The line's middle sits 0.028em under the words, where the ballpoint's sat. */
.mark--underline .mark__ink {
  left: -0.04em;
  bottom: calc(-0.028em - 6px);
  width: calc(100% + 0.1em);
  height: 12px;
}

/* The page's one orchestrated moment: the pen marks the words once, after the
   page has settled. --delay orders the strokes. A mark is revealed by a mask
   that follows the pen (round for a circle, left to right for an underline),
   because a dashed stroke cannot keep one pen width while it stretches.
   Without motion, or in a browser that cannot animate the mask, the marks are
   simply there: the drawn state is the default, the animation only leads to it. */
@property --pen-sweep {
  syntax: "<angle>";
  inherits: false;
  initial-value: 360deg;
}

@property --pen-reveal {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .mark--live.mark--circle .mark__ink {
    -webkit-mask: conic-gradient(from 72deg, transparent calc(360deg - var(--pen-sweep)), #000 0);
    mask: conic-gradient(from 72deg, transparent calc(360deg - var(--pen-sweep)), #000 0);
    animation: pen-circle var(--duration-draw) var(--ease-pen) var(--delay, 400ms) both;
  }

  .mark--live.mark--underline .mark__ink {
    -webkit-mask: linear-gradient(to right, #000 var(--pen-reveal), transparent 0);
    mask: linear-gradient(to right, #000 var(--pen-reveal), transparent 0);
    animation: pen-underline calc(var(--duration-draw) * 0.6) var(--ease-pen) var(--delay, 400ms) both;
  }
}

@keyframes pen-circle {
  from {
    --pen-sweep: 0deg;
  }

  to {
    --pen-sweep: 360deg;
  }
}

@keyframes pen-underline {
  from {
    --pen-reveal: 0%;
  }

  to {
    --pen-reveal: 100%;
  }
}

/* ---------- Ink: the hand's real ink, moved once ----------
   Real ink made in Paper (the ballpoint, the brush, a blot), keyed to one
   alpha layer per movement of the hand and filled here with the theme's ink
   or blue, so dark mode needs no second file (HY-267). The finished piece is
   the markup: an svg whose ".ink__still" holds one ".ink__layer" per stroke,
   each masked by its own layer of ink, and whose ".ink__pens" in defs hold
   the path the hand took for each, with when and how long (data-at,
   data-for). js/ink.js writes it live once when it is first in view, then
   leaves the still. Design notes: design/components/Ink. */

.ink {
  display: block;
  height: auto;
  max-width: 100%;
  overflow: visible;
  fill: var(--ink);
}

/* Before the hand moves, the paper is blank: nothing of a piece shows before
   it begins, not even a dot where the ink will land. Unseen, not hidden, so a
   screen reader still meets the signature's name. Without script, for less
   motion, or on paper, this never applies and the piece is simply there. */
@media screen and (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .ink:not(.is-written) > .ink__still {
    opacity: 0;
  }
}

/* ---------- Signature ----------
   The studio signs its promise with its own name, "tinta", in the blue
   ballpoint's real ink: Paper's re-ink of the final drawing (HY-245), split
   into its seven strokes in writing order, the word in four, the bar across
   both t's, the pen's flick at the bar's end, the dot of the i. The pen's
   path for each is the final vector drawing (img/signature.svg), laid over
   the ink. It names no person. Its slant and its climb to the right are in
   the drawing, so it is never rotated. Written live wherever it appears, never
   the plain vector (RB, HY-266). An Ink piece. */

.signature {
  width: 15rem;
  max-width: none;
  fill: var(--signature);
}

/* The one-line portrait (the avatar set's round five, frame 2), re-inked in
   ballpoint in Paper and drawn in the order a hand draws it, eight strokes,
   2.4 seconds. The person's own mark, so in the blue. An Ink piece. */
.portrait {
  width: 16rem;
  fill: var(--signature);
}

/* The blot: a drop of ink soaked flat into the paper, then wiped once, left
   to right, by a fingertip (Paper, two frames of one stain). An Ink piece. */
.blot {
  width: 100%;
  max-width: 20rem;
}

/* Contact's few lines: three lines drawn freehand with a black ballpoint,
   written left to right one after another, the pen lifting between them,
   beside "A few lines is enough" (under the form on a phone). Ink, never blue:
   the lines are the reader's, the blue stays the person's. An Ink piece. */
.lines {
  width: 100%;
  max-width: 18rem;
}

/* ---------- Machine: a real object drawn in ballpoint, played once ----------
   An object whose working is the studio's own (HY-273, HY-283): home's lamp
   beside "Always a human on the other end". Drawn with the Anatomy kit, its
   grey tones turned into a hand's ink (design/components/Machine; each
   figure's own style block holds its ink and its light). Shapes, not a
   photograph, so dark mode turns the ink pale on the dark page; the logo's
   full stop is the person's, the one blue. js/machine.js draws it in once
   when first in view. Decorative. */

/* Its column's width beside the words; under them, no wider than an object
   drawn on a page needs to be. */
.machine {
  margin: 0;
  width: 100%;
  max-width: 26rem;
}

.machine__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.machine__type,
.machine__print {
  fill: var(--ink);
}

.machine__stop {
  fill: var(--signature);
}

.machine__stop rect {
  transform-box: fill-box;
  transform-origin: center;
}

/* The workshop bench has no cap on its width, and on a phone it runs to the
   screen's edges: the drawing is long, and every bit of width is detail. On
   home it stands in the first folder, which sets its size (folders.css). Once
   it has played, hover or a tap takes it apart, so from then it shows it can
   be touched. */
.machine--bench {
  max-width: none;
  -webkit-tap-highlight-color: transparent;
}

.machine--bench.is-still {
  cursor: pointer;
}

@media (max-width: 40rem) {
  .machine--bench {
    width: calc(100% + 2 * var(--gutter));
    margin-inline: calc(-1 * var(--gutter));
  }
}

/* Before it is drawn the paper is blank. Without script, for less motion, or
   on paper, this never applies and the drawing is simply there. */
@media screen and (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .machine:not(.is-played) > .machine__svg {
    opacity: 0;
  }
}

/* ---------- Plate: a photograph of ink and paper ----------
   A picture made in Paper of the brand's own materials: the name pressed into
   paper, the pen's line seen close. Each has its own dark picture made in
   Paper (charcoal card, pale gel on black paper), never an inverted one, so a
   dark page never shows a white square. Decorative: the words beside it carry
   the meaning. */

.plate {
  position: relative;
  width: 100%;
  max-width: 20rem;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.plate img {
  display: block;
  width: 100%;
  height: auto;
}

.plate--square img {
  aspect-ratio: 1;
  object-fit: cover;
}

/* The hairline every image frame carries. */
.plate::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 var(--border-hairline) var(--image-outline);
  pointer-events: none;
}

/* ---------- Placeholder: the photocopy ----------
   Holds the place of an image that does not exist yet. The shape of what is
   coming, printed in halftone dots on white paper, the way a copier drops the
   light tones; a printed note that says what goes there and what never will;
   the real caption. When the image arrives, it replaces the frame. Until v2.3
   a pale dot screen filled the whole frame, and a stranger on a phone read the
   grey block as a loading skeleton (HY-235). */

.placeholder {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.placeholder__frame {
  position: relative;
  aspect-ratio: var(--ratio, 4 / 3);
  overflow: hidden;
  border-radius: var(--radius-md);
  outline: var(--border-hairline) solid var(--image-outline);
  outline-offset: -1px;
}

/* The shape of the coming image, in denser dots, cut by the art's mask. */
.placeholder__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--halftone-strong) 1.6px, transparent 2.1px);
  background-size: 6px 6px;
  -webkit-mask: var(--art) center / contain no-repeat;
  mask: var(--art) center / contain no-repeat;
}

.placeholder__frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The note, in the Status label's two-part form: what is missing, then the
   printed sentence that makes the gap deliberate ("A real photograph goes
   here, not a generated one."). It wraps inside the frame's margin. */
.placeholder__label {
  position: absolute;
  left: var(--space-3);
  top: var(--space-3);
  max-width: calc(100% - 2 * var(--space-3));
  background: var(--paper);
}

.placeholder__caption {
  font-size: var(--size-small);
  line-height: var(--leading-small);
  color: var(--ink-muted);
}

/* The one photocopy nothing replaces: the 404's copy of a page whose header and
   footer printed and whose content is missing. Its label says "Missing". */
.placeholder--page {
  --ratio: 4 / 5;
  --art: url("../img/placeholders/page.svg");
}

/* The paperwork a business still runs on, photocopied: a printed spreadsheet
   beside "Anything your business runs on" on the home page (HY-267). */
.placeholder--sheet {
  --ratio: 4 / 5;
  --art: url("../img/placeholders/sheet.svg");
  max-width: 20rem;
}

/* ---------- Copier: the photocopy, printed once ----------
   A Placeholder's photocopy printed the way a real copier prints it, by
   js/copier.js: the light runs down the glass once, 1.1 seconds, and the copy
   comes out behind it, with toner specks, a scratch down the drum, the dark
   edge where the lid did not close, the sheet a fraction off square. Without
   script the frame keeps its plain halftone; with less motion the copy is
   simply there. RB, HY-261: "love the copier". */

.copier__copy {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.copier__light {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 18px;
  translate: 0 -18px;
  opacity: 0;
  background-image: radial-gradient(circle, var(--halftone-strong) 1.1px, transparent 1.6px);
  background-size: 6px 6px;
  border-bottom: var(--border-strong) solid var(--ink);
  pointer-events: none;
}

/* Once the copier has printed its copy, the plain dots give way to it. Gone,
   not faded: with less motion every change of opacity becomes a transition. */
.copier.has-copy .placeholder__frame::before {
  content: none;
}

/* Before the light passes, the glass shows nothing: no plain dots, no copy. */
@media screen and (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .copier:not(.is-written) .placeholder__frame::before {
    opacity: 0;
  }

  .copier:not(.is-written) .copier__copy {
    clip-path: inset(0 0 100% 0);
  }
}

/* ---------- Taken down: a page torn off a cork board ----------
   The 404's picture (HY-267): a cork board, four pins and the torn scraps of a
   page under them, the page gone. One photograph from Paper, the same in light
   and dark (a board is a board). With script and motion the page is laid back
   over it and falls once when first in view (js/taken-down.js); the board is
   unseen until the page has arrived, so it is never seen bare first.
   Decorative: the heading beside it says what happened. */

.taken-down {
  position: relative;
  aspect-ratio: 840 / 1125;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin: 0;
}

.taken-down img {
  display: block;
  width: 100%;
  height: 100%;
}

.taken-down__page {
  position: absolute;
  inset: 0;
}

.taken-down.is-pinned:not(.is-ready) .taken-down__board {
  visibility: hidden;
}

/* The hairline every image frame carries. */
.taken-down::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 var(--border-hairline) var(--image-outline);
  pointer-events: none;
}

/* ---------- Avatar: the lead's picture ----------
   The person a client talks to on calls and in chat, as their profile picture
   (v3): a pixel bust in glasses and a jacket, drawn in the pen's blue on the paper. The
   only person on the site, and the only picture that is not a placeholder.
   32 squares wide; it scales by whole squares only. */

.avatar {
  display: block;
  fill: var(--signature);
  shape-rendering: crispEdges;
}

/* ---------- Pixel cursor: the agents' arrow ----------
   The agents are drawn as the classic arrow cursor, in whole squares (About's
   desk, How it works' drawings). The art is one <symbol> per page, drawn
   through <use>; the clones take their colour from the element that draws
   them, so these rules match the symbol's own paths. */

.px-body {
  fill: currentColor;
}

.px-edge {
  fill: var(--paper);
}

/* ---------- Hero ----------
   The page's opening. The position in print, marked by the human's pen; beside
   it a picture: on the home page the film, on the 404 page the cork board.
   About opens on its own piece (css/about.css). */

.hero {
  container: hero / inline-size;
}

/* The hero starts closer to the nav than other sections, so the picture beside
   the words fits the first screen of a laptop. */
.hero.l-section {
  padding-top: var(--space-12);
}

/* One column as wide as the page on a phone, never wider (HY-324: with large
   text the heading's longest word widened it, and the page with it). */
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-12);
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: 44rem;
}

.hero__lede {
  max-width: var(--measure);
  font-size: var(--size-lede);
  line-height: var(--leading-lede);
}

.hero__actions {
  margin-top: var(--space-2);
}

.hero__note {
  margin-top: var(--space-3);
  font-size: var(--size-small);
  line-height: var(--leading-small);
  color: var(--ink-muted);
  text-wrap: balance;
}

/* Its two sentences break between them, and one too long for the line splits
   evenly: "owe nothing." stood alone under a full line at 360 and at 1280
   (HY-285). */
.hero__note > span {
  display: inline-block;
}

/* The picture beside the words: the 404 page's cork board. */
.hero__media {
  width: 100%;
  max-width: 26rem;
}

/* From a tablet's width the picture already stands beside the words, as on a
   computer: stacked at 768 it was a narrow column on the left with half the
   screen empty beside it, and pushed the folders a screen further down
   (HY-384). */
@container hero (min-width: 40rem) {
  .hero__inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: start;
    gap: var(--space-8);
  }

  .hero__media {
    justify-self: end;
  }
}

@container hero (min-width: 54rem) {
  .hero__inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: start;
    gap: var(--space-12);
  }

  .hero__text {
    padding-top: var(--space-8);
  }

  .hero__media {
    justify-self: end;
  }
}

/* ---------- Pen macro: the home hero's picture ----------
   "Full attention" (HY-271): the pen's line under "name", photographed close
   enough to see the ink sit in the groove the ball pressed into the paper.
   Made in Paper, in light and in dark (pale gel on black paper, the pen's
   light blue). No caption: the heading is its caption; its spoken name is
   the still's alt. The finished picture is the default and the still.
   Retired from home when the film took the hero (Lorenzo, HY-447: the pen's
   underline and arrow now play that moment beside the film); its pass,
   hero-motion.js, is gone, and these styles stay only for the design
   previews (design/components/Hero), so the picture can come back. */
.pen-macro {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-md);
  background-position: center;
  background-size: cover;
}

.pen-macro__still,
.pen-macro__live {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
}

.pen-macro__still {
  object-fit: cover;
  transform: scale(1.05);
}

/* The hairline every image frame carries, above the moving picture. */
.pen-macro::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 0 0 var(--border-hairline) var(--image-outline);
  pointer-events: none;
}

/* Before the pen passes, the paper is blank: nothing of the line may show
   before the hand moves, so the finished picture waits unseen from the first
   paint. Unseen, not hidden, so a screen reader still meets its name during
   the pass. Without script, or on paper, this never applies and the still is
   simply there. */
@media screen and (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .pen-macro:not(.is-written) {
    background-image: url("../img/hero/full-attention-start-light.webp");
  }

  .pen-macro:not(.is-written) .pen-macro__still {
    opacity: 0;
  }

  [data-theme="dark"] .pen-macro:not(.is-written) {
    background-image: url("../img/hero/full-attention-start-dark.webp");
  }
}

@media screen and (scripting: enabled) and (prefers-reduced-motion: no-preference) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pen-macro:not(.is-written) {
    background-image: url("../img/hero/full-attention-start-dark.webp");
  }
}

/* ---------- Open Graph image frame (1200 by 630) ----------
   A fixed canvas, so its three type sizes are fixed pixels and live only here. */

.og {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 1200px;
  height: 630px;
  padding: var(--space-16);
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
}

.og__mark {
  font-size: 30px;
  line-height: 1;
  letter-spacing: var(--tracking-title);
}

.og__statement {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  max-width: 15em;
  font-size: 76px;
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  font-weight: var(--weight-bold);
  text-wrap: balance;
}

/* Titles over about 60 characters step down a size and may take a fourth line. */
.og--long .og__statement {
  -webkit-line-clamp: 4;
  max-width: 18em;
  font-size: 60px;
}

.og__promise {
  font-size: 30px;
  line-height: 1.2;
  font-weight: var(--weight-medium);
  color: var(--ink);
}

/* ---------- Film: the intro film's ways in, its player and the corner film
   (HY-446, RB's picks on HY-435) ----------
   The way in is a link to the film's web copy, never a video: the player
   (js/film.js) opens over the page only after the click, and nothing of the
   film loads before it. The picture is the film's own first frame (the desk
   and the call; the last frame gave the ending away), the play mark the
   film's stamp, and on home the pen points at it (Lorenzo, HY-447). */

.film-slot {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Wren's line for the film sits under its picture, understated: the
   picture does the asking (RB, HY-435, 2026-11-13 06:12: "any text should go
   BELOW the video, not above ... more understated"). */
.film__line {
  max-width: 34em;
  font-size: var(--size-ui);
  line-height: var(--leading-ui);
  text-wrap: balance;
}

.film {
  position: relative;
  display: block;
  border-radius: var(--radius-md);
  color: var(--ink);
}

.film__still {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: inherit;
}

.film::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 var(--border-hairline) var(--image-outline);
  pointer-events: none;
}

/* The film's stamp (Lorenzo, HY-447): the play mark is a rubber stamp
   pressed onto the picture in the pen's blue. The ink is a real impression
   made in Paper (img/film/stamp.webp, board "HY-447, the film's play stamp
   and the pointing hand"), used as a mask so it takes each theme's blue; the
   triangle knocked out of it is paper, laid under the ink, so it reads on any
   part of the picture. 16% of the picture's width, 60 to 96px, centred. The
   small ways in carry the same stamp at 24px. */
.film__play,
.film-link__play {
  aspect-ratio: 1;
}

.film__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(3.75rem, 16%, 6rem);
  transform: translate(-50%, -50%);
}

.film__play::before,
.film__play::after,
.film-link__play::before,
.film-link__play::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* The paper in the stamp's knocked-out triangle, a hair larger than the
   hole so the ink's own edge draws the triangle. */
.film__play::before,
.film-link__play::before {
  background: var(--on-signature);
  clip-path: polygon(29.5% 22.5%, 76.5% 49.5%, 32% 76.5%);
}

.film__play::after,
.film-link__play::after {
  background: var(--signature);
  -webkit-mask: url("../img/film/stamp.webp") center / contain no-repeat;
  mask: url("../img/film/stamp.webp") center / contain no-repeat;
  transition: background-color var(--duration-fast) var(--ease-out);
}

.film:hover .film__play::after,
.film-link:hover .film-link__play::after {
  background: var(--signature-hover);
}

.film:active .film__play::after,
.film-link:active .film-link__play::after {
  background: var(--signature-pressed);
}

/* The press: the stamp comes down a little larger and turned, lands flat and
   stays, once, the first time the picture is well in view (js/film-art.js;
   on home, after the pen's arrow). Without script, or with less motion, the
   stamp is simply there. */
@media screen and (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .film__play {
    transition: opacity 90ms linear, transform 200ms cubic-bezier(0.3, 0, 0.1, 1);
  }

  .film:not(.is-stamped) .film__play {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.2) rotate(-5deg);
  }

  .film.is-stamped:hover .film__play {
    transform: translate(-50%, -50%) scale(1.04);
  }
}

/* The pen's arrow on home, from the studio line to the film (js/film-art.js
   draws it from the words as they fall, HY-460): the pen's blue ink in a
   broad nib's shapes, revealed as the pen moves. */
.hero__inner:has(.film) {
  position: relative;
}

.film-pointer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.film-pointer__ink {
  fill: var(--signature);
}

.film:focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: 4px;
}

/* While the film plays in its place on the page, the picture steps aside. */
.film-slot.is-playing > .film {
  display: none;
}

/* The small ways in: a line of words after a small blue disc. */
.film-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: var(--tap);
  min-height: var(--tap);
  color: var(--ink);
  font-size: var(--size-ui);
  font-weight: var(--weight-medium);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.film-link__play {
  position: relative;
  flex: none;
  width: 1.5rem;
}

.film-link:focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: var(--focus-offset);
}

/* The player: the film over a darkened page, as wide as the window allows
   with room for its bar, never wider than 80rem. The screening room is dark
   in both themes. */
html:has(.film-player[open]) {
  overflow: hidden;
}

.film-player {
  width: min(100vw - 2 * var(--gutter), (100svh - 9rem) * 16 / 9, 80rem);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #E8E9EC;
  overflow: visible;
}

.film-player::backdrop {
  background: rgba(12, 13, 15, 0.92);
}

/* The film moving (HY-455). On a computer js/film.js carries the film as one
   picture in a page transition of the type "film": from the picture pressed
   on the page into the player while the room goes dark, and back into its
   place, or into the corner, while the room comes up. */
html:active-view-transition-type(film)::view-transition-group(film-screen) {
  animation-duration: 440ms;
  animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

html:active-view-transition-type(film)::view-transition-old(film-screen),
html:active-view-transition-type(film)::view-transition-new(film-screen) {
  height: 100%;
  animation-duration: 440ms;
}

html:active-view-transition-type(film)::view-transition-old(root),
html:active-view-transition-type(film)::view-transition-new(root) {
  animation-duration: 320ms;
}

/* Where the browser cannot carry it (a phone before its full screen, an older
   browser), the room goes dark and the player comes up instead of appearing,
   and both fade away on close. Never while the film is being carried
   (data-moving), or the picture would show twice. The page keeps its
   scrollbar's room while the player holds it still, so nothing beneath
   shifts sideways on a computer with a classic scrollbar. */
html:has(.film-player[open]) {
  scrollbar-gutter: stable;
}

@media (prefers-reduced-motion: no-preference) {
  .film-player,
  .film-player::backdrop {
    transition:
      opacity 260ms var(--ease-out),
      display 260ms allow-discrete,
      overlay 260ms allow-discrete;
    opacity: 0;
  }

  .film-player[open],
  .film-player[open]::backdrop {
    opacity: 1;
  }

  .film-player[data-moving],
  .film-player[data-moving]::backdrop {
    transition: none;
  }

  @starting-style {
    .film-player[open],
    .film-player[open]::backdrop {
      opacity: 0;
    }
  }

  /* The end card's words come up under the last frame. */
  .film-player__end {
    transition: opacity 360ms 120ms var(--ease-out), translate 360ms 120ms var(--ease-out);
  }

  @starting-style {
    .film-player__end {
      opacity: 0;
      translate: 0 8px;
    }
  }
}

.film-player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  background: #000;
}

.film-player__bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

/* The film's marks (Lorenzo, HY-447): drawn the way the pen draws, round-
   ended strokes with a hand's slight lean, small, in the colour of what is
   around them, never on a disc (RB, 2026-11-13 06:17: "small and
   understated, easy to ignore but still present"). The arrow down into the
   corner keeps watching; watching it big is two arrows pulling apart, the
   mark everyone knows for full screen, drawn in the same hand (RB, HY-447). */
.film-glyph {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* "Watch while you scroll": words and the arrow into the corner, quiet on
   the dark room, the paper's colour only when pointed at. One line always
   (RB, HY-447: the longer words wrapped beside the X on a phone). */
.film-player__keep {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  gap: var(--space-2);
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #E8E9EC;
  font-size: var(--size-ui);
  font-weight: var(--weight-medium);
  transition: background-color var(--duration-fast) var(--ease-out);
}

.film-player__keep:hover {
  background: rgba(232, 233, 236, 0.12);
}

.film-player :focus-visible {
  outline: var(--focus-width) solid #E8E9EC;
  outline-offset: var(--focus-offset);
}

/* When the film ends: Wren's two words and the call, under its last frame. */
.film-player__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--space-4);
}

.film-player__end[hidden] {
  display: none;
}

.film-player__turn {
  font-size: var(--size-heading);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  font-weight: var(--weight-bold);
}

.film-player__again {
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* The X: the pen's two strokes in a 44px circle, named for a screen reader
   by its label (RB, 2026-11-13: "swap it for a more standard 'x' button"). */
.film-x {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: var(--tap);
  min-width: var(--tap);
  height: var(--tap);
  min-height: var(--tap);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}

.film-player .film-x:hover {
  background: rgba(232, 233, 236, 0.12);
}

/* The film playing on the page, in its place; once that place scrolls away
   it rides in the screen's lower right corner. The player's own controls
   stay on it, and its X sits in its top right corner: a small plain mark,
   no disc behind it (RB, 2026-11-13 06:17, on the corner film on a phone:
   "the close and fullscreen buttons are MASSIVE ... solid circles is def the
   wrong direction"), with a soft shadow so it reads on any frame of the
   film. The touch area stays 44px; the mark is 12px, 14px from a tablet's
   width. Its own marks replace the browser's controls here (HY-447). */
.film-mini {
  position: relative;
  container: film-mini / inline-size;
}

.film-mini[hidden] {
  display: none;
}

.film-mini video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  background: #000;
}

.film-mini__screen {
  cursor: pointer;
}

/* The corner film's three marks: pause at the lower left, watch it big at
   the lower right, the X at the top right. Each is a 44px touch area holding
   a 12px mark (14px from a tablet's width), white with a soft shadow so it
   reads on any frame. */
.film-mini .film-x,
.film-mark {
  position: absolute;
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #FFFFFF;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.9));
}

.film-mini .film-x {
  top: 0;
  right: 0;
}

.film-mini__toggle {
  bottom: 0;
  left: 0;
}

.film-mini__big {
  right: 0;
  bottom: 0;
}

/* The marks grow with the film they sit on (RB, 2026-11-14: "smaller for
   phones and smaller layouts, bigger on pc but without getting too big"):
   12px on a phone's 180px corner film, about 16px on a computer's 320px one,
   20px at most on the film playing in its place. */
.film-mini .film-glyph {
  width: clamp(0.75rem, 3.6cqi + 0.25rem, 1.25rem);
  height: clamp(0.75rem, 3.6cqi + 0.25rem, 1.25rem);
  stroke-width: 2.4;
}

.film-glyph__play,
.film-mini__toggle[data-state="paused"] .film-glyph__pause {
  display: none;
}

.film-mini__toggle[data-state="paused"] .film-glyph__play {
  display: inline;
}

.film-mini .film-x:hover,
.film-mark:hover {
  background: rgba(0, 0, 0, 0.25);
}

.film-mini .film-x:focus-visible,
.film-mark:focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: var(--focus-offset);
}

/* How far it has played: the pen's line along the picture's foot, drawn as
   the film runs, in the room's blue (the dark theme's, since the film is
   dark in both). */
.film-mini::after {
  content: "";
  position: absolute;
  right: var(--radius-md);
  bottom: 3px;
  left: var(--radius-md);
  height: clamp(2px, 0.5cqi, 3px);
  border-radius: 1px;
  background: #456CE6;
  transform: scaleX(var(--played, 0));
  transform-origin: left center;
  pointer-events: none;
}

.film-mini.is-docked {
  position: fixed;
  right: var(--gutter);
  bottom: var(--space-5);
  z-index: 8;
  width: min(20rem, 50vw);
}

.film-mini.is-docked video {
  box-shadow: 0 0 0 var(--border-hairline) var(--card-edge);
}
