/* One Common Purpose. Tokens and rationale: docs/DESIGN.md */

@font-face {
  font-family: "Literata";
  src: url("/assets/fonts/literata-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("/assets/fonts/literata-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("/assets/fonts/literata-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Oswald";
  src: url("/assets/fonts/oswald-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --morning: #f7f9f4;
  --ink: #263024;
  --ink-soft: #4d5a49;
  --trail: #3d7a1f;
  --purpose: #90c954;
  --highlighter: #d8ff7e;
  --sky: #1f6f96;
  --rule: #dfe6d7;

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --display: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.1875rem;
  --step-1: 1.4rem;
  --step-2: 1.9rem;
  --step-3: clamp(2.2rem, 1.6rem + 2.6vw, 3.4rem);
  --numeral: clamp(5rem, 3rem + 9vw, 10.5rem);

  --measure: 62ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Jumps to a section stop below the sticky header */
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
:root {
  --header-h: 4.75rem;
}

/* Smoother navigation: site.js glides to sections; pages fade into each other */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.28s;
    animation-timing-function: ease-out;
  }
  .masthead {
    view-transition-name: masthead;
  }
}

body {
  margin: 0;
  background: var(--morning);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.7;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  overflow-wrap: anywhere;
}

a {
  color: var(--trail);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--morning);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip:focus {
  top: 1rem;
}

/* Masthead: stays at the top while you scroll, one row, fixed height so the
   page never shifts; the shadow only appears once the page has moved. */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: var(--header-h);
  padding: 0 var(--gutter);
  /* solid, not blurred: a backdrop blur makes phones repaint on every scroll frame */
  background: var(--morning);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.masthead.is-stuck {
  border-bottom-color: var(--rule);
  box-shadow: 0 10px 24px -20px rgba(38, 48, 36, 0.45);
}
.wordmark {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  width: min(13.5rem, 60vw);
}
.masthead nav {
  flex: 0 0 auto;
}
.logo {
  display: block;
  width: 100%;
  height: auto;
}
.logo text {
  font-family: var(--display);
  font-weight: 500;
}
.logo-name {
  font-size: 100px;
  fill: var(--purpose);
}
.logo-tag {
  font-size: 38px;
  fill: #464646;
}

.nav-list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nav-list a {
  display: inline-block;
  padding: 0.4rem 0;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(var(--purpose), var(--purpose)) no-repeat left bottom / 0 2px;
  transition: background-size 0.25s ease, color 0.2s ease;
}
.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--trail);
  background-size: 100% 2px;
}
/* Hamburger: phones only. The list is hidden by CSS from the first paint, so
   opening it never shifts the page; nojs.css shows the links without JavaScript. */
.menu-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.bars {
  position: relative;
  display: block;
  width: 1.5rem;
  height: 1.1rem;
  margin: 0 auto;
}
.bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}
.bars span:nth-child(1) {
  top: 0;
}
.bars span:nth-child(2) {
  top: calc(50% - 1px);
}
.bars span:nth-child(3) {
  top: calc(100% - 2px);
}
.menu-toggle[aria-expanded="true"] .bars span:nth-child(1) {
  top: calc(50% - 1px);
  transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .bars span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] .bars span:nth-child(3) {
  top: calc(50% - 1px);
  transform: rotate(-45deg);
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
}

/* The seven menu items fit on one row from 1280 px; narrower screens use the hamburger */
@media (max-width: 1279px) {
  :root {
    --header-h: 4rem;
  }
  .masthead {
    gap: 1rem;
  }
  .wordmark {
    width: min(12rem, 62vw);
  }
  .menu-toggle {
    display: block;
    margin-right: -0.5rem;
  }
  .nav-list {
    display: none;
  }
  .menu-toggle[aria-expanded="true"] + .nav-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--morning);
    border-bottom: 2px solid var(--purpose);
    box-shadow: 0 18px 30px -24px rgba(38, 48, 36, 0.5);
    font-size: 1.3rem;
    white-space: normal;
    animation: menu-in 0.22s ease-out;
  }
  .nav-list a {
    display: block;
    padding: 0.6rem 0;
    background: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bars span,
  .menu-toggle[aria-expanded="true"] + .nav-list {
    transition: none;
    animation: none;
  }
}

