/* One Thread: a single navy thread sews the story together, from a spool in 1955 to the heart of the
   70th anniversary logo and the two websites. The page is tailor's pattern paper; its colour moves from
   sepia to today as the years pass. Without JavaScript there is no thread and everything else stands. */

.v-thread {
  --ink: #2b2118;
  --soft: #5c4d40;
  --accent: #8c3a1e;
  --bg: #ece4d6;
  --grid: rgb(8 40 88 / 0.07);
  --object-filter: sepia(0.42) saturate(0.72) contrast(1.02);
  --display: 'Libre Caslon Display', 'Libre Caslon Text', Georgia, serif;
  --serif: 'Libre Caslon Text', Georgia, serif;
  --site-ground: var(--bg);
  --site-ink: var(--ink);
  --site-progress: var(--color-navy-900);
  /* The site frame within the full width: the margin either side of it, and its width. Only for
     horizontal positions where 100% is the full width: the chapters' padding, what is placed in a
     chapter, and the dial. */
  --frame-margin: max(0px, 50% - var(--site-frame) / 2);
  --frame-width: min(100%, var(--site-frame));
  font-family: Poppins, var(--font-family-sans);
  background: var(--bg);
  color: var(--ink);
  transition: background-color 900ms var(--motion-easing-out), color 900ms var(--motion-easing-out);
}

/* Era palettes, set on <body data-era> by the script and on each chapter for the still layout. */
.v-thread[data-era='1955'],
.no-motion .chapter[data-era='1955'],
.motion-failed .chapter[data-era='1955'] {
  --ink: #2b2118;
  --soft: #5c4d40;
  --accent: #8c3a1e;
  --bg: #ece4d6;
  --object-filter: sepia(0.42) saturate(0.72) contrast(1.02);
}

.v-thread[data-era='1970s'],
.no-motion .chapter[data-era='1970s'],
.motion-failed .chapter[data-era='1970s'] {
  --ink: #2a1d14;
  --soft: #5e4a3a;
  --accent: #a33d0b;
  --bg: #efe3cf;
  --object-filter: sepia(0.18) saturate(0.92);
}

.v-thread[data-era='1980s'],
.no-motion .chapter[data-era='1980s'],
.motion-failed .chapter[data-era='1980s'] {
  --ink: #1f2a33;
  --soft: #4b5661;
  --accent: #0b6a99;
  --bg: #e7e8e2;
  --object-filter: saturate(0.96);
}

.v-thread[data-era='1990s'],
.no-motion .chapter[data-era='1990s'],
.motion-failed .chapter[data-era='1990s'] {
  --ink: #1b2a3a;
  --soft: #44546a;
  --accent: #00776c;
  --bg: #e9eef0;
  --object-filter: none;
}

.v-thread[data-era='2000s'],
.no-motion .chapter[data-era='2000s'],
.motion-failed .chapter[data-era='2000s'],
.v-thread[data-era='today'],
.no-motion .chapter[data-era='today'],
.motion-failed .chapter[data-era='today'] {
  --ink: #1b2a3a;
  --soft: #44546a;
  --accent: #bb4400;
  --bg: #f6f6f3;
  --object-filter: none;
}

.v-thread[data-era='care'],
.no-motion .chapter[data-era='care'],
.motion-failed .chapter[data-era='care'] {
  --ink: #ffffff;
  --soft: #d6e4f5;
  --accent: #e3b45a;
  --bg: #082858;
  --grid: rgb(255 255 255 / 0.05);
  --object-filter: none;
}

.v-thread[data-era='care'] {
  --site-header-ground: color-mix(in oklab, #082858 84%, transparent);
  --site-header-ink: #fff;
  --site-header-rule: rgb(255 255 255 / 0.14);
  --site-progress: #e3b45a;
}

.v-thread[data-era='care'] .brand-on-light {
  display: none;
}

.v-thread[data-era='care'] .site-header .brand-on-dark {
  display: block;
}

/* The navy Daylong Direct button would vanish into the navy header, so it gets an outline. */
.v-thread[data-era='care'] .site-nav-direct {
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.4);
}

/* Pattern paper: a faint centimetre grid with heavier lines every fifth square. */
.v-thread::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(rgb(8 40 88 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(8 40 88 / 0.035) 1px, transparent 1px);
  background-size: 190px 190px, 190px 190px, 38px 38px, 38px 38px;
}

