/* fraunces-vietnamese-soft-normal */
@font-face {
  font-family: 'Fraunces Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/_astro/fraunces-vietnamese-soft-normal.DSA2Kggd.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* fraunces-latin-ext-soft-normal */
@font-face {
  font-family: 'Fraunces Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/_astro/fraunces-latin-ext-soft-normal.DKHvU-YN.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* fraunces-latin-soft-normal */
@font-face {
  font-family: 'Fraunces Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/_astro/fraunces-latin-soft-normal.C-lS_vzd.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* fraunces-vietnamese-soft-italic */
@font-face {
  font-family: 'Fraunces Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url(/_astro/fraunces-vietnamese-soft-italic.CyEZfaGz.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* fraunces-latin-ext-soft-italic */
@font-face {
  font-family: 'Fraunces Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url(/_astro/fraunces-latin-ext-soft-italic.CFDsOWEG.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* fraunces-latin-soft-italic */
@font-face {
  font-family: 'Fraunces Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url(/_astro/fraunces-latin-soft-italic.CIOv5diB.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* figtree-latin-ext-wght-normal */
@font-face {
  font-family: 'Figtree Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/_astro/figtree-latin-ext-wght-normal.DCwSJGxG.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* figtree-latin-wght-normal */
@font-face {
  font-family: 'Figtree Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/_astro/figtree-latin-wght-normal.D_ZTVpCC.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* ibm-plex-mono-latin-400-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/_astro/ibm-plex-mono-latin-400-normal.DMJ8VG8y.woff2) format('woff2'), url(/_astro/ibm-plex-mono-latin-400-normal.CvHOgSBP.woff) format('woff');
}/* ibm-plex-mono-latin-500-normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/_astro/ibm-plex-mono-latin-500-normal.DSY6xOcd.woff2) format('woff2'), url(/_astro/ibm-plex-mono-latin-500-normal.CB9ihrfo.woff) format('woff');
}/* ---------- paper and ink ---------- */
:root {
  --paper: #f3ebdb;
  --paper-deep: #eadfc9;
  --ink: #2b221b;
  --ink-soft: #5f5245;
  --accent: #7d9472; /* sage, for lines and marks */
  --accent-ink: #48603f; /* sage dark enough for text on paper (AA) */
  --mark: #a8481f; /* trail-blaze orange: the numbers and the way in (5.1:1 on paper) */
  --contour: rgba(104, 128, 94, 0.2);
  --contour-strong: rgba(104, 128, 94, 0.36);
  --print: #fbf7ee;
  --print-shadow: rgba(60, 42, 24, 0.22);
  --grain-opacity: 0.5;
  --grain-blend: multiply;
  --photo-filter: none;

  --serif: 'Fraunces Variable', 'Iowan Old Style', Georgia, serif;
  --sans: 'Figtree Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --measure: 680px;
  color-scheme: light;
}


/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* with this only on body it is handed to the viewport and body stops clipping:
     the hero's second print then widened the page to 422px on a 390px phone */
  overflow-x: clip;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: 'ss01';
  overflow-x: clip;
  position: relative; /* the dog at the foot of the page is placed from here */
  animation: page-in 0.9s ease both;
}
/* paper grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .36 0 0 0 0 .26 0 0 0 .5 -.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.5s;
}
@keyframes page-in {
  from {
    opacity: 0;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 420;
  font-variation-settings: 'SOFT' 100;
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0 0 1em;
  text-wrap: pretty;
}
em {
  font-style: italic;
}
.mono,
code,
kbd {
  font-family: var(--mono);
  font-size: 0.9em;
  font-variant-numeric: tabular-nums;
}
/* small italic asides. the handwriting on the page is real and comes from scans (.scan) */
.hand {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.25;
}
.soft {
  color: var(--ink-soft);
}

/* links: a faint line that a pen stroke goes over on hover */
a {
  color: var(--accent-ink);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position:
    0 100%,
    0 100%;
  background-size:
    0% 1.5px,
    100% 1px;
  padding-bottom: 2px;
  transition: background-size 0.55s cubic-bezier(0.3, 0.7, 0.2, 1);
}
a:hover,
a:focus-visible {
  background-size:
    100% 1.5px,
    100% 1px;
}
:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--paper-deep);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  z-index: 10;
}
.skip:focus {
  left: 0.5rem;
}

/* ---------- contour map behind the page ---------- */
.topo-wrap {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -2;
  pointer-events: none;
}
/* the background map: worked out at build time (src/lib/terrain.ts), kept to the margins,
   and taller than the screen so it can pan up as you scroll */
.bg-map {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}
.bg-map {
  background: var(--contour-strong);
  -webkit-mask: url(/bg-map.svg) center top / cover no-repeat;
  mask: url(/bg-map.svg) center top / cover no-repeat;
}
.divider path {
  fill: none;
  stroke: var(--contour-strong);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
@media (min-width: 900px) {
  /* clear behind the reading column, full strength out in the margins */
  .topo-wrap {
    -webkit-mask: linear-gradient(to right, #000 0 10%, rgb(0 0 0 / 0.22) 30% 70%, #000 90% 100%);
    mask: linear-gradient(to right, #000 0 10%, rgb(0 0 0 / 0.22) 30% 70%, #000 90% 100%);
  }
}
@media (max-width: 899px) {
  .bg-map {
    opacity: 0.55;
  }
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .bg-map {
      height: 240vh;
      animation: topo-pan linear both;
      animation-timeline: scroll(root);
    }
  }
}
@keyframes topo-pan {
  to {
    transform: translateY(-140vh);
  }
}

.divider {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: clamp(48px, 6vw, 80px);
  margin-block: clamp(1rem, 2.5vw, 1.75rem);
  overflow: hidden;
}
.divider svg {
  width: 106%;
  height: 100%;
  margin-left: -3%;
  animation: sway 70s ease-in-out infinite alternate;
}
.divider.flip svg {
  transform: scaleX(-1);
  animation-name: sway-flip;
}
.divider path {
  stroke: var(--contour-strong);
}
@keyframes sway {
  from {
    transform: translateX(-1.5%);
  }
  to {
    transform: translateX(1.5%);
  }
}
@keyframes sway-flip {
  from {
    transform: scaleX(-1) translateX(-1.5%);
  }
  to {
    transform: scaleX(-1) translateX(1.5%);
  }
}

/* ---------- the dog walking ahead ---------- */
/* the walker is only shown where the scroll-driven walk works (see the @supports block);
   everywhere else the dog is simply found sitting at the foot of the page (.dog-end) */
.dog {
  display: none;
  position: fixed;
  z-index: -1; /* on a phone it keeps to the right edge and passes behind the text */
  top: 0;
  right: 0;
  width: 19px; /* the width of the page's right margin, so it never touches the text */
  pointer-events: none;
  color: var(--ink);
}
.dog svg,
.dog-end svg {
  display: block;
  width: 100%;
  overflow: visible;
}
/* pen strokes are filled shapes; the hairline keeps the thin ends from vanishing when small */
.dog path,
.dog-end path {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0.5px;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}
.dog .leash {
  position: absolute;
  left: 13.5%;
  bottom: 73%;
  width: 100%;
  height: 30svh;
  color: var(--ink-soft);
  -webkit-mask: linear-gradient(to top, #000 25%, transparent);
  mask: linear-gradient(to top, #000 25%, transparent);
}
.dog .leash path {
  fill: none;
  stroke-width: 1.1px;
  stroke-linecap: round;
}
.dog .pup {
  transform-origin: 50% 100%;
}
.dog .tail,
.dog-end .tail {
  transform-box: fill-box;
  transform-origin: 0 100%;
}
.dog .step.b {
  opacity: 0;
}
@media (min-width: 1240px) {
  .dog {
    z-index: 1;
    right: auto;
    left: max(1.2rem, calc(50% - 540px - 6.4rem));
    width: 74px;
  }
  .dog .leash {
    left: 0;
    bottom: 73%;
    width: 150%;
    height: 46svh;
  }
}

/* where it was going: sitting at the foot of the page, looking at a ridge */
.dog-end {
  position: absolute;
  right: 0.6rem;
  bottom: 2.4rem;
  width: 96px;
  pointer-events: none;
  color: var(--ink);
}
.dog-end .far {
  color: var(--ink-soft);
}
.dog-end .tail {
  transform-origin: 0 100%;
}
@media (min-width: 1240px) {
  .dog-end {
    right: auto;
    /* the sitting dog lands in the margin column the walker came down */
    left: calc(max(1.2rem, 50% - 540px - 6.4rem) - 48px);
    bottom: 3rem;
    width: 139px;
  }
}

/* the end of the quest: a dragon along the ground, facing the walker. on a phone the walker
   sits at the right, so the dragon lies to its left and faces right */
.dragon {
  position: absolute;
  bottom: 2.2rem;
  right: calc(0.6rem + 96px);
  width: min(210px, calc(100% - 96px - 2rem));
  pointer-events: none;
  color: var(--ink);
}
.dragon svg {
  display: block;
  width: 100%;
  overflow: visible;
  transform: scaleX(-1);
}
.dragon path {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0.5px;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}
.dragon .smoke {
  color: var(--ink-soft);
  opacity: 0.7;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.dragon .eye {
  color: var(--mark);
}
@media (min-width: 1240px) {
  .dragon {
    right: auto;
    left: calc(max(1.2rem, 50% - 540px - 6.4rem) + 118px);
    bottom: 2.9rem;
    width: 380px;
  }
  .dragon svg {
    transform: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .dragon .smoke {
    animation: smoke 4.5s ease-in-out infinite;
  }
  .dragon .body {
    transform-box: fill-box;
    transform-origin: 70% 100%;
    animation: breathe 4.5s ease-in-out infinite;
  }
}
@keyframes smoke {
  0%,
  100% {
    opacity: 0;
    translate: 0 4px;
    scale: 0.8;
  }
  35%,
  60% {
    opacity: 0.7;
  }
  80% {
    opacity: 0;
    translate: -4px -10px;
    scale: 1.15;
  }
}
@keyframes breathe {
  50% {
    scale: 1.012 1.025;
  }
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .dog {
      display: block;
      /* it starts up by the name, leads you down, then pulls ahead off the bottom of the
         screen with a tenth of the page still to go. it is waiting at the foot */
      animation: dog-lead-narrow linear both;
      animation-timeline: scroll(root);
    }
    /* it walks only as far as you scroll: two drawings a step apart, swapped as you go */
    .dog .pup,
    .dog .step {
      animation: linear var(--strides, 34) both;
      animation-timeline: scroll(root);
    }
    .dog .pup {
      animation-name: dog-sway;
    }
    .dog .step.a {
      animation-name: dog-step-a;
      animation-timing-function: step-end;
    }
    .dog .step.b {
      animation-name: dog-step-b;
      animation-timing-function: step-end;
    }
    /* the tail runs on a clock, so it keeps wagging when you stop to read */
    .dog .tail {
      animation: dog-wag 0.62s ease-in-out infinite alternate;
    }
    .dog-end .tail {
      animation: dog-swish 1.7s ease-in-out infinite alternate;
    }
    .calm .dog {
      --strides: 56; /* the write-ups are longer pages */
    }
  }
  @media (prefers-reduced-motion: no-preference) and (min-width: 1240px) {
    .dog {
      animation-name: dog-lead;
    }
  }
}
@keyframes dog-lead {
  0% {
    transform: translate(0, 19svh);
  }
  26% {
    transform: translate(12px, 36svh);
  }
  52% {
    transform: translate(-5px, 54svh);
  }
  78% {
    transform: translate(9px, 72svh);
    animation-timing-function: ease-in;
  }
  /* far enough that the leash trailing behind it is gone too */
  90%,
  100% {
    transform: translate(2px, 165svh);
  }
}
@keyframes dog-lead-narrow {
  0% {
    transform: translateY(15svh);
  }
  78% {
    transform: translateY(74svh);
    animation-timing-function: ease-in;
  }
  90%,
  100% {
    transform: translateY(150svh);
  }
}
/* the weight goes onto whichever foot is down, eased so it rocks instead of ticking */
@keyframes dog-sway {
  0%,
  50%,
  100% {
    transform: translateY(0) rotate(0deg);
    animation-timing-function: ease-out;
  }
  25% {
    transform: translateY(-1.5%) rotate(-2.6deg);
    animation-timing-function: ease-in;
  }
  75% {
    transform: translateY(-1.5%) rotate(2.6deg);
    animation-timing-function: ease-in;
  }
}
@keyframes dog-step-a {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
@keyframes dog-step-b {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}
@keyframes dog-wag {
  from {
    transform: rotate(-11deg);
  }
  to {
    transform: rotate(13deg);
  }
}
@keyframes dog-swish {
  from {
    transform: rotate(-4deg);
  }
  to {
    transform: rotate(9deg);
  }
}

/* ---------- frame ---------- */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.1rem clamp(1.1rem, 5vw, 2.5rem) 0;
}
.home-link {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink);
  background-image: none;
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 5vw, 2.5rem);
}
.foot {
  max-width: 1080px;
  margin: clamp(3rem, 8vw, 6rem) auto 0;
  padding: 0 clamp(1.1rem, 5vw, 2.5rem) 3rem;
  color: var(--ink-soft);
}
.signoff {
  color: var(--accent-ink);
  transform: rotate(-4deg);
  transform-origin: left;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.5rem;
  width: fit-content;
}
.signoff .scan:last-child {
  margin-left: 2.2rem;
  opacity: 0.8;
}
.colophon {
  margin: 2.2rem 0 0;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}

/* ---------- prints and notes ---------- */
.print {
  margin: 0;
  padding: 0.55rem 0.55rem 0.6rem;
  background: var(--print);
  border-radius: 3px;
  box-shadow:
    0 1px 2px var(--print-shadow),
    0 14px 30px -12px var(--print-shadow);
  transform: rotate(var(--rot, -2deg));
  transition: transform 0.9s cubic-bezier(0.3, 0.7, 0.2, 1);
  width: fit-content;
}
.print:hover {
  transform: rotate(calc(var(--rot, -2deg) * 0.4)) translateY(-3px);
}
.print .frame {
  display: block;
  overflow: hidden;
  border-radius: 1.5px;
}
.print img {
  filter: var(--photo-filter);
}
/* a closer crop of the same photo */
.print.crop img {
  transform: scale(var(--zoom));
  transform-origin: var(--focus);
}
.print figcaption {
  color: #4a3d31; /* always on the light print border */
  padding: 0.4rem 0.25rem 0;
  font-size: 0.92rem;
}
.note {
  color: var(--accent-ink);
  transform: rotate(var(--rot, -3deg));
  margin: 0;
  max-width: 13rem;
}
.note img {
  filter: var(--photo-filter);
}
/* a scanned note: the png is only the ink's shape, the colour comes from the text colour */
.scan {
  display: block;
  width: var(--w, 11rem);
  max-width: 100%;
  aspect-ratio: var(--ar);
  background-color: currentColor;
  -webkit-mask: var(--scan) center / contain no-repeat;
  mask: var(--scan) center / contain no-repeat;
}
.todo {
  font-family: var(--mono);
  font-size: 0.82em;
  background: color-mix(in srgb, #e0a84a 32%, transparent);
  border-radius: 6px;
  padding: 0.1em 0.45em;
  color: var(--ink);
}

/* ---------- hero, shared ---------- */
.hero {
  position: relative;
  padding-top: clamp(3rem, 9vw, 7rem); /* there's no header bar above it on the home page */
}
.hero h1 {
  font-size: clamp(3.2rem, 9vw, 5.6rem);
  font-weight: 360;
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-variation-settings: 'SOFT' 100;
}
.hero .lede {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  line-height: 1.5;
  max-width: 31rem;
  margin: 1.6rem 0 0.9rem;
}
.hero .seeking {
  color: var(--ink-soft);
  max-width: 30rem;
}
.proof {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 38rem;
}
.proof a {
  display: grid;
  align-content: start;
  line-height: 1.3;
  color: var(--ink);
  background: none;
  padding: 0.8rem 0 0;
  border-top: 2px solid var(--mark);
  transition: transform 0.3s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.proof a:hover,
.proof a:focus-visible {
  transform: translateY(-3px);
}
.proof .proj {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.proof .mono {
  font-size: clamp(2.2rem, 4.2vw, 2.85rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0.3rem 0 0.35rem;
  color: var(--mark);
}
.proof span:last-child {
  font-size: 0.92rem;
}
@media (max-width: 560px) {
  /* on a phone: one stat per row, number on the left and what it is on the right */
  .proof {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
  .proof a {
    grid-template-columns: 7.4rem 1fr;
    column-gap: 0.9rem;
    align-items: baseline;
    padding-top: 0.6rem;
  }
  .proof .proj {
    grid-column: 1 / -1;
  }
  .proof .mono {
    font-size: 2rem;
    margin: 0.1rem 0 0;
  }
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  font-size: 1.05rem;
}
.links a {
  display: inline-block;
  padding-block: 0.55rem 0.35rem; /* comfortable tap target */
}

/* on a phone the big print is below the first screen, so a close-up of it sits in the
   opening sentence and the words wrap around it */
.hero .peek {
  float: right;
  width: 29vw;
  max-width: 120px;
  margin: 0.5rem -0.2rem 0.4rem 0.9rem;
  padding: 0.3rem;
  shape-outside: margin-box;
}
.hero .peek .frame {
  aspect-ratio: 4 / 5;
}
.hero .peek img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero .seeking {
  clear: none;
}
@media (min-width: 820px) {
  .hero .peek {
    display: none;
  }
}

/* hero a: the notebook spread, name on the left page and prints on the right */
.hero-a {
  display: grid;
  gap: 2.5rem;
}
.hero-a .prints {
  position: relative;
  width: min(74vw, 330px);
  margin: 0 auto -3.5rem 12%;
  z-index: 1;
}
.hero-a .prints .second {
  position: absolute;
  width: 46%;
  right: -22%;
  bottom: -9%;
}
.hero-a .note {
  display: none; /* on a phone it ran into the next heading */
  position: absolute;
  left: -3.2rem;
  bottom: -3.4rem;
}
@media (min-width: 820px) {
  .hero-a {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: start;
    gap: 3rem;
  }
  .hero-a .words {
    padding-top: 3.5rem;
  }
  .hero-a .note {
    display: block;
  }
  .hero-a .prints {
    width: min(100%, 360px);
    margin: 0 0 -7rem auto;
    right: 2.5rem;
  }
}

/* ---------- home: field notes ---------- */
.section-title {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mark);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.4rem;
}
.section-title::after {
  content: '';
  flex: 1;
  max-width: 7rem;
  border-top: 1px solid currentColor;
  opacity: 0.5;
}
.section {
  position: relative;
}
.entries {
  list-style: none;
  margin: clamp(1.25rem, 3vw, 2rem) 0 0;
  padding: 0;
  display: grid;
  gap: clamp(3rem, 7vw, 4.5rem);
}
.entry {
  position: relative;
  max-width: 36rem;
  display: grid;
}
.entry-text {
  position: relative;
}
.entry-plot .plot {
  margin-bottom: 0.6rem;
}
/* the big numeral sits behind the title like a trail marker */
.entry .num {
  position: absolute;
  z-index: -1;
  top: -0.42em;
  left: -0.06em;
  font-family: var(--serif);
  font-size: clamp(5rem, 13vw, 7.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--mark);
  opacity: 0.14;
  pointer-events: none;
}
.entry h3 {
  font-size: clamp(2.2rem, 5.6vw, 3rem);
  font-weight: 560;
  letter-spacing: -0.025em;
  margin: 1.6rem 0 0.7rem;
}
.entry h3 a {
  color: var(--ink);
  background-size:
    0% 2px,
    0% 1px;
}
.entry h3 a:hover {
  background-size:
    100% 2px,
    0% 1px;
}
.entry .what {
  font-size: 1.1rem;
  margin-bottom: 0.7rem;
}
@media (min-width: 1000px) {
  /* text on the left, its figure on the right: the page uses its width and gets shorter */
  .entry {
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    grid-template-rows: auto 1fr;
    column-gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: start;
  }
  .entry-plot {
    grid-column: 2;
    grid-row: 1 / span 2;
    /* centred against the text beside it, so a short figure doesn't leave a hole under it */
    align-self: center;
  }
  .entry-plot:empty {
    display: none;
  }
  /* the plots now fill the right-hand column, where these prints used to sit */
  .print-sign,
  .print-overlook {
    display: none !important;
  }
  .entry .more {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    align-self: start;
  }
}
.figures {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.1rem;
  display: grid;
  gap: 0.45rem;
}
.figures {
  gap: 0.9rem;
}
.figures li {
  display: grid;
  gap: 0.1rem;
  line-height: 1.4;
}
.figures .mono {
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: var(--mark);
}
@media (max-width: 520px) {
  .figures {
    gap: 0.8rem;
    grid-template-columns: 1fr;
  }
  .figures li {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
.figures span:last-child {
  font-size: 0.98rem;
}
.more {
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--mark);
  justify-self: start;
}
.entry .note {
  margin: 0.2rem 0 0.9rem 0.6rem; /* on a phone the note sits right under the numbers it's about */
  width: fit-content;
}
.aside-print {
  width: min(62vw, 250px);
  margin: 2.5rem 0 0 auto;
}
.print-sign {
  display: none; /* on a phone it only pushed the first project down */
}
@media (min-width: 900px) {
  .entry .note {
    position: absolute;
    left: calc(100% + 2rem);
    top: 5.2rem;
    width: 12rem;
    margin: 0;
  }
  .entry:nth-child(1) .note {
    top: 10.2rem; /* beside the benchmark it is about */
  }
  .entry:nth-child(2) .note {
    left: auto;
    right: calc(100% + 2rem);
    text-align: right;
  }
  .entry:nth-child(3) .note {
    top: -0.5rem; /* clear of the overlook print below */
  }
  .entry:nth-child(3) .note .scan {
    width: 9rem;
  }
  .aside-print {
    position: absolute;
    margin: 0;
  }
  .print-sign {
    display: block;
    right: 0;
    top: -8.5rem;
    width: 215px;
  }
  .print-overlook {
    right: -1rem;
    bottom: -9.5rem;
    width: 330px;
    z-index: 1;
  }
}

.also {
  list-style: none;
  padding: 0;
  margin: 1.8rem 0 0;
  max-width: 37rem;
  display: grid;
  gap: 1.6rem 2.6rem;
}
.also li {
  line-height: 1.5;
  display: grid;
  align-content: start;
  padding-top: 0.75rem;
  border-top: 1px solid var(--contour-strong);
}
.also-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.8rem;
}
.also strong {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 560;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.also-head a {
  font-size: 0.92rem;
  color: var(--mark);
}
.also .where {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 0.15rem 0 0.35rem;
}
@media (min-width: 760px) {
  .also {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 44rem;
  }
}
.print-waterfall {
  width: min(48vw, 190px);
}
@media (min-width: 900px) {
  .print-waterfall {
    right: 6%;
    top: 0.5rem;
    width: 205px;
  }
}

.about {
  display: grid;
  gap: 2.5rem;
}
.about-words {
  max-width: 33rem;
}
.about-words p {
  font-size: 1.1rem;
}
.reading {
  margin-top: 1.6rem;
  color: var(--ink-soft);
  font-size: 1rem;
}
.reading em {
  color: var(--accent-ink);
  margin-right: 0.4rem;
}
.pile {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1 / 1.08;
  margin: 0 auto 1rem;
}
.pile .print {
  position: absolute;
}
.pile .p-cactus {
  width: 54%;
  left: 2%;
  top: 0;
  z-index: 2;
}
.pile .p-archway {
  width: 40%;
  right: 1%;
  top: 9%;
  z-index: 1;
}
.pile .p-bean {
  width: 47%;
  right: 4%;
  bottom: 6%;
  z-index: 3;
}
.pile .p-soccer {
  width: 36%;
  left: 6%;
  bottom: 0;
  z-index: 4;
}
.pile .p-balcony {
  width: 24%;
  left: 43%;
  top: 46%;
  z-index: 5;
}
@media (min-width: 900px) {
  .about {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 4rem;
  }
  .pile {
    order: -1;
    margin-top: -5rem;
  }
}
@media (min-width: 900px) {
  .print-notebook {
    right: 4%;
    top: -2.5rem;
    width: 300px;
  }
}
.contact .links {
  font-size: 1.2rem;
  gap: 0.4rem 1.8rem;
}
@media (max-width: 520px) {
  .contact .links {
    font-size: 1.1rem;
    gap: 0.4rem 1.1rem; /* all four on one line */
  }
}

/* ---------- project write-ups: one calm column ---------- */
.calm main {
  max-width: calc(var(--measure) + 2 * clamp(1.1rem, 5vw, 2.5rem));
}
.calm .top,
.calm .foot {
  max-width: calc(var(--measure) + 2 * clamp(1.1rem, 5vw, 2.5rem));
}
.calm .topo-wrap {
  opacity: 0.55;
}
.writeup header {
  padding-top: clamp(2rem, 7vw, 4rem);
  margin-bottom: 2.2rem;
}
.writeup header h1 {
  font-size: clamp(2.6rem, 9vw, 4.2rem);
  font-weight: 380;
  letter-spacing: -0.02em;
}
.writeup .summary {
  font-size: 1.2rem;
  line-height: 1.5;
  margin: 1rem 0 0.9rem;
}
.writeup .meta {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.2rem;
}
.prose h2 {
  font-size: 1.75rem;
  margin: 2.8rem 0 0.8rem;
}
.prose h3 {
  font-size: 1.25rem;
  margin: 1.8rem 0 0.5rem;
}
.prose ul,
.prose ol {
  padding-left: 1.2rem;
  margin: 0 0 1.1em;
}
.prose li {
  margin-bottom: 0.45em;
}
.prose li::marker {
  color: var(--accent);
}
.prose strong {
  font-weight: 620;
}
.prose code {
  font-size: 0.86em;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  padding: 0.08em 0.38em;
  border-radius: 6px;
}
.prose .table-wrap {
  overflow-x: auto;
  margin: 1.4rem 0;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}
.prose th {
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--ink-soft);
  padding: 0 1rem 0.5rem 0;
  white-space: nowrap;
}
.prose td {
  padding: 0.55rem 1rem 0.55rem 0;
  border-top: 1px solid var(--contour-strong);
  vertical-align: top;
}
.prose td:first-child {
  min-width: 7rem;
}
.prose td:last-child {
  white-space: normal; /* the result column wraps instead of running off the page */
  min-width: 8.5rem;
}
.prose td:not(:first-child) {
  font-family: var(--mono);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 560px) {
  /* six columns have to fit a phone: drop the roomy minimums and let headers wrap */
  .prose table {
    font-size: 0.9rem;
  }
  .prose th {
    white-space: normal;
    vertical-align: bottom;
    padding-right: 0.6rem;
    line-height: 1.25;
  }
  .prose td {
    padding-right: 0.6rem;
  }
  .prose td:first-child {
    min-width: 0;
  }
  .prose td:last-child {
    min-width: 4.2rem;
  }
  .prose td:not(:first-child) {
    font-size: 0.8rem;
  }
}
@media (max-width: 560px) {
  /* a four-column comparison (label, a, b, verdict): each row becomes a small card, the
     label on top, the two systems side by side under their names, the verdict last */
  .prose table:has(td:nth-child(4):last-child) thead tr,
  .prose table:has(td:nth-child(4):last-child) tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 0.8rem;
  }
  .prose table:has(td:nth-child(4):last-child) th:first-child,
  .prose table:has(td:nth-child(4):last-child) th:last-child {
    display: none;
  }
  .prose table:has(td:nth-child(4):last-child) td {
    border-top: 0;
    padding: 0.15rem 0;
    min-width: 0;
  }
  .prose table:has(td:nth-child(4):last-child) td:first-child,
  .prose table:has(td:nth-child(4):last-child) td:last-child {
    grid-column: 1 / -1;
  }
  .prose table:has(td:nth-child(4):last-child) td:first-child {
    border-top: 1px solid var(--contour-strong);
    padding-top: 0.6rem;
    font-weight: 600;
  }
  .prose table:has(td:nth-child(4):last-child) td:last-child {
    font-family: var(--sans);
    font-size: 0.9rem;
    color: var(--mark);
    padding-bottom: 0.5rem;
  }
}
.prose blockquote {
  margin: 1.4rem 0;
  padding: 0.1rem 0 0.1rem 1.1rem;
  border-left: 2px solid var(--accent);
  border-radius: 2px;
  color: var(--ink-soft);
}
.prose .hand-note {
  color: var(--accent-ink);
  transform: rotate(-2deg);
  transform-origin: left;
  margin: 0.2rem 0 1.4rem;
}
.prose .hand-notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  gap: 0.5rem 2rem;
}
.prose .hand-note.tilt {
  transform: rotate(3deg);
  margin-top: 0.8rem;
}
.diagram {
  margin: 1.8rem 0 2rem;
}
.diagram svg {
  width: 100%;
  height: auto;
  display: block;
  font-family: var(--sans);
}
.diagram .node {
  fill: color-mix(in srgb, var(--accent) 20%, var(--paper));
  stroke: none;
}
.diagram .node.quiet {
  fill: color-mix(in srgb, var(--ink-soft) 11%, var(--paper));
}
.diagram text {
  fill: var(--ink);
  font-size: 14px;
  text-anchor: middle;
}
.diagram text.small {
  fill: var(--ink-soft);
  font-size: 11.5px;
}
.diagram text.label {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  fill: var(--accent-ink);
}
.diagram .wire {
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 1.3;
  stroke-linecap: round;
}
.diagram .wire.dash {
  stroke-dasharray: 3 5;
}
.diagram .tip {
  fill: var(--ink-soft);
}
.diagram figcaption {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-top: 0.6rem;
}
.back {
  margin-top: 3rem;
}

/* ---------- drawn figures: one row per thing, dots on a shared axis ---------- */
.plot {
  margin: 1.6rem 0 1.8rem;
}
.plot-grid {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  column-gap: 1.1rem;
}
.plot-head,
.plot-row,
.plot-axis {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: center;
}
.plot .q {
  font-size: 0.95rem;
  line-height: 1.3;
}
.plot .x {
  text-align: right;
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--mark);
  white-space: nowrap;
}
.plot .x.soft {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--ink-soft);
}
.plot .track {
  position: relative;
  display: block;
  height: 2.5rem;
}
.plot-row .track::before {
  content: '';
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid var(--contour-strong);
}
.plot-head .track {
  height: 1.7rem;
}
.plot .key {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1;
  white-space: nowrap;
  color: var(--ink);
}
.plot .key.duck,
.plot .key.med {
  color: var(--accent-ink);
}
.plot .key.tick {
  color: var(--mark);
}
/* two runs of one system: a short line with a dot at each end */
.plot .run {
  position: absolute;
  top: 50%;
  border-top: 1.5px solid currentColor;
  color: var(--mark);
}
.plot .run i {
  position: absolute;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -55%);
}
.plot .run i:last-child {
  left: 100%;
}
.plot .run.duck {
  color: var(--accent-ink);
}
.plot .run.duck i {
  background: var(--paper);
  border: 2px solid currentColor;
}
/* the stretch between the two systems: how far behind tickdb is */
.plot .span {
  position: absolute;
  top: 50%;
  height: 6px;
  margin-top: -3px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 26%, transparent);
}
.plot-axis .track {
  height: 1.7rem;
  border-top: 1px solid var(--ink-soft);
}
.plot .tickmark {
  position: absolute;
  top: 0;
  height: 4px;
  border-left: 1px solid var(--ink-soft);
}
.plot .tickmark.major {
  height: 7px;
}
.plot .tickmark b {
  position: absolute;
  top: 9px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  white-space: nowrap;
  color: var(--ink-soft);
}
.plot .tickmark:first-child b {
  transform: translateX(-2px);
}
.plot figcaption {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-top: 0.7rem;
}
/* the folds: a dot per test year, sized by its trades, against the median */
.folds .track {
  height: 2.3rem;
}
.folds .band {
  position: absolute;
  top: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
}
.folds .median {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1.5px dashed var(--accent);
}
.folds .dot {
  position: absolute;
  top: 50%;
  width: var(--d);
  height: var(--d);
  border-radius: 50%;
  background: var(--mark);
  transform: translate(-50%, -50%);
}
.plot.compact .q {
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.plot.compact .track {
  height: 2.1rem;
}
.plot.compact .plot-head .track {
  height: 1.5rem;
}
.plot.compact figcaption {
  font-size: 0.86rem;
  margin-top: 0.5rem;
}
@media (max-width: 560px) {
  /* on a phone the label and the number share a line and the track gets the full width */
  .plot-grid {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .plot-row .track,
  .plot-head .track,
  .plot-axis .track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .plot-row {
    padding-top: 0.55rem;
  }
  .plot-row .track,
  .plot.compact .plot-row .track {
    height: 1.7rem;
  }
  .plot-head > span:first-child,
  .plot-axis > span:not(.track) {
    display: none;
  }
  .plot-head .x {
    grid-column: 2;
  }
}

/* a flow as a trail with waypoints */
.route {
  margin: 1.6rem 0 1.8rem;
}
.route .leg + .leg {
  margin-top: 1.1rem;
}
.route .leg-name {
  margin: 0 0 0.1rem;
  font-size: 0.92rem;
  color: var(--accent-ink);
}
.route .strip {
  position: relative;
  /* every waypoint is the same width, so a short leg is a short strip */
  width: calc(var(--n) / 7 * 100%);
}
.route .trail {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 44px;
  overflow: visible;
}
.route .trail path {
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 1.6px;
  stroke-dasharray: 1 7;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.route ol {
  list-style: none;
  margin: 0;
  padding: 44px 0 0;
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  position: relative;
}
.route li {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  margin: 0;
  padding: 0.35rem 0.2rem 0;
  line-height: 1.2;
}
.route li::before {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(var(--y) - 44px);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent-ink);
  transform: translate(-50%, -50%);
}
.route .office li::before {
  border-radius: 2px;
}
.route li:last-child::before {
  width: 13px;
  height: 13px;
  background: var(--mark);
  border-color: var(--mark);
}
.route .n {
  font-size: 0.72rem;
  color: var(--ink-soft);
}
.route .what {
  font-size: 0.86rem;
}
.route figcaption {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-top: 0.8rem;
}
.route.compact figcaption {
  font-size: 0.86rem;
}
@media (max-width: 620px) {
  /* on a phone the trail runs down the page */
  .route .trail {
    display: none;
  }
  .route .strip {
    width: auto;
  }
  .route ol {
    grid-template-columns: 1fr;
    padding: 0 0 0 1.5rem;
    gap: 0.3rem;
  }
  .route ol::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 0.7rem;
    bottom: 0.7rem;
    border-left: 2px dotted var(--ink-soft);
  }
  .route li {
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
    text-align: left;
    padding: 0.1rem 0;
  }
  .route li::before {
    left: calc(-1.5rem + 6px);
    top: 0.75em;
  }
  .route .n {
    min-width: 1.15rem;
    text-align: right;
  }
  .route .what {
    font-size: 0.95rem;
  }
}

/* the trading rule, to drag */
.zrule {
  margin: 1.8rem 0 2.2rem;
}
.z-state {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.9rem;
  margin: 0;
  min-height: 4.4em; /* room for the longest line, so the page doesn't jump while dragging */
}
@media (max-width: 560px) {
  .z-state {
    min-height: 7.6em;
  }
}
.z-val {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--accent-ink);
  min-width: 5.6rem;
}
.z-pos {
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.12em 0.7em;
  border-radius: 999px;
  border: 1px solid var(--ink-soft);
  color: var(--ink-soft);
}
.z-pos[data-pos='long'],
.z-pos[data-pos='short'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.z-pos[data-pos='stopped'] {
  border-style: dashed;
  color: var(--ink);
}
.z-what {
  flex-basis: 100%;
  color: var(--ink-soft);
}
.z-track {
  position: relative;
  height: 44px;
  margin-bottom: 3.4rem;
  --wait: color-mix(in srgb, var(--ink-soft) 13%, transparent);
  --enter: color-mix(in srgb, var(--ink) 34%, transparent);
  --halt: color-mix(in srgb, var(--ink) 74%, transparent);
  --leave: color-mix(in srgb, var(--accent) 62%, transparent);
}
/* inset by half the handle's width, so the lines sit where the handle's centre points */
.z-zones,
.z-marks {
  position: absolute;
  left: 8px;
  right: 8px;
}
.z-zones {
  top: 16px;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(
    to right,
    var(--halt) 0 var(--stopL),
    var(--enter) var(--stopL) var(--entL),
    var(--wait) var(--entL) var(--exL),
    var(--leave) var(--exL) var(--exR),
    var(--wait) var(--exR) var(--entR),
    var(--enter) var(--entR) var(--stopR),
    var(--halt) var(--stopR) 100%
  );
}
.z-marks {
  top: 38px;
}
.z-marks span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  padding-top: 9px;
  border-left: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.25;
  text-align: center;
  color: var(--ink-soft);
  width: min-content;
}
.z-marks span::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  height: 6px;
  border-left: 1px solid var(--ink-soft);
}
.z-track input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: grab;
  touch-action: pan-y;
}
.z-track input:active {
  cursor: grabbing;
}
.z-track input::-webkit-slider-runnable-track {
  height: 44px;
  background: transparent;
}
.z-track input::-moz-range-track {
  height: 44px;
  background: transparent;
}
.z-track input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 36px;
  margin-top: 4px;
  border-radius: 8px;
  background: var(--ink);
  border: 2.5px solid var(--paper);
  box-shadow: 0 1px 4px var(--print-shadow);
}
.z-track input::-moz-range-thumb {
  width: 11px;
  height: 31px;
  border-radius: 8px;
  background: var(--ink);
  border: 2.5px solid var(--paper);
  box-shadow: 0 1px 4px var(--print-shadow);
}
.zrule figcaption {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ---------- slow and small, or not at all ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ---------- figures arrive as they scroll in ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .entry-plot .folds .run,
    .entry-plot .folds .span {
      animation: draw-in linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 35%;
      transform-origin: left center;
    }
    .entry-plot .folds .dot {
      animation: dot-in linear both;
      animation-timeline: view();
      animation-range: entry 15% cover 35%;
    }

  }
}
@keyframes draw-in {
  from {
    clip-path: inset(-10px 100% -10px -10px);
  }
  to {
    clip-path: inset(-10px -10px -10px -10px);
  }
}
@keyframes dot-in {
  from {
    opacity: 0;
    scale: 0.2;
  }
}

/* ---------- phone fixes ---------- */
/* the sitting dog and its sun need room of their own under the last links */
/* the sitting walker and the dragon get a strip of their own under the last lines */
.foot {
  padding-bottom: 9rem;
}
@media (min-width: 1240px) {
  .foot {
    padding-bottom: 14rem;
  }
}
.prose a,
.writeup .meta a {
  overflow-wrap: anywhere;
}

/* ---------- the home page previews, playing on a loop (like the thing itself) ---------- */
.hero .where-from {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  margin: -0.2rem 0 0.4rem;
}
.route-status {
  position: relative;
  height: 1.3rem;
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--mark);
}
.route-status span {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
}
.zrule.compact {
  margin-top: 1.6rem;
}
@media (prefers-reduced-motion: no-preference) {
  /* tickdb: a timer sweeps the log axis and each system's runs land as it passes them.
     the faster system on each row lands first */
  .entry-plot .bench .plot-row .track::after {
    content: '';
    position: absolute;
    top: 15%;
    bottom: 15%;
    left: 0;
    border-left: 1.5px solid var(--mark);
    opacity: 0;
    animation: sweep 8s linear infinite;
  }
  /* the whole row is uncovered left to right behind the timer, so each dot appears the moment
     the timer reaches its time */
  .entry-plot .bench .plot-row .track {
    animation: land 8s linear infinite;
  }
  /* wissehr: a foreman walks the seven steps, taps submit, taps it again, still one copy */
  .entry-plot .route li::before {
    animation: step-on 9s ease-out infinite;
    animation-delay: calc(var(--i) * 0.55s);
  }
  .entry-plot .route li:last-child::before {
    animation:
      step-on 9s ease-out infinite,
      tap 9s ease-out infinite;
    animation-delay: 3.3s, 0s;
  }
  .route-status .s1 {
    animation: status-1 9s ease infinite;
  }
  .route-status .s2 {
    animation: status-2 9s ease infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  .route-status .s1 {
    opacity: 1;
  }
}
@keyframes sweep {
  0% {
    left: 0;
    opacity: 0.9;
  }
  28% {
    left: 100%;
    opacity: 0.9;
  }
  31%,
  100% {
    left: 100%;
    opacity: 0;
  }
}
/* the reveal follows the sweep: opened left to right in the first 28%, then held */
@keyframes land {
  0% {
    clip-path: inset(-12px 100% -12px -12px);
  }
  28%,
  100% {
    clip-path: inset(-12px -12px -12px -12px);
  }
}
@keyframes step-on {
  0% {
    background: var(--paper);
    border-color: var(--accent-ink);
  }
  4%,
  62% {
    background: var(--mark);
    border-color: var(--mark);
  }
  70%,
  100% {
    background: var(--paper);
    border-color: var(--accent-ink);
  }
}
@keyframes tap {
  0%,
  37% {
    scale: 1;
  }
  40% {
    scale: 1.6;
  }
  43%,
  51% {
    scale: 1;
  }
  54% {
    scale: 1.6;
  }
  57%,
  100% {
    scale: 1;
  }
}
@keyframes status-1 {
  0%,
  40% {
    opacity: 0;
    translate: 0 4px;
  }
  43%,
  52% {
    opacity: 1;
    translate: 0 0;
  }
  55%,
  100% {
    opacity: 0;
  }
}
@keyframes status-2 {
  0%,
  55% {
    opacity: 0;
    translate: 0 4px;
  }
  58%,
  80% {
    opacity: 1;
    translate: 0 0;
  }
  86%,
  100% {
    opacity: 0;
  }
}

/* ---------- poke the dragon ---------- */
button.dragon {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  pointer-events: auto;
  z-index: 2;
}
button.dragon:focus-visible {
  outline-offset: 6px;
}
.poke-hint {
  position: absolute;
  top: -1.4rem;
  right: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
@media (max-width: 1239px) {
  /* on a phone the hint goes under the dragon, clear of the last line of the footer */
  .poke-hint {
    top: auto;
    bottom: -1.5rem;
    right: auto;
    left: 0.5rem;
  }
}
.dragon .fire {
  color: var(--mark);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 100% 55%;
}
.dragon.roar .fire {
  animation: roar 1.5s ease-out;
}
.dragon.roar .body {
  animation: rear 1.5s ease-out;
}
@keyframes roar {
  0% {
    opacity: 0;
    scale: 0.1 0.5;
  }
  14% {
    opacity: 1;
    scale: 1 1;
  }
  30% {
    scale: 1.08 0.9;
  }
  46% {
    scale: 0.96 1.08;
  }
  70% {
    opacity: 1;
    scale: 1.04 1;
  }
  100% {
    opacity: 0;
    scale: 1.15 1.2;
  }
}
@keyframes rear {
  0%,
  100% {
    translate: 0 0;
    rotate: 0deg;
  }
  12% {
    translate: 0 -3px;
    rotate: -2deg;
  }
  60% {
    translate: 0 -2px;
    rotate: -1deg;
  }
}

/* ---------- the tickdb chart: legend, where it was, who's faster ---------- */
.bench .legend {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  align-items: baseline;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.86rem;
  padding-bottom: 0.5rem;
}
.bench .lg-x {
  margin-left: auto;
}
.bench .lg {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.bench .lg i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.bench .lg.tick {
  color: var(--mark);
}
.bench .lg.tick i {
  background: var(--mark);
}
.bench .lg.duck {
  color: var(--accent-ink);
}
.bench .lg.duck i {
  border: 2px solid var(--accent-ink);
}
.bench .x.duckdb {
  color: var(--accent-ink);
}
.bench .x.tickdb {
  color: var(--mark);
}
.bench .x {
  white-space: nowrap;
  display: grid;
  justify-items: end;
  line-height: 1.05;
}
.bench .x small {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.78rem;
  font-weight: 400;
}

.prose td:last-child:not(:first-child) {
  white-space: normal;
  font-family: var(--sans);
  font-size: 0.9rem;
  min-width: 7rem;
}