/* Reading progress */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 4px;
  z-index: 50;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--purpose);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

main {
  padding: 0 var(--gutter);
}
.kind-home main {
  padding: 0;
}

/* DAY and article pages */
.reading {
  display: grid;
  grid-template-columns: 1fr min(var(--measure), 100%) 1fr;
  padding: clamp(2rem, 6vw, 5rem) 0 4rem;
}
.reading > * {
  grid-column: 2;
}
.day-head {
  margin-bottom: 2.5rem;
}
.day-part {
  margin: 0 0 0.75rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.day-part a {
  color: inherit;
}
.reading h1,
.index h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step-3);
  line-height: 1.08;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
.meta {
  margin: 0.9rem 0 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* The DAY numeral: an outlined figure that sits in the margin on wide screens */
.numeral {
  margin: 0 0 0.25rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--numeral);
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 2px var(--purpose);
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums;
}
@media (min-width: 1100px) {
  .reading {
    column-gap: clamp(1.5rem, 4vw, 4rem);
  }
  .day .day-head {
    display: contents;
  }
  .day .day-head > * {
    grid-column: 2;
  }
  .day .numeral {
    grid-column: 1;
    grid-row: 1 / span 4;
    justify-self: end;
    align-self: start;
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    margin: 0;
  }
  .day .meta {
    margin-bottom: 2.5rem;
  }
}

.prose p {
  margin: 0 0 1.35em;
  hanging-punctuation: first;
}
.prose ul {
  margin: 0 0 1.35em;
  padding-left: 1.2em;
}
.prose .subhead {
  margin: 2.4em 0 0.8em;
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step-1);
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--trail);
}
.article .prose > p:first-child {
  font-size: var(--step-1);
  line-height: 1.6;
}

/* The realization: the one bold moment */
.realization {
  margin-top: 2.5em;
  padding-top: 1.5em;
  border-top: 2px solid var(--purpose);
}
.realization mark {
  color: inherit;
  font-weight: 600;
  background-color: transparent;
  background-image: linear-gradient(var(--highlighter), var(--highlighter));
  background-repeat: no-repeat;
  background-size: 100% 100%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0.05em 0.15em;
}
.js .realization mark {
  background-size: 0% 100%;
  transition: background-size 0.9s cubic-bezier(0.65, 0.05, 0.25, 1) 0.15s;
}
.js .realization.is-lit mark {
  background-size: 100% 100%;
}
@media (prefers-reduced-motion: reduce) {
  .js .realization mark {
    transition: none;
    background-size: 100% 100%;
  }
}

/* Pager */
.pager {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.pager a {
  display: block;
  padding: 0.5rem 0;
  text-decoration: none;
  color: var(--trail);
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.35;
}
.pager-prev::before {
  content: "← ";
}
.pager-next {
  text-align: right;
}
.pager-next::after {
  content: " →";
}
.pager a:hover {
  color: var(--ink);
}

/* Index pages and the trail */
.index {
  max-width: calc(var(--measure) + 4rem);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) 0 4rem;
}
.index-head {
  margin-bottom: 2.5rem;
}
.index-head .meta {
  font-size: var(--step-0);
  max-width: var(--measure);
}
.continue:not([hidden]) {
  margin: 1.5rem 0 0;
  font-size: var(--step-0);
}