.story {
  position: relative;
}

/* The thread */
.thread {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.thread-line,
.thread-shadow {
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.thread-shadow {
  stroke: rgb(20 10 0 / 0.16);
  stroke-width: 3.2;
  transform: translate(1.5px, 3px);
}

.no-motion .thread,
.motion-failed .thread {
  /* drawn whole and still when motion is off; hidden if the script never ran */
  display: var(--thread-display, none);
}

.needle {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 118px;
  height: auto;
  transform-origin: 93% 50%;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 3px 2px rgb(0 0 0 / 0.25));
}

/* Chapters run the full width, so the era colours and the knitted band reach the edges; what is in
   them keeps to the frame. */
.chapter {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  column-gap: clamp(16px, 2vw, 32px);
  min-height: 100svh;
  padding: clamp(96px, 16vh, 180px) calc(var(--frame-margin) + clamp(16px, 6vw, 96px));
}

.chapter-text {
  position: relative;
  z-index: 4;
  grid-column: 2 / span 5;
  grid-row: 1;
}

.flip .chapter-text {
  grid-column: 7 / span 5;
}

.object {
  position: relative;
  z-index: 1;
  grid-column: 8 / span 4;
  grid-row: 1;
  margin: 0;
  justify-self: center;
  width: min(100%, 520px);
}

.flip .object {
  grid-column: 2 / span 4;
}

.object img {
  width: 100%;
  height: auto;
  filter: var(--object-filter) drop-shadow(0 24px 22px rgb(40 24 8 / 0.22));
  transition: filter 900ms var(--motion-easing-out);
}

.big-year {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: calc(var(--frame-margin) - 2vw);
  translate: 0 -50%;
  font-family: var(--display);
  font-size: clamp(9rem, 4rem + 22vw, 26rem);
  line-height: 0.8;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in oklab, var(--ink) 16%, transparent);
  pointer-events: none;
  user-select: none;
}

.flip .big-year {
  right: auto;
  left: calc(var(--frame-margin) - 2vw);
}

.date {
  margin-bottom: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.4rem);
  color: var(--accent);
}

.chapter h2 {
  margin-bottom: 22px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.5rem, 1.6rem + 3.2vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
}

.chapter-text p:not(.date),
.knit-card p:not(.date) {
  max-width: 44ch;
  font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.18rem);
  line-height: 1.68;
  color: var(--ink);
}

.chapter-text p + p {
  margin-top: 14px;
}

.chapter q {
  font-family: var(--serif);
  font-style: italic;
}

.quote {
  position: relative;
  margin-top: 26px;
  padding-left: 22px;
}

.quote::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 0;
  border-left: 2px dashed var(--accent);
}

.quote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem) !important;
  line-height: 1.45 !important;
}

.quote footer {
  margin-top: 8px;
  font-size: 14px;
  color: var(--soft);
}

.kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 18px;
}

/* Hero */
.hero {
  min-height: 100svh;
  padding-top: clamp(110px, 18vh, 200px);
}

.hero-text {
  position: relative;
  z-index: 4;
  grid-column: 2 / span 6;
}

.hero-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.2rem, 1.8rem + 5.2vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}

.hero-title-a,
.hero-title-b {
  display: block;
}

.hero-title-b {
  font-style: italic;
  font-family: var(--serif);
  font-size: 0.86em;
  color: var(--accent);
}

.hero-lead {
  max-width: 46ch;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem);
  line-height: 1.65;
}

.hero-cue {
  margin-top: 32px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--soft);
}

.hero-spool {
  position: relative;
  z-index: 1;
  grid-column: 9 / span 3;
  margin: 0;
  width: min(100%, 360px);
  justify-self: center;
  rotate: -8deg;
}

.hero-spool img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 24px rgb(40 24 8 / 0.28));
}

/* 1955 */
.chapter-1955 {
  grid-template-rows: auto auto;
  row-gap: 40px;
}

.object-parcel {
  grid-row: 1;
}

