/* Schibsted Grotesk, SIL Open Font License 1.1: see /fonts/OFL.txt. Served from this site only. */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f7f7f8;
  --surface: #ffffff;
  --ink: #0e0e11;
  --ink-2: #4a4a53;
  --ink-3: #6e6e78;
  --rule: #e4e4e8;
  --rule-strong: #d4d4da;
  --done: #1d8a55;
  --band: #fbfbfc;
  --row-hover: #fafafb;
  --glow: rgb(112 132 255 / 0.13);
  --shadow: 0 1px 2px rgb(14 14 17 / 0.04), 0 16px 40px -18px rgb(14 14 17 / 0.14);
  --panel-rule: var(--rule);
  --select: #d9e6ff;
  --focus: #2f5bd3;
  --grid-dot: color-mix(in srgb, var(--ink-3) 12%, transparent);
  --grid-lit: color-mix(in srgb, var(--ink-3) 20%, transparent);
  --sans: "Schibsted Grotesk", -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 75rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-arrive: cubic-bezier(0.25, 1, 0.5, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0e;
    --surface: #131316;
    --ink: #ededf0;
    --ink-2: #b4b4bd;
    --ink-3: #8c8c96;
    --rule: #232328;
    --rule-strong: #2e2e35;
    --done: #5fcf95;
    --band: #16161a;
    --row-hover: #17171b;
    --glow: rgb(128 146 255 / 0.1);
    --shadow: inset 0 1px 0 rgb(255 255 255 / 0.04), 0 1px 2px rgb(0 0 0 / 0.4);
    --panel-rule: var(--rule-strong);
    --select: #26375e;
    --focus: #8fb0ff;
    --grid-dot: color-mix(in srgb, var(--ink-3) 14%, transparent);
    --grid-lit: color-mix(in srgb, var(--ink-3) 24%, transparent);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--select);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 160ms ease-out, color 160ms ease-out;
}

a:hover {
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
}

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

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Top bar */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.bar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 4.25rem;
}

.name {
  font-size: 1rem;
  font-weight: 760;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.875rem;
}

.nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

.nav .pill {
  color: var(--bg);
  background: var(--ink);
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  font-weight: 520;
  transition: opacity 160ms ease-out;
}

.nav .pill:hover {
  color: var(--bg);
  opacity: 0.86;
}

/* First screen: introduction and the work panel side by side, how I work below */

main {
  overflow-x: clip;
}

/* The page's ground: a quiet dot grid under everything, scrolling with the page. Full strength over the first
   screen, then it softens; raised surfaces (the panel, the contact band) cover it with their own fill. */
body::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(circle, var(--grid-dot) 1px, transparent 1.5px);
  background-size: 20px 20px;
  background-position: center top;
  mask-image: linear-gradient(to bottom, #000, #000 70vh, rgb(0 0 0 / 0.5) 160vh, rgb(0 0 0 / 0.4));
  pointer-events: none;
}

/* The cursor's spotlight (motion.js builds it, fine pointers only): a brighter patch of the same grid, its dots
   registered to the page grid's, faded to nothing at its edge. Only alpha changes; raised surfaces cover it. */
.grid-lit-wrap {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.grid-lit {
  position: absolute;
  top: 0;
  left: 0;
  width: 320px;
  height: 320px;
  opacity: 0;
  transition: opacity 400ms ease-out;
  mask-image: radial-gradient(closest-side, #000 15%, rgb(0 0 0 / 0.55) 45%, transparent 100%);
  will-change: transform;
}

.grid-lit.on {
  opacity: 1;
}

.grid-lit-dots {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  background-image: radial-gradient(circle, var(--grid-lit) 1px, transparent 1.5px);
  background-size: 20px 20px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 35rem);
  grid-template-areas:
    "intro panel"
    "how how";
  column-gap: clamp(2.5rem, 5vw, 4.5rem);
  padding-top: clamp(3rem, 7vh, 5.5rem);
}

/* Ambient light: one soft source behind the work panel, the page's only gradient. */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -14rem;
  right: -10rem;
  width: min(60rem, 120vw);
  height: 44rem;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}