.trail {
  --dot: 14px;
  list-style: none;
  margin: 0;
  padding: 0 0 0 2rem;
  position: relative;
}
.trail::before {
  content: "";
  position: absolute;
  left: calc(var(--dot) / 2 - 1px);
  top: 0.9rem;
  bottom: 0.9rem;
  width: 2px;
  background: var(--purpose);
}
.trail-stop {
  position: relative;
}
.trail-stop::before {
  content: "";
  position: absolute;
  left: calc(-2rem);
  top: 1.45rem;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background: var(--morning);
  border: 2px solid var(--purpose);
}
.trail-stop.is-read::before {
  background: var(--purpose);
}
.trail-stop.is-last::before {
  box-shadow: 0 0 0 4px var(--highlighter);
}
.trail-stop a {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.2rem;
  padding: 1rem 0 1.1rem;
  text-decoration: none;
  color: var(--ink);
}
.trail-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step-1);
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.trail-realize {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: var(--measure);
}
.trail-min {
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.trail-stop a:hover .trail-title {
  color: var(--trail);
}

/* Summation: DAY titles link to their DAY; each Part folds under its heading */
.summation .prose a strong {
  font-weight: 600;
}
.sum-part {
  border-top: 1px solid var(--rule);
}
.sum-part:last-child {
  border-bottom: 1px solid var(--rule);
}
.sum-part summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  padding: 1.1rem 2.5rem 1.1rem 0;
  position: relative;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step-1);
  line-height: 1.25;
}
.sum-part summary::-webkit-details-marker {
  display: none;
}
.sum-part summary::after {
  content: "";
  position: absolute;
  right: 0.4rem;
  top: 1.45rem;
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2.5px solid var(--trail);
  border-bottom: 2.5px solid var(--trail);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.sum-part[open] summary::after {
  transform: rotate(-135deg);
  top: 1.75rem;
}
.sum-part summary:hover .sum-part-title {
  color: var(--trail);
}
.sum-part .part-progress:not(:empty) {
  display: inline;
}
.sum-part[open] {
  padding-bottom: 1rem;
}
@media (prefers-reduced-motion: no-preference) {
  .sum-part[open] > :not(summary) {
    animation: fold-in 0.25s ease-out;
  }
}
@keyframes fold-in {
  from {
    opacity: 0;
    transform: translateY(-0.4rem);
  }
}

/* Book introduction: title page, section titles, verse, copyright */
.byline {
  margin: 0 0 2.5rem;
  padding: 1.75rem 0;
  border-top: 2px solid var(--purpose);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}
.byline-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step-1);
  line-height: 1.25;
  letter-spacing: 0.01em;
}
.byline-author {
  display: inline-block;
  margin-top: 0.4rem;
  font-style: italic;
  color: var(--ink-soft);
}
.prose .section-title-book {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: var(--step-2);
  color: var(--ink);
}
.prose .byline + .section-title-book {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.prose .section-title-book::before {
  counter-increment: book-section;
  content: counter(book-section);
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--trail);
}
.article.has-toc .prose {
  counter-reset: book-section;
}
.verse {
  margin: 2rem 0 2.25rem;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-left: 3px solid var(--purpose);
  font-style: italic;
  font-size: var(--step-1);
  line-height: 1.55;
}
.verse p {
  margin: 0;
}
.book-rights {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--ink-soft);
}
.book-rights p {
  margin: 0 0 0.75rem;
}

