:root {
  color-scheme: light dark;
  --paper: #f7f0e3;
  --surface: #fffaf0;
  --surface-2: #efe5d3;
  --ink: #2b201c;
  --ink-muted: #6e5c52;
  --rule: #dccdb5;
  --accent: #a8322d;
  --accent-ink: #fffaf0;
  --accent-soft: #f3dcd3;
  --accent-strong: #8c2723;
  --yarn: #c9a77c;
  --yarn-shade: #a9845a;

  --shadow-card:
    0 1px 2px rgb(74 46 30 / 0.08), 0 6px 20px -8px rgb(74 46 30 / 0.18);
  --shadow-raised:
    0 2px 4px rgb(74 46 30 / 0.1), 0 12px 28px -10px rgb(74 46 30 / 0.28);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --overshoot: cubic-bezier(0.34, 1.56, 0.64, 1);

  --serif:
    "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --gutter: 24px;
  --rhythm: clamp(4rem, 8vw, 8rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #221a22;
    --surface: #2e2430;
    --surface-2: #3a2e3c;
    --ink: #f2e8dc;
    --ink-muted: #c2b1a6;
    --rule: #4b3d4d;
    --accent: #e2716a;
    --accent-ink: #221a22;
    --accent-soft: #4a2a30;
    --accent-strong: #ee8f88;
    --yarn: #8a7466;
    --yarn-shade: #6b5a50;

    --shadow-card:
      0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -10px rgb(0 0 0 / 0.5);
    --shadow-raised:
      0 2px 4px rgb(0 0 0 / 0.35), 0 14px 32px -10px rgb(0 0 0 / 0.6);
  }
}

@media (min-width: 720px) {
  :root {
    --gutter: 48px;
  }
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 50;
  line-height: 1.1;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.625rem);
}

h3 {
  font-size: 1.375rem;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
}

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

main:focus {
  outline: none;
}

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

.defs {
  position: absolute;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.accent {
  color: var(--accent);
}

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

.skip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

.stitched-rule {
  display: block;
  width: 100%;
  height: 2px;
  overflow: visible;
}

.stitched-rule line {
  stroke: var(--rule);
  stroke-width: 2;
  stroke-dasharray: 6 6;
}

/* ---------- Buttons and links ---------- */

.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  min-height: 52px;
  padding: 0 28px;
  background: var(--accent);
  color: var(--accent-ink);
  transition: background-color 120ms var(--ease);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-primary .arrow {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms var(--ease);
}

.btn-primary:hover .arrow {
  transform: translateX(3px);
}

.btn-outline {
  min-height: 44px;
  padding: 0 20px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent-soft);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.text-link:hover {
  text-decoration-color: var(--accent);
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  font-variation-settings: "SOFT" 50;
  letter-spacing: -0.02em;
}

.mark {
  flex: none;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mark-legs {
  stroke: var(--ink);
}

.mark-needle {
  stroke: var(--rule);
}

.mark-knot {
  fill: var(--accent);
  stroke: none;
}

/* ---------- Shared pieces ---------- */

.card {
  min-width: 0;
  padding: 20px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

@media (min-width: 720px) {
  .card {
    padding: 32px;
  }
}

.result-panel {
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  border-radius: 18px;
  background: var(--accent-soft);
}

.notation {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 500;
  font-variation-settings:
    "opsz" 24,
    "SOFT" 50;
  line-height: 1.35;
  font-variant-numeric: lining-nums tabular-nums;
}

.shape {
  color: var(--accent);
}

/* One repeat group never breaks across lines; lines break only between groups. */
.rep {
  white-space: nowrap;
}

.result-note,
.fine,
.caption {
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.caption {
  font-size: 0.8125rem;
}

.intro {
  max-width: 52ch;
  margin-top: 16px;
  color: var(--ink-muted);
}

.kicker {
  margin-bottom: 12px;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.small-print {
  display: grid;
  gap: 6px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-muted);
}

.small-print li {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.small-print li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-2px);
}

.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  gap: 48px;
  padding-block: clamp(2rem, 6vw, 5rem) var(--rhythm);
}

.hero > * {
  min-width: 0;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 5fr 6fr;
    align-items: center;
  }
}

.eyebrow {
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin-top: 16px;
  font-size: clamp(2.5rem, 1.6rem + 4.2vw, 5rem);
  line-height: 1.02;
  font-variation-settings:
    "opsz" 144,
    "SOFT" 50;
}

.h1-line {
  display: block;
}

.lede {
  max-width: 34ch;
  margin-top: 24px;
  color: var(--ink-muted);
  font-size: 1.1875rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 32px;
}

.fine {
  margin-top: 16px;
}

.hero-figure {
  display: grid;
  gap: 24px;
  width: 100%;
  max-width: 480px;
  margin: 0;
  margin-inline: auto;
}

.ring-slot:empty {
  display: none;
}

.ring-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  aspect-ratio: 1;
}