.intro {
  grid-area: intro;
  padding-top: 0.5rem;
}

.headline {
  font-size: clamp(2.5rem, 4.6vw, 3.75rem);
  line-height: 1.02;
  font-weight: 640;
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 19ch;
}

.lead {
  margin-top: 1.75rem;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 34rem;
  text-wrap: pretty;
}


.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin-top: 2.25rem;
}

.button {
  display: inline-block;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-weight: 540;
  font-size: 0.9375rem;
  padding: 0.8125rem 1.25rem;
  border-radius: 0.625rem;
  box-shadow: 0 1px 2px rgb(14 14 17 / 0.2);
  transition: opacity 160ms ease-out;
}

.button:hover {
  opacity: 0.88;
}

.quiet {
  font-size: 0.9375rem;
  font-weight: 520;
  text-decoration: none;
}

.quiet span {
  display: inline-block;
}

.figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  gap: 1.25rem clamp(1.5rem, 3vw, 2.75rem);
  position: relative;
  margin-top: clamp(2.5rem, 6vh, 3.75rem);
  padding-top: 1.5rem;
}

.figures::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--rule);
  transform-origin: left center;
}

.figures div {
  display: flex;
  flex-direction: column;
}

.figures dd {
  order: -1;
}

.figures dd {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.odo-value {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.odo {
  display: inline-flex;
}

.odo-cell {
  display: inline-block;
  height: 1.1em;
  overflow: hidden;
}

.odo-reel {
  display: block;
  transition: transform 1500ms var(--ease-out);
}

.odo-reel span {
  display: block;
  height: 1.1em;
}

.figures dt {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

/* The work panel */

.panel {
  grid-area: panel;
  align-self: start;
  margin-top: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--panel-rule);
  border-radius: 0.875rem;
  box-shadow: var(--shadow);
  overflow: clip;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.9375rem 1.25rem;
  border-bottom: 1px solid var(--rule);
  background: var(--band);
  font-size: 0.8125rem;
  font-weight: 560;
  color: var(--ink);
}

.panel-head span {
  font-weight: 400;
  color: var(--ink-3);
  text-align: right;
}

.work-item {
  padding: 1.125rem 1.25rem 1.1875rem;
  border-bottom: 1px solid var(--rule);
  transition: background-color 200ms ease-out;
}

.work-item:hover {
  background: var(--row-hover);
}

.work-item:last-child {
  border-bottom: 0;
}

.work-item h3 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.work-item p {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

.work-item .role {
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
}

.work-item .role + p {
  margin-top: 0.5rem;
}

/* Stack line: quiet names on a middle dot, set in the text face. */
.work-item small {
  display: flex;
  flex-wrap: wrap;
  margin-top: 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}

.work-item small span + span::before {
  content: "·";
  padding: 0 0.5em;
  color: var(--rule-strong);
}

/* Status: a finished item's count, set as a number and a quiet word. */
.tag {
  flex: none;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}

.tag b {
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}

/* How a change travels: the diagram between the actions and the figures. Horizontal where its column is wide enough to
   keep 14px labels at full size, vertical below that. Static by default; motion adds the travelling
   packet further down. */
.flow {
  margin: clamp(2.25rem, 5vh, 3rem) 0 0;
  container-type: inline-size;
}

.flow + .figures {
  margin-top: clamp(2rem, 4.5vh, 2.75rem);
}

.flow svg {
  height: auto;
  overflow: visible;
}

.flow .flow-h {
  display: none;
  width: 100%;
  max-width: 35rem;
}

.flow .flow-v {
  display: block;
  width: 18.75rem;
  max-width: 100%;
}

@container (min-width: 32rem) {
  .flow .flow-h {
    display: block;
  }

  .flow .flow-v {
    display: none;
  }
}

.flow .track {
  stroke: var(--ink-3);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.flow .trace {
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.flow .node {
  fill: var(--bg);
  stroke: var(--ink-3);
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center;
}

.flow .packet,
.flow .ring {
  opacity: 0;
}

.flow .ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.25;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.flow .track,
.flow .trace,
.flow .ring,
.flow .packet {
  pointer-events: none;
}

.flow .hit {
  fill: transparent;
}

.flow .step {
  outline: none;
}

.flow .step:focus-visible .node {
  stroke: var(--focus) !important;
  stroke-width: 2;
}

/* A step under the pointer or in focus reads in ink over whatever the paused loop shows. */
.flow .step.is-on .node {
  stroke: var(--ink) !important;
}

.flow .step.is-on text {
  fill: var(--ink) !important;
}

.flow stop {
  stop-color: var(--ink);
}

.flow text {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  fill: var(--ink-2);
}

.flow-h text {
  text-anchor: middle;
}


.flow figcaption {
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

/* When the packet reaches each step in the loop (it waits 750ms at the gate, step 3). */
.flow .k1 {
  --t: 1400ms;
}

.flow .k2 {
  --t: 2800ms;
}

.flow .k3 {
  --t: 4200ms;
}

.flow .k4 {
  --t: 6350ms;
}

/* How I work */

.how {
  grid-area: how;
  margin-top: clamp(5rem, 12vh, 8rem);
}

.how h2 {
  font-size: clamp(1.875rem, 3.4vw, 2.75rem);
  font-weight: 620;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.principles {
  margin-top: 2rem;
  border-bottom: 1px solid var(--rule);
}

.principles li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 35rem);
  column-gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: baseline;
  padding: 1.375rem 0;
  border-top: 1px solid var(--rule);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.principles strong {
  color: var(--ink);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
  text-wrap: balance;
}

.principles span {
  text-wrap: pretty;
}

/* Contact: the page's close */

.contact {
  margin-top: clamp(5rem, 12vh, 8rem);
  padding: clamp(4rem, 10vh, 6.5rem) 0;
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.contact-line,
.contact-mail {
  font-size: clamp(2.25rem, 5.2vw, 4rem);
  font-weight: 620;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.contact-line {
  color: var(--ink-3);
}

.contact-mail a {
  text-decoration-thickness: 2px;
  text-underline-offset: 0.14em;
}

.contact-mail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
}

.echo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--ink-3);
  transition: color 200ms ease-out;
}

.echo::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 1px solid var(--ink-3);
  border-radius: 4px;
  background: var(--surface);
  transition: background-color 200ms ease-out, border-color 200ms ease-out;
}

.contact-mail a:hover + .echo,
.contact-mail a:focus-visible + .echo {
  color: var(--ink);
}

.contact-mail a:hover + .echo::before,
.contact-mail a:focus-visible + .echo::before {
  background: var(--ink);
  border-color: var(--ink);
}

.foot {
  padding: 2rem 0 2.5rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

/* Tablet and phone */

@media (max-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "panel"
      "how";
  }

  .principles li {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.375rem;
  }

  .panel {
    margin-top: 3.5rem;
  }

  .headline {
    max-width: 18ch;
  }

  .grid-lit {
    width: 240px;
    height: 240px;
  }
}

@media (max-width: 45rem) {
  .nav .nav-section {
    display: none;
  }

  .nav {
    gap: 1rem;
  }

  .panel-head {
    flex-direction: column;
    gap: 0.25rem;
  }

  .panel-head span {
    text-align: left;
  }

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

  .intro .figures {
    order: 1;
  }

  .intro .flow {
    order: 2;
  }
}

@media (max-width: 26rem) {
  .bar-in {
    gap: 0.75rem;
  }

  .name {
    font-size: 0.9375rem;
  }

  .nav {
    gap: 0.75rem;
  }

  .nav .pill {
    padding: 0.4375rem 0.625rem;
    font-size: 0.8125rem;
  }
}

@media (max-width: 22rem) {
  .name {
    font-size: 0.875rem;
  }

  .nav {
    gap: 0.625rem;
  }
}

@media (max-width: 21rem) {
  .bar-in {
    gap: 0.5rem;
  }

  .nav {
    gap: 0.5rem;
  }

  .nav .pill {
    padding: 0.4375rem 0.5rem;
    font-size: 0.75rem;
  }
}

/* Motion: one language. On load the first screen rises into place in sequence (the rule over the figures is
   ruled in, the panel settles); below the fold each part arrives every time it comes into view (motion.js adds
   .arrived). In the diagram a packet travels from request to handover, waits at the gate while its outline
   draws, and lights each step it reaches. Everything here is for visitors who allow motion; with reduced
   motion the page and diagram are still. */

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(0.75rem);
    }
  }

  /* The same rise, for parts that arrive below the fold: further (1.75rem), so a row clearly arrives. */
  @keyframes arrive {
    from {
      opacity: 0;
      transform: translateY(1.75rem);
    }
  }

  @keyframes settle {
    from {
      opacity: 0;
      transform: translateY(1rem) scale(0.985);
      filter: blur(6px);
    }
  }

  @keyframes rule {
    from {
      transform: scaleX(0);
    }
  }

  @keyframes light {
    from {
      opacity: 0;
    }
  }

  /* The diagram's loop: 10s. The packet crosses at an even pace (1400ms a step), waits 750ms at step 3 (the
     gate: tests and review) while that node's outline draws once, then goes on to the handover, which turns
     done-green. Step k lights at --t. */
  @keyframes travel-x {
    0% {
      opacity: 0;
      transform: translateX(0);
    }
    3% {
      opacity: 1;
    }
    42%,
    49.5% {
      transform: translateX(360px);
    }
    63.5% {
      opacity: 1;
      transform: translateX(480px);
    }
    69%,
    100% {
      opacity: 0;
      transform: translateX(480px);
    }
  }

  @keyframes travel-y {
    0% {
      opacity: 0;
      transform: translateY(0);
    }
    3% {
      opacity: 1;
    }
    42%,
    49.5% {
      transform: translateY(162px);
    }
    63.5% {
      opacity: 1;
      transform: translateY(216px);
    }
    69%,
    100% {
      opacity: 0;
      transform: translateY(216px);
    }
  }

  @keyframes trace {
    0% {
      stroke-dashoffset: 1;
      opacity: 1;
    }
    42%,
    49.5% {
      stroke-dashoffset: 0.25;
    }
    63.5%,
    84% {
      stroke-dashoffset: 0;
      opacity: 1;
    }
    96%,
    100% {
      stroke-dashoffset: 0;
      opacity: 0;
    }
  }

  @keyframes gate {
    0% {
      stroke-dashoffset: 1;
      opacity: 1;
    }
    7.5% {
      stroke-dashoffset: 0;
    }
    14% {
      opacity: 1;
    }
    22%,
    100% {
      stroke-dashoffset: 0;
      opacity: 0;
    }
  }

  @keyframes hit {
    0% {
      fill: var(--ink);
      stroke: var(--ink);
      transform: scale(1.3);
    }
    9% {
      transform: scale(1);
    }
    12.5% {
      fill: var(--ink);
      stroke: var(--ink);
    }
    25%,
    100% {
      fill: var(--bg);
      stroke: var(--ink-3);
    }
  }

  @keyframes hit-label {
    0%,
    12.5% {
      fill: var(--ink);
    }
    25%,
    100% {
      fill: var(--ink-2);
    }
  }

  @keyframes land {
    0% {
      fill: var(--done);
      stroke: var(--done);
      transform: scale(1.3);
    }
    9% {
      transform: scale(1);
    }
    22% {
      fill: var(--done);
      stroke: var(--done);
    }
    30%,
    100% {
      fill: var(--bg);
      stroke: var(--ink-3);
    }
  }

  .hero::before {
    animation: light 1600ms ease-out backwards;
  }

  .headline,
  .lead,
  .actions,
  .figures,
  .flow,
  .panel-head,
  .work-item {
    animation: rise 1040ms var(--ease-arrive) backwards;
  }

  .lead {
    animation-delay: 115ms;
  }

  .actions {
    animation-delay: 230ms;
  }

  .flow {
    animation-delay: 345ms;
  }

  .figures {
    animation-delay: 460ms;
  }

  .figures::before {
    animation: rule 1600ms var(--ease-arrive) 580ms backwards;
  }

  .panel {
    animation: settle 1300ms var(--ease-arrive) 200ms backwards;
  }

  .panel-head {
    animation-delay: 430ms;
  }

  .work-item:nth-child(1) {
    animation-delay: 520ms;
  }

  .work-item:nth-child(2) {
    animation-delay: 620ms;
  }

  .work-item:nth-child(3) {
    animation-delay: 720ms;
  }

  .work-item:nth-child(4) {
    animation-delay: 820ms;
  }

  .work-item:nth-child(n + 5) {
    animation-delay: 920ms;
  }

  .flow .packet {
    animation: travel-x 10000ms linear 1400ms infinite;
  }

  .flow-v .packet {
    animation-name: travel-y;
  }

  .flow .trace {
    animation: trace 10000ms linear 1400ms infinite;
  }

  .flow .ring {
    animation: gate 10000ms linear 5600ms infinite;
  }

  .flow .node,
  .flow text {
    animation: hit 10000ms ease-out infinite;
    animation-delay: calc(1400ms + var(--t, 0ms));
  }

  .flow text {
    animation-name: hit-label;
  }

  .flow .node.k4 {
    animation-name: land;
  }

  .button,
  .nav .pill {
    transition: transform 200ms var(--ease-out), opacity 160ms ease-out, box-shadow 200ms var(--ease-out);
  }

  .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 1px 2px rgb(14 14 17 / 0.2), 0 6px 16px -6px rgb(14 14 17 / 0.35);
  }

  .button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgb(14 14 17 / 0.2);
  }

  .quiet span {
    transition: transform 240ms var(--ease-out);
  }

  .quiet:hover span {
    transform: translateX(3px);
  }

  .nav .pill:hover {
    transform: translateY(-1px);
  }

  .contact-mail a {
    transition: text-decoration-color 200ms ease-out, text-underline-offset 280ms var(--ease-out);
  }

  .contact-mail a:hover {
    text-underline-offset: 0.2em;
  }

  /* The loop rests only while the diagram is out of view; a step's note never stops the packet. */
  .flow.off * {
    animation-play-state: paused;
  }

  /* On a phone motion.js drives the vertical packet from the scroll position instead of the loop. */
  .flow.scrub .flow-v * {
    animation: none;
  }

  .flow.scrub .flow-v .node,
  .flow.scrub .flow-v text {
    transition: fill 200ms ease-out, stroke 200ms ease-out;
  }

  .flow.scrub .flow-v .node.on {
    fill: var(--ink);
    stroke: var(--ink);
  }

  .flow.scrub .flow-v text.on {
    fill: var(--ink);
  }

  .flow.scrub .flow-v .node.k4.on {
    fill: var(--done);
    stroke: var(--done);
  }

  /* Each part arrives every time it comes into view: motion.js hides parts outside the first screen at load,
     and any part once it has left the viewport entirely (.pending, no animation, so the reset is instant), and
     plays the arrival when it enters (.arrived), 130ms apart when several enter together. */
  html.js .pending {
    opacity: 0;
    animation: none;
  }

  html.js .arrived {
    animation: arrive 1300ms var(--ease-arrive) backwards;
    animation-delay: var(--d, 0ms);
  }

  html.js .figures.arrived::before {
    animation: rule 1600ms var(--ease-arrive) backwards;
    animation-delay: calc(var(--d, 0ms) + 290ms);
  }
}