/* People page: contents from its own LIST OF TITLES */
.list-heading {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--trail);
}
.back-to-list {
  margin: 2rem 0 2.5rem;
  font-size: var(--step--1);
}
.back-to-list a {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
}
.back-to-list a::before {
  content: "↑ ";
}
.toc {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  grid-column: 2;
  margin: 0 calc(-1 * var(--gutter)) 1.5rem;
  background: var(--morning);
  border-bottom: 1px solid var(--rule);
}
.toc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.7rem var(--gutter);
  border: 0;
  background: none;
  color: var(--trail);
  font: 500 0.95rem/1.3 var(--display);
  letter-spacing: 0.02em;
  text-align: left;
  cursor: pointer;
}
.toc-current {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toc-toggle::after {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}
.toc-toggle[aria-expanded="true"]::after {
  transform: rotate(-135deg);
}
.toc-list {
  display: none;
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0.25rem var(--gutter) 1rem;
  max-height: calc(100vh - var(--header-h) - 4rem);
  overflow-y: auto;
}
.toc-toggle[aria-expanded="true"] + .toc-list {
  display: block;
  animation: menu-in 0.2s ease-out;
}
.toc-list li {
  counter-increment: toc;
}
.toc-list a {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  padding: 0.45rem 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}
.toc-list a::before {
  content: counter(toc) ".";
  color: var(--ink-soft);
}
.toc-list a[aria-current="true"] {
  color: var(--trail);
}
.toc-list a[aria-current="true"]::before {
  color: var(--trail);
}
.toc-list a:hover {
  color: var(--trail);
}
/* Arriving from another page at a section: clear the contents bar too (phones) */
@media (max-width: 1099px) {
  html:has(.toc) {
    scroll-padding-top: calc(var(--header-h) + 4rem);
  }
}
@media (min-width: 1100px) {
  .toc {
    grid-column: 1;
    grid-row: 1 / span 4;
    align-self: start;
    justify-self: end;
    top: calc(var(--header-h) + 2rem);
    width: min(100%, 17rem);
    margin: 0;
    background: none;
    border: 0;
  }
  .toc-toggle {
    display: none;
  }
  .toc-list {
    display: block;
    padding: 0 0 0 1rem;
    border-left: 2px solid var(--rule);
    max-height: calc(100vh - var(--header-h) - 4rem);
  }
  .toc-list a {
    margin-left: -1rem;
    padding-left: calc(1rem - 2px);
    border-left: 2px solid transparent;
    font-size: 0.9rem;
  }
  .toc-list a[aria-current="true"] {
    border-left-color: var(--purpose);
  }
}


/* Home: the old home page's sections in their original order, each a
   full-width band with its own tone and illustration. */
.band {
  position: relative;
  padding: clamp(3rem, 8vw, 6.5rem) var(--gutter);
  view-timeline-name: --band;
  view-timeline-axis: block;
}
.band:has(.band-footer) {
  padding-bottom: 0;
}
.tone-sky {
  background: #e9f3f6;
}
.tone-paper {
  background: var(--morning);
}
.tone-meadow {
  background: #edf4e3;
}
.tone-night {
  --link: var(--highlighter);
  background: #1c3040;
  color: #eef3ea;
}
.tone-night a:not(.button) {
  color: var(--highlighter);
}
.band-inner {
  display: grid;
  gap: 2.25rem;
  max-width: 74rem;
  margin: 0 auto;
}
.band-text {
  max-width: 42rem;
}
.band-art {
  order: -1;
  width: min(100%, 22rem);
  justify-self: center;
}
.art {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
}
.art-world {
  overflow: visible;
}
/* Landscapes fade out at their edges so they sit in the band instead of in a box */
.art-dawn,
.art-generations,
.art-mountain {
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 82%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 82%, transparent 100%);
}
@media (min-width: 960px) {
  .band-inner {
    grid-template-columns: minmax(0, 42rem) minmax(0, 1fr);
    gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
  }
  .band-inner.flip {
    grid-template-columns: minmax(0, 1fr) minmax(0, 42rem);
  }
  .band-inner.single {
    grid-template-columns: minmax(0, 46rem);
    justify-content: center;
  }
  .band-art {
    order: 0;
    width: min(100%, 30rem);
    position: sticky;
    top: calc(var(--header-h) + 2.5rem);
  }
  .band-inner.flip .band-art {
    order: -1;
  }
  .hero .band-inner {
    align-items: center;
  }
}
.band-footer {
  margin: clamp(2.5rem, 6vw, 4rem) calc(-1 * var(--gutter)) 0;
}
.band-footer .art {
  width: 100%;
}

.hero-title {
  margin: 0 0 1.5rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(3rem, 1.4rem + 7vw, 6.4rem);
  line-height: 0.98;
  color: var(--ink);
}
.hero .prose > p:first-child {
  font-size: var(--step-1);
  line-height: 1.6;
}
.section-title {
  margin: 0 0 1.25rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 1.3rem + 2vw, 2.8rem);
  line-height: 1.1;
  text-wrap: balance;
}
.home-aside {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  border-top: 1px solid var(--rule);
}
.aside-title {
  margin: 1.25rem 0 0.4rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase; /* the old site showed these widget titles in capitals too */
  color: var(--ink);
}
.home-aside p {
  margin: 0 0 1rem;
}

/* Illustration motion: the globe eases in once, the continents drift round,
   and on scroll each layer moves at its own speed (parallax). Browsers without
   scroll-driven animations, and readers who reduce motion, get still art. */