.advert {
  position: relative;
  z-index: 4;
  grid-column: 8 / span 3;
  grid-row: 2;
  justify-self: start;
  width: min(100%, 300px);
  padding: 22px 20px 18px;
  background: #f8f1df;
  color: #1d1712;
  text-align: center;
  border: 2px solid #1d1712;
  outline: 1px solid #1d1712;
  outline-offset: -7px;
  rotate: -2.5deg;
  box-shadow: 0 18px 30px -16px rgb(40 24 8 / 0.5);
}

.advert-name {
  font-family: 'Sofia Sans Extra Condensed', 'Arial Narrow', sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.advert-line {
  margin: 10px 0 12px;
  font-family: 'Sofia Sans Extra Condensed', 'Arial Narrow', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.12;
}

.advert-promise {
  padding: 8px 0;
  border-block: 1.5px solid #1d1712;
  font-family: 'Sofia Sans Extra Condensed', 'Arial Narrow', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.advert-small {
  margin: 10px 0;
  font-family: 'Sofia Sans Extra Condensed', 'Arial Narrow', sans-serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.15;
}

.advert-address {
  font-family: 'Sofia Sans Extra Condensed', 'Arial Narrow', sans-serif;
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.advert-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -30px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--soft);
}

.object-telephone {
  grid-column: 11 / span 2;
  grid-row: 2;
  width: min(100%, 230px);
  align-self: end;
}

/* Reg */
.object-hat {
  width: min(100%, 440px);
}

/* The moves */
.chapter-moves {
  grid-template-rows: auto auto;
  row-gap: 30px;
}

.stops {
  position: relative;
  z-index: 4;
  grid-column: 7 / span 5;
  grid-row: 1 / span 2;
  display: grid;
  gap: clamp(26px, 5vh, 52px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.stop {
  position: relative;
  display: grid;
  gap: 2px;
  padding-left: 40px;
}

.stop::before {
  /* a buttonhole the thread passes through */
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  width: 16px;
  height: 16px;
  translate: 0 -50%;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--bg);
  transition: background-color 900ms var(--motion-easing-out);
}

.stop:nth-child(2) { margin-left: 12%; }
.stop:nth-child(3) { margin-left: 4%; }
.stop:nth-child(4) { margin-left: 18%; }
.stop:nth-child(5) { margin-left: 8%; }

.stop-place {
  font-family: var(--display);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.2rem);
  line-height: 1.05;
}

.stop-when {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
}

.object-keys {
  grid-column: 2 / span 3;
  grid-row: 2;
  width: min(100%, 300px);
}

/* 1977 */
.object-tie {
  width: min(100%, 360px);
}

/* 1980 */
.object-tape {
  width: min(100%, 420px);
}

/* 1981 */
.object-envelopes {
  width: min(100%, 470px);
}

/* 1990s: the knitted band */
.chapter-1990s {
  min-height: 110svh;
  padding-block: 0;
  overflow: hidden;
  isolation: isolate;
}

.knit {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.knit img {
  width: 100%;
  height: 130%;
  object-fit: cover;
  translate: 0 -10%;
}

.knit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(233 238 240 / 0.15), rgb(233 238 240 / 0) 55%);
}

.knit-card {
  position: relative;
  z-index: 4;
  grid-column: 2 / span 5;
  grid-row: 1;
  padding: clamp(26px, 3vw, 44px);
  background: rgb(255 255 255 / 0.92);
  color: #1b2a3a;
  border-radius: 4px;
  box-shadow: 0 30px 60px -30px rgb(40 24 8 / 0.5);
}

.knit-card h2 {
  color: #1b2a3a;
}

.object-stocking {
  width: min(100%, 380px);
}

/* 2000s */
.chapter-2000s {
  grid-template-rows: auto auto;
}

.object-mouse {
  grid-row: 1;
  width: min(100%, 300px);
  justify-self: end;
}

.object-laptop {
  grid-column: 2 / span 4;
  grid-row: 2;
  width: min(100%, 420px);
  justify-self: start;
  margin-top: -40px;
}

/* Speed. Accuracy. Choice. */
.chapter-sac {
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  grid-template-columns: 1fr;
  min-height: 90svh;
}

.sac {
  display: grid;
  font-size: clamp(3.4rem, 1.4rem + 8vw, 8.5rem) !important;
  line-height: 0.92 !important;
  margin-bottom: 26px !important;
}

.sac span:nth-child(2) {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
}

.sac-note {
  max-width: 42ch;
  font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.18rem);
  color: var(--soft);
}