.ring {
  display: block;
  width: 100%;
  height: 100%;
}

.ring .st {
  fill: var(--yarn);
  stroke: var(--yarn-shade);
  stroke-width: 0.8;
}

.ring .m1 {
  fill: var(--accent);
  stroke: var(--accent);
  stroke-width: 0.8;
}

.ring use {
  transform-box: fill-box;
  transform-origin: center;
}

.ring-centre {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}

.ring-number {
  font-family: var(--serif);
  font-size: clamp(2rem, 9vw, 2.75rem);
  font-weight: 600;
  font-variation-settings: "SOFT" 50;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: lining-nums tabular-nums;
}

.ring-sub {
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.ring.play .turn {
  animation: ring-turn 250ms var(--ease) 950ms both;
}

.ring.play .st {
  animation: stitch-in 300ms var(--ease) both;
}

.ring.play .m1 {
  animation: m1-drop 300ms var(--overshoot) both;
}

@keyframes ring-turn {
  from {
    transform: rotate(-3.4deg);
  }
}

@keyframes stitch-in {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}

@keyframes m1-drop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ---------- How it works ---------- */

.how {
  padding-block: var(--rhythm);
}

.steps {
  position: relative;
  margin-top: 48px;
}

.steps ol {
  display: grid;
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 20px;
  min-width: 0;
}

.step > :not(.numeral) {
  grid-column: 2;
}

/* The padding is paper, so the dashed rule stops 12px clear of each numeral. */
.numeral {
  grid-row: 1 / span 3;
  align-self: start;
  width: calc(2.5rem + 24px);
  margin: -12px 0 -12px -12px;
  padding: 12px;
  color: var(--accent);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 600;
  font-variation-settings:
    "opsz" 144,
    "SOFT" 50;
  line-height: 1;
  text-align: center;
  font-variant-numeric: lining-nums tabular-nums;
}

.step .icon {
  margin-bottom: 8px;
  color: var(--ink-muted);
}

.step h3 {
  margin-bottom: 6px;
}

.step p {
  color: var(--ink-muted);
}

.steps-line {
  position: absolute;
  overflow: visible;
  pointer-events: none;
}

.steps-line .dash {
  stroke: var(--rule);
  stroke-width: 2;
  stroke-dasharray: 6 6;
}

.steps-line mask {
  mask-type: alpha;
}

.steps-line .draw {
  stroke: currentColor;
  stroke-width: 6;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.steps-line-x {
  display: none;
}

.steps-line-y {
  top: 3rem;
  bottom: 3rem;
  left: 1.25rem;
  width: 2px;
  height: calc(100% - 6rem);
}

@media (min-width: 900px) {
  .steps ol {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }

  .step {
    grid-template-columns: 1fr;
  }

  .step > :not(.numeral) {
    grid-column: 1;
  }

  .numeral {
    grid-row: auto;
    width: auto;
    margin: 0 0 16px -12px;
    padding: 0 12px;
    justify-self: start;
  }

  .steps-line-y {
    display: none;
  }

  .steps-line-x {
    display: block;
    top: 1.5rem;
    left: 2.5rem;
    width: calc((100% - 80px) * 2 / 3 + 80px - 2.5rem);
    height: 2px;
  }
}

.js .how.pending .steps-line .draw {
  stroke-dashoffset: 1;
}

.js .how.pending .step {
  opacity: 0;
  transform: translateY(12px);
}

.js .how .steps-line .draw {
  transition: stroke-dashoffset 900ms linear;
}

.js .how .step {
  transition:
    opacity 400ms var(--ease),
    transform 400ms var(--ease);
}

.js .how .step:nth-child(2) {
  transition-delay: 450ms;
}

.js .how .step:nth-child(3) {
  transition-delay: 900ms;
}

/* ---------- Features ---------- */

.features {
  display: grid;
  gap: var(--rhythm);
  padding-block: var(--rhythm);
}

.feature {
  display: grid;
  gap: 32px;
  align-items: center;
}

.feature > * {
  min-width: 0;
}

.feature-text > p:not(.kicker) {
  margin-top: 16px;
  max-width: 60ch;
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }

  .feature.flip .feature-text {
    order: 2;
  }
}

/* Gauge figure */

.swatches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.swatch {
  min-width: 0;
  margin: 0;
}

.swatch svg {
  display: block;
  width: 100%;
  height: auto;
}

.swatch-ground {
  fill: var(--surface-2);
}

.swatch-fill {
  fill-opacity: 1;
}

.swatch use,
.stitch-band use {
  fill: var(--yarn);
  stroke: var(--yarn-shade);
  stroke-width: 0.5;
}

.swatch figcaption {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.swatch figcaption strong {
  color: var(--ink);
}

.tape {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 16px;
}

.tape-band {
  fill: var(--surface-2);
}

.tape line {
  stroke: var(--ink-muted);
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: top;
}

.tape text {
  fill: var(--ink-muted);
  font-family: var(--sans);
  font-size: 9px;
  text-anchor: middle;
}

.gauge-result {
  display: grid;
  gap: 6px;
  margin-top: 20px;
}

.gauge-result .muted {
  font-size: 0.9375rem;
}

.answer,
.answer-sm {
  color: var(--accent);
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "SOFT" 50;
  font-variant-numeric: lining-nums tabular-nums;
}

.answer {
  font-size: 2.5rem;
  line-height: 1.1;
}

.answer-sm {
  font-size: 1.375rem;
}

.js .gauge-fig.pending .tape line {
  opacity: 0;
  transform: scaleY(0);
}

.js .gauge-fig .tape line {
  transition:
    opacity 120ms var(--ease),
    transform 120ms var(--ease);
}

.js .gauge-fig.wait .multiple {
  opacity: 0;
}

.js .gauge-fig.counted .multiple {
  animation: rise-in 320ms var(--ease) both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

/* Spread demo */

.spread-fig {
  display: grid;
  gap: 16px;
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
}

.segmented button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.segmented [aria-checked="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

.spread-fig .notation {
  transition: opacity 150ms var(--ease);
}

.spread-fig .notation.fading {
  opacity: 0;
}

.key {
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

.row-strip {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.row-strip .plain {
  fill: var(--yarn);
  stroke: var(--yarn-shade);
  stroke-width: 0.5;
}

.row-strip .inc {
  fill: var(--accent);
  stroke: var(--accent);
  stroke-width: 0.5;
  transition: transform 300ms var(--ease);
}

/* Counter figure */

.counter-card {
  display: grid;
  gap: 16px;
}

.project-title {
  font-size: 1.375rem;
}

.counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  background: var(--paper);
}

.counter-info {
  min-width: 0;
}

.counter-name {
  font-weight: 600;
}

.count {
  position: relative;
  display: inline-block;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 600;
  font-variation-settings: "SOFT" 50;
  line-height: 1.15;
  font-variant-numeric: lining-nums tabular-nums;
}

.count span {
  display: inline-block;
}

.count .out {
  position: absolute;
  left: 0;
  top: 0;
}

.count .roll-out-up {
  animation: roll-out-up 200ms var(--ease) forwards;
}

.count .roll-in-up {
  animation: roll-in-up 200ms var(--ease) both;
}

.count .roll-out-down {
  animation: roll-out-down 200ms var(--ease) forwards;
}

.count .roll-in-down {
  animation: roll-in-down 200ms var(--ease) both;
}

@keyframes roll-out-up {
  to {
    opacity: 0;
    transform: translateY(-0.4em);
  }
}

@keyframes roll-in-up {
  from {
    opacity: 0;
    transform: translateY(0.4em);
  }
}

@keyframes roll-out-down {
  to {
    opacity: 0;
    transform: translateY(0.4em);
  }
}

@keyframes roll-in-down {
  from {
    opacity: 0;
    transform: translateY(-0.4em);
  }
}

.repeat-line {
  color: var(--ink-muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.repeat {
  transition: color 200ms var(--ease);
}

.repeat.tint {
  color: var(--accent);
}

.keys {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.keys .key-minus,
.keys .key-plus {
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.keys .key-minus {
  width: 64px;
  height: 64px;
  border: 1.5px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
}

.keys .key-plus {
  width: 80px;
  height: 72px;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.25rem;
}

.keys button {
  cursor: pointer;
}

.keys button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.counter-fig .caption {
  margin-top: 12px;
  text-align: center;
}

@media (max-width: 420px) {
  .keys .key-minus {
    width: 52px;
  }

  .keys .key-plus {
    width: 64px;
  }
}

/* ---------- The real app ---------- */

.live {
  padding-block: var(--rhythm);
  text-align: center;
}

.live .intro {
  margin-inline: auto;
}

.live-layout {
  display: grid;
  gap: 20px;
  margin-top: 40px;
  text-align: left;
}

.live-layout > * {
  min-width: 0;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
}

.tabs button {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tabs [aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

.tabs .icon,
.tab-desc {
  display: none;
}

.phone {
  border: 1.5px solid var(--rule);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
}

.phone-screen iframe {
  display: block;
  width: 100%;
  height: min(78svh, 720px);
  border: 0;
  background: var(--paper);
  transition: opacity 200ms var(--ease);
}

.phone-screen iframe.loading {
  opacity: 0.4;
}

@media (min-width: 720px) {
  .live-layout {
    grid-template-columns: minmax(0, 18rem) auto;
    justify-content: center;
    align-items: center;
    gap: 48px;
  }

  .tabs {
    flex-direction: column;
    gap: 12px;
    padding: 0;
    border-radius: 0;
    background: none;
  }

  .tabs button {
    display: grid;
    flex: none;
    grid-template-columns: 24px 1fr;
    column-gap: 14px;
    justify-content: stretch;
    align-items: start;
    padding: 16px 20px;
    border-left: 3px solid transparent;
    border-radius: 18px;
    color: var(--ink);
    text-align: left;
  }

  .tabs button:hover {
    background: var(--surface);
  }

  .tabs [aria-selected="true"],
  .tabs [aria-selected="true"]:hover {
    border-left-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: none;
  }

  .tabs .icon {
    display: block;
    grid-row: 1 / span 2;
    margin-top: 2px;
    color: var(--accent);
  }

  .tab-name {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-variation-settings: "SOFT" 50;
  }

  .tab-desc {
    display: block;
    color: var(--ink-muted);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.4;
  }

  .phone {
    padding: 10px;
    border: 0;
    border-radius: 44px;
    background: color-mix(in srgb, var(--ink) 90%, transparent);
    box-shadow: var(--shadow-raised);
  }

  .phone-screen {
    overflow: hidden;
    border-radius: 34px;
    background: var(--surface);
  }

  .phone-screen iframe {
    width: 390px;
    height: 780px;
  }
}

.js .live-layout.pending .phone {
  opacity: 0;
  transform: translateY(24px);
}

.js .live-layout .phone {
  transition:
    opacity 500ms var(--ease),
    transform 500ms var(--ease);
}

.center {
  margin-top: 24px;
  text-align: center;
}

/* ---------- The small things ---------- */

.small-things {
  padding-block: var(--rhythm);
  background: var(--surface-2);
}

.small-things dl {
  display: grid;
  gap: 28px 64px;
  margin: 40px 0 0;
}

.small-things dl > div {
  min-width: 0;
}

.small-things dt {
  font-weight: 700;
}

.small-things dd {
  margin: 4px 0 0;
  color: var(--ink-muted);
}

@media (min-width: 720px) {
  .small-things dl {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Closing ---------- */

.closing {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 20px;
  padding-block: calc(var(--rhythm) * 1.5) var(--rhythm);
  text-align: center;
  isolation: isolate;
  overflow-x: clip;
}

.closing h2 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.5rem);
  font-variation-settings:
    "opsz" 144,
    "SOFT" 50;
}

.closing p {
  max-width: 40ch;
  color: var(--ink-muted);
}

.stitch-band {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 0;
  width: calc(100% + 40px);
  height: 48px;
  margin-top: -24px;
  opacity: 0.4;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    #000 25%,
    #000 75%,
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 25%,
    #000 75%,
    transparent
  );
  animation: drift 60s linear infinite;
}

.stitch-band use {
  fill: none;
  stroke: var(--rule);
  stroke-width: 0.7;
}

@keyframes drift {
  to {
    transform: translateX(-40px);
  }
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 0 40px;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.footer-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 28px;
}

.footer-row p {
  min-width: 0;
}

@media (min-width: 900px) {
  .footer-row {
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }
}

/* ---------- Reduced motion ---------- */

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .pending .step,
  .js .pending .phone,
  .js .wait .multiple,
  .js .pending .tape line {
    opacity: 1 !important;
    transform: none !important;
  }

  .js .how.pending .steps-line .draw {
    stroke-dashoffset: 0 !important;
  }
}