@media (prefers-reduced-motion: no-preference) {
  .world-spin-in {
    transform-box: view-box;
    transform-origin: 200px 200px;
    animation: world-in 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .art-world.is-moving .land-drift {
    animation: land-drift 90s linear infinite;
  }
}
/* Parallax on wide screens only: on phones the art sits above the text and the
   extra work would make scrolling less smooth. */
@media (prefers-reduced-motion: no-preference) and (min-width: 960px) {
  @supports (animation-timeline: view()) {
    .plx-far,
    .plx-mid,
    .plx-near,
    .plx-rise {
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: --band;
      animation-range: cover 0% cover 100%;
    }
    .plx-far {
      animation-name: plx-far;
    }
    .plx-mid {
      animation-name: plx-mid;
    }
    .plx-near {
      animation-name: plx-near;
    }
    .plx-rise {
      animation-name: plx-rise;
      animation-range: entry 10% cover 55%;
    }
    .art-hands .plx-mid {
      animation-name: plx-slide;
    }
    /* the hero globe keeps its entrance; only its backdrop moves */
    .art-world .plx-mid {
      animation: world-in 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }
  }
}
@keyframes world-in {
  from {
    opacity: 0;
    transform: rotate(-30deg) scale(0.9);
  }
}
@keyframes land-drift {
  to {
    transform: translateX(-440px);
  }
}
@keyframes plx-far {
  from {
    transform: translateY(-12px);
  }
  to {
    transform: translateY(12px);
  }
}
@keyframes plx-mid {
  from {
    transform: translateY(14px);
  }
  to {
    transform: translateY(-14px);
  }
}
@keyframes plx-near {
  from {
    transform: translateY(30px);
  }
  to {
    transform: translateY(-30px);
  }
}
@keyframes plx-rise {
  from {
    transform: translateY(70px);
  }
  to {
    transform: translateY(-10px);
  }
}
@keyframes plx-slide {
  from {
    transform: translateX(-24px);
  }
  to {
    transform: translateX(24px);
  }
}

/* DAY pages: where this DAY sits on the climb */
.ridge {
  display: block;
  width: min(100%, 24rem);
  height: auto;
  margin: 1.4rem 0 0.5rem;
  overflow: visible;
}

/* Part pages: the mountain beside the heading */
.part-index .index-head {
  display: grid;
  gap: 1.5rem;
  align-items: end;
  view-timeline-name: --band;
  view-timeline-axis: block;
}
.index-art {
  width: min(100%, 16rem);
}
@media (min-width: 760px) {
  .part-index .index-head {
    grid-template-columns: minmax(0, 1fr) 15rem;
  }
}

.button-row {
  margin: 1.75rem 0 0.5rem;
}
.button {
  display: inline-block;
  max-width: 100%;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1.3;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--ink);
  background: var(--highlighter);
  padding: 0.75rem 1.4rem;
  border: 2px solid var(--ink);
  border-radius: 2px;
}
.button:hover {
  background: var(--purpose);
}

.part-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
  gap: 0 2rem;
}
.part-list a {
  display: block;
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--ink);
}
.part-list a:hover {
  color: var(--trail);
}
.part-progress:not(:empty) {
  display: block;
  font-family: var(--serif);
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* Go up: floats in the lower left once you have scrolled; needs site.js */
.go-up {
  position: fixed;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 45;
  display: none;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--highlighter);
  color: var(--ink);
  box-shadow: 0 8px 20px -10px rgba(38, 48, 36, 0.55);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.75rem);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s, background-color 0.2s ease;
}
.js .go-up {
  display: grid;
}
.go-up.is-shown {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s, background-color 0.2s ease;
}
.go-up:hover {
  background: var(--purpose);
}
.go-up svg {
  width: 1.4rem;
  height: 1.4rem;
}
@media (prefers-reduced-motion: reduce) {
  .go-up,
  .go-up.is-shown {
    transition: none;
    transform: none;
  }
}

/* Footer */
.kind-home .colophon {
  margin-top: 0;
}
.colophon {
  margin-top: 2rem;
  padding: 3rem var(--gutter) 3.5rem;
  border-top: 1px solid var(--rule);
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.colophon-inner {
  max-width: calc(var(--measure) + 4rem);
  margin: 0 auto;
}
.colophon p {
  margin: 0 0 0.6rem;
}
.colophon .create-it {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--sky);
  margin-bottom: 1rem;
}
.small {
  font-size: 0.8rem;
}

@media print {
  .masthead nav,
  .progress,
  .pager,
  .colophon {
    display: none;
  }
  .reading {
    display: block;
  }
  .numeral {
    -webkit-text-stroke: 0;
    color: var(--ink);
  }
}