/* 2020 */
.object-box {
  width: min(100%, 470px);
}

.logo-inline {
  width: 170px;
  margin-top: 20px;
}

/* 2022 */
.object-clock {
  width: min(100%, 300px);
}

/* 2025 */
.object-cupcake {
  width: min(100%, 250px);
}

/* The heart and CARE */
.chapter-heart {
  display: block;
  padding-inline: clamp(16px, 6vw, 96px);
  padding-bottom: clamp(80px, 14vh, 160px);
  color: var(--ink);
}

.heart-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: 100svh;
  min-height: 560px;
  margin-inline: calc(clamp(16px, 6vw, 96px) * -1);
}

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

.heart-line {
  stroke: #e3b45a;
}

.heart-stage .thread-shadow {
  stroke: rgb(0 0 0 / 0.28);
}

.heart-words {
  position: relative;
  z-index: 4;
  max-width: 520px;
  margin-top: -6%;
  text-align: center;
}

.heart-words h2 {
  margin-bottom: 10px;
  font-size: clamp(3.2rem, 2rem + 4.6vw, 6.4rem);
}

.heart-lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.5rem);
  color: var(--accent);
}

.values {
  display: grid;
  gap: clamp(36px, 6vh, 64px);
  max-width: 820px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.value {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: clamp(18px, 3vw, 36px);
  align-items: baseline;
  padding-left: clamp(28px, 5vw, 56px);
}

.value-letter {
  grid-row: 1 / span 2;
  font-family: var(--display);
  font-size: clamp(4.2rem, 2.6rem + 6vw, 7.5rem);
  line-height: 0.8;
  color: var(--accent);
}

.value h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.9rem);
  line-height: 1;
}

.value p {
  margin-top: 8px;
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.25rem);
  color: var(--soft);
}

/* Where to next: woven labels */
.chapter-onward {
  display: block;
  min-height: auto;
  padding-top: clamp(80px, 14vh, 150px);
}

.onward-head {
  max-width: 640px;
  margin: 0 auto clamp(56px, 8vh, 96px);
  text-align: center;
}

.onward-head h2 {
  margin-bottom: 12px;
}

.onward-head p {
  font-size: 1.15rem;
  color: var(--soft);
}

.labels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(24px, 4vw, 56px);
  max-width: 1040px;
  margin: 0 auto;
}

.label {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 34px 34px 30px 46px;
  color: #102036;
  text-decoration: none;
  background:
    repeating-linear-gradient(0deg, rgb(16 32 54 / 0.035) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgb(16 32 54 / 0.03) 0 1px, transparent 1px 4px),
    #fbf8f0;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgb(16 32 54 / 0.08), 0 26px 40px -24px rgb(16 32 54 / 0.45);
  transition: transform 260ms var(--motion-easing-out), box-shadow 260ms var(--motion-easing-out);
}

.label::after {
  /* the stitched edge */
  content: '';
  position: absolute;
  inset: 9px;
  border: 1.5px dashed rgb(16 32 54 / 0.35);
  border-radius: 2px;
  pointer-events: none;
}

.label-fold {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 22px;
  background: linear-gradient(90deg, rgb(16 32 54 / 0.16), rgb(16 32 54 / 0.02));
  border-right: 1px solid rgb(16 32 54 / 0.12);
}

.label-direct {
  border-top: 6px solid var(--color-navy-900);
}

.label-shop {
  border-top: 6px solid var(--color-orange-500);
}

.label img {
  width: 170px;
  height: auto;
  margin-bottom: 6px;
}

.label-name {
  font-family: var(--display);
  font-size: clamp(1.9rem, 1.5rem + 1.2vw, 2.5rem);
  line-height: 1;
}

.label-text {
  max-width: 38ch;
  font-size: 1rem;
  line-height: 1.55;
  color: #34465a;
}

.label-go {
  margin-top: 8px;
  font-weight: 600;
  color: var(--color-orange-600);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.label-go::after {
  content: ' \2192';
}

.label:hover {
  transform: translateY(-6px) rotate(-0.4deg);
  box-shadow: 0 1px 0 rgb(16 32 54 / 0.08), 0 36px 50px -26px rgb(16 32 54 / 0.55);
}

/* The year dial */
.dial {
  display: none;
}

.has-motion .dial {
  display: block;
  position: fixed;
  left: calc(var(--frame-margin) + clamp(12px, 2vw, 28px));
  bottom: clamp(12px, 3vh, 28px);
  z-index: var(--layer-dropdown);
  min-width: 112px;
  padding: 6px 14px 8px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px -10px rgb(0 0 0 / 0.4);
  text-align: center;
  overflow: hidden;
  transition: background-color 900ms var(--motion-easing-out), opacity 300ms var(--motion-easing-out), visibility 300ms;
}

.has-motion .dial-away {
  opacity: 0;
  visibility: hidden;
}

.dial-value {
  display: block;
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--ink);
}

/* Still layout: each chapter carries its own era colour. */
.no-motion .chapter,
.motion-failed .chapter {
  background: var(--bg);
  color: var(--ink);
}

/* ---------- Narrow screens ---------- */
@media (max-width: 860px) {
  .chapter,
  .chapter-1955,
  .chapter-moves,
  .chapter-2000s {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    row-gap: 28px;
    min-height: auto;
    padding: 96px 20px 72px;
  }

  .chapter-text,
  .flip .chapter-text,
  .hero-text,
  .knit-card,
  .stops,
  .advert,
  .object,
  .flip .object,
  .object-telephone,
  .object-keys,
  .object-laptop,
  .hero-spool {
    grid-column: 1;
    grid-row: auto;
  }

  .object,
  .flip .object {
    order: -1;
    width: min(72%, 340px);
    justify-self: center;
  }

  .object-telephone,
  .object-keys,
  .object-laptop {
    order: 2;
    width: min(56%, 240px);
    margin: 0;
    justify-self: end;
  }

  .advert {
    justify-self: center;
    margin-bottom: 30px;
  }

  .big-year {
    top: 40px;
    translate: none;
    font-size: clamp(6rem, 30vw, 9rem);
  }

  .hero {
    padding-top: 96px;
  }

  .hero-spool {
    order: 2;
    width: min(46%, 200px);
    justify-self: end;
    margin-top: -10px;
  }

  .chapter-1990s {
    padding: 72px 16px;
    min-height: auto;
  }

  .knit img {
    height: 115%;
  }

  .stop:nth-child(n) {
    margin-left: 0;
  }

  .stop:nth-child(even) {
    margin-left: 14%;
  }

  .value {
    padding-left: 22px;
  }

  .label {
    padding: 28px 22px 24px 38px;
  }

  .has-motion .dial {
    min-width: 0;
    padding: 4px 12px 6px;
  }

  .dial-value {
    font-size: 1.2rem;
  }
}

/* Invisible waypoints that steer the thread around big type. */
.thread-way {
  position: absolute;
  width: 2px;
  height: 2px;
  pointer-events: none;
}

.thread-way-sac-a {
  right: calc(var(--frame-margin) + var(--frame-width) * 0.09);
  top: 22%;
}

.thread-way-sac-b {
  right: calc(var(--frame-margin) + var(--frame-width) * 0.12);
  top: 80%;
}

@media (max-width: 860px) {
  .thread-way-sac-a,
  .thread-way-sac-b {
    right: 4%;
  }
}

/* Vary the pace: the shorter chapters take less than a screen. */
.chapter-reg,
.chapter-1981,
.chapter-1985,
.chapter-2020 {
  min-height: 82svh;
}

/* Text sits on a sheet of the page colour, so the thread passes behind it rather than through it. */
.chapter-text {
  padding: 22px 24px;
  margin: -22px -24px;
  border-radius: 18px;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  transition: background-color 900ms var(--motion-easing-out);
}

.chapter.chapter-heart {
  padding-inline: 0;
}

.heart-stage {
  margin-inline: 0;
}

.values {
  width: min(820px, calc(100% - 2 * clamp(16px, 6vw, 96px)));
}

@media (max-width: 860px) {
  .chapter-text {
    padding: 16px 18px;
    margin: -16px -18px;
  }

  .heart-words {
    max-width: 58vw;
    margin-top: -12%;
  }

  .heart-words .date {
    font-size: 0.92rem;
    margin-bottom: 6px;
  }

  .heart-words h2 {
    font-size: 2.4rem;
    margin-bottom: 4px;
  }

  .heart-lead {
    font-size: 1rem;
  }
}
