/*
  "The Hitchhiker's Guide to Quietlings, Part 1" (read.quietlings1.php), in the design of the read.* pages.
  Its picture is a title poster with its own lettering, so it's shown whole, as a printed cover beside the title,
  and both gradients come from it: starry night teal, cream lettering, ember orange, golden grass.
*/

/* ---- the reader's two pages ---- */
:root {
  --wx-fg: var(--paper);
  --wx-soft: rgb(243 237 227 / .68);
  --wx-rule: rgb(243 237 227 / .22);
  --wx-end: #2b3e4d;              /* where the page meets the footer */
  --wx-glow: 255 249 238;
  --wx-drop: 255 255 255;
  --wx-accent: #f0b37a;           /* the poster's ember lettering */
}
:root[data-theme="light"] {
  --wx-fg: #1f2a35;
  --wx-soft: #4a5866;
  --wx-rule: rgb(31 42 53 / .22);
  --wx-end: #ece3d4;
  --wx-glow: 255 255 255;
  --wx-drop: 96 118 158;
  --wx-accent: #b0602c;
}

/* ---- the JW monogram, top left, as on the new homepage ---- */
.signature { width: clamp(72px, 6.3vw, 94px); aspect-ratio: 300 / 217; }   /* the JW, a little larger */
.signature {
  top: calc(env(safe-area-inset-top, 0px) + clamp(20px, 3.4vw, 40px));
  right: auto;
  left: calc(env(safe-area-inset-left, 0px) + clamp(22px, 4vw, 54px));
}
.signature__mark {
  inset: 4%;
  -webkit-mask: url("/assets/img/jw-monogram.png") center / contain no-repeat;
  mask: url("/assets/img/jw-monogram.png") center / contain no-repeat;
}
/* its pulse: the soft water-drop glow of the new homepage, not the site's older ring */
.signature::before,
.signature::after {
  z-index: -1;
  width: 110px; height: 110px; margin: -55px 0 0 -55px;
  box-shadow: none !important;
  background: radial-gradient(circle,
    rgb(255 255 255 / .06) 0%, rgb(255 255 255 / .09) 16%, rgb(255 255 255 / .13) 30%,
    rgb(255 255 255 / .15) 42%, rgb(255 255 255 / .11) 54%, rgb(255 255 255 / .06) 64%,
    rgb(255 255 255 / .025) 72%, rgb(255 255 255 / 0) 80%);
  filter: blur(6px);
}
[data-chrome-ink="dark"] .signature::before {
  background: radial-gradient(circle,
    rgb(255 255 255 / .2) 0%, rgb(255 255 255 / .28) 16%, rgb(255 255 255 / .38) 30%,
    rgb(255 255 255 / .42) 42%, rgb(255 255 255 / .32) 54%, rgb(255 255 255 / .18) 64%,
    rgb(255 255 255 / .07) 72%, rgb(255 255 255 / 0) 80%);
}
.signature::after { display: none; }
.signature.is-rippling::before { animation: wx-sig-glow 2600ms var(--ease-soft) 1; }
.signature.is-rippling .signature__mark { animation: none; }
@media (hover: hover) and (pointer: fine) {
  .signature:hover::before { animation: wx-sig-glow 2600ms var(--ease-soft) 1; }
}
@keyframes wx-sig-glow {
  0% { opacity: 0; transform: scale(.7); }
  22% { opacity: .9; }
  58% { opacity: .4; }
  100% { opacity: 0; transform: scale(4); }
}

/* ---- the menu: exactly as on the new homepage (copied from index.jesse.php) ---- */
/* The menu: the footer's steel-slate blue, always with light words. */
.js .menu,
.js .menu[data-tone] {
  /* the same steel-slate blues as the bottom of the footer: lighter at the top, deepening downward */
  background: linear-gradient(180deg, rgb(109 140 161 / .92) 0%, rgb(78 108 131 / .94) 22%, rgb(56 82 102 / .95) 48%, rgb(41 63 80 / .96) 76%, rgb(32 49 62 / .97) 100%);
  color: var(--paper);
}
.is-menu-open .signature { color: var(--paper); }

/* The menu: a soft, feathered reveal growing from the monogram instead of a hard-edged circle. */
@property --mr { syntax: "<length>"; inherits: false; initial-value: 0px; }
.js .menu {
  --mr: 0px;
  clip-path: none;
  -webkit-mask-image: radial-gradient(circle at var(--mx, 64px) var(--my, 44px), #000 max(0px, calc(var(--mr) - 32vmin)), transparent var(--mr));
  mask-image: radial-gradient(circle at var(--mx, 64px) var(--my, 44px), #000 max(0px, calc(var(--mr) - 32vmin)), transparent var(--mr));
  transition: --mr 1150ms var(--ease-water), visibility 0s linear 1150ms;
}
.js .menu.is-open {
  --mr: calc(var(--r, 160vmax) + 40vmin);
  clip-path: none;
  transition: --mr 1150ms var(--ease-water), visibility 0s;
}

/* Closing: the words stay put and the withdrawing overlay's soft edge carries them away,
   so each word disappears exactly as the dark passes over it. They reset once it has gone.
   (Opening keeps the site's own staggered arrival.) */
.js .menu:not(.is-open) .menu__link,
.js .menu:not(.is-open) .menu__secondary a {
  transition: opacity 0s linear 1150ms, filter 0s linear 1150ms, transform 0s linear 1150ms;
}

/* ---- the page: two gradients, one over the other, so switching cross-fades ---- */
.wx {
  --wx-measure: var(--text-measure);
  position: relative;
  z-index: 1;
  min-height: 100vh;
  color: var(--wx-fg);
  transition: color 900ms var(--ease-soft);
}
.wx::before,
.wx::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  transition: opacity 900ms var(--ease-soft);
}
/*
  dark: the poster's night. Deep blue-black at the top, opening into its starry teal, then slate;
  pools of ember orange from the lettering, star-gold, teal glow and the gold of the grass drift across.
*/
.wx::before {
  background:
    radial-gradient(60% 12% at 82% 8%, rgb(60 132 152 / .26), transparent 72%),
    radial-gradient(55% 12% at 14% 22%, rgb(232 150 92 / .13), transparent 72%),
    radial-gradient(60% 12% at 80% 38%, rgb(246 220 174 / .07), transparent 72%),
    radial-gradient(60% 12% at 18% 54%, rgb(54 120 140 / .22), transparent 72%),
    radial-gradient(60% 12% at 82% 70%, rgb(200 142 52 / .12), transparent 72%),
    radial-gradient(60% 11% at 24% 86%, rgb(232 150 92 / .1), transparent 72%),
    linear-gradient(180deg, #0e1f2c 0%, #122b3c 12%, #17364a 26%, #1b4256 40%, #1d4758 52%, #1e4352 64%, #213f4c 76%, #263c49 88%, #2b3e4d 100%);
}
/*
  light: the poster's paper. Warm cream at the top, through a pale wash of its teal sky, a peach glow
  from the lettering and the gold of the grass, to the sand where the footer begins.
*/
.wx::after {
  opacity: 0;
  background:
    radial-gradient(65% 12% at 84% 8%, rgb(156 200 204 / .42), transparent 72%),
    radial-gradient(60% 12% at 12% 22%, rgb(244 190 140 / .36), transparent 72%),
    radial-gradient(65% 12% at 80% 38%, rgb(238 214 160 / .4), transparent 72%),
    radial-gradient(60% 12% at 16% 54%, rgb(166 206 206 / .36), transparent 72%),
    radial-gradient(65% 12% at 82% 70%, rgb(242 186 140 / .34), transparent 72%),
    radial-gradient(60% 11% at 22% 86%, rgb(232 204 140 / .4), transparent 72%),
    linear-gradient(180deg, #f5ecd9 0%, #f2e9d8 14%, #e9ece6 28%, #f1e9d8 42%, #f5e5d3 56%, #f2e5cc 70%, #efe3cb 84%, #ece3d4 100%);
}
:root[data-theme="light"] .wx::after { opacity: 1; }
:root[data-theme="light"] .wx::before { opacity: 0; }   /* both fade, so the other never shows at an edge */

/* ---- the article ---- */
.wa { display: flex; flex-direction: column; padding-bottom: calc(9vh + .5rem); }   /* room for the footer to fade in over */
.wa > *:not(.wa-fig) {
  width: min(100% - 2 * var(--gutter), var(--wx-measure));
  margin-left: auto;
  margin-right: auto;
}
.wa-fig { margin: 0; }
.wa-fig img { display: block; width: 100%; height: auto; max-width: none; }
.wa-fig figcaption {
  margin-top: .7rem;
  font-family: var(--font-body);
  font-size: .78rem;
  line-height: 1.5;
  letter-spacing: .01em;
  color: var(--wx-soft);
  transition: color 900ms var(--ease-soft);
}
.wa-place { font-style: italic; }

/* the opening photograph, fading down into the page */
.wa-fig--before .wa-fig__frame {
  height: 74vh;
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 45%, transparent 100%);
}
.wa-fig--before img { height: 100%; object-fit: cover; filter: brightness(.7) saturate(.85); transition: filter 900ms var(--ease-soft); }
:root[data-theme="light"] .wa-fig--before img { filter: none; }
.wa-fig--before figcaption { display: none; }

/* the title, rising out of the photograph's fade, under a soft light like the homepage's moon */
.wa-head { position: relative; margin-top: -24vh; text-align: center; }
.wa-head::before {
  content: ""; position: absolute; left: 50%; top: -9rem; width: 18rem; height: 18rem; margin-left: -9rem;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgb(var(--wx-glow) / .22) 0%, rgb(var(--wx-glow) / .1) 30%, rgb(var(--wx-glow) / 0) 68%);
  filter: blur(6px);
  animation: wx-moon 7s ease-in-out infinite;
}
@keyframes wx-moon { 0%, 100% { opacity: .55; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.12); } }

.wa-back { margin: 0 0 1.2rem; font-family: var(--font-body); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; }
.wa-back a { color: var(--wx-soft); text-decoration: none; transition: color 900ms var(--ease-soft); }
.wa-back a::before { content: "‹"; display: inline-block; margin-right: .5em; font-size: 1.3em; line-height: 0; transform: translateY(.04em); }
.wa-back a:hover { color: var(--wx-fg); }
.wa-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(3.2rem, 2rem + 5.6vw, 7rem);
  line-height: .98;
  letter-spacing: -.02em;
}
.wa-dek {
  margin: .8rem 0 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.2rem, 1.05rem + .7vw, 1.6rem);
  line-height: 1.35;
  color: var(--wx-soft);
  transition: color 900ms var(--ease-soft);
}
.wa-dek em { font-style: normal; }
.wa-meta {
  margin: 1.4rem 0 0;
  font-family: var(--font-body);
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--wx-soft);
  transition: color 900ms var(--ease-soft);
}
.wa-meta span + span::before { content: "·"; margin: 0 .7em; opacity: .7; }

/* arriving out of a blur, as text does on the homepage */
@keyframes wx-arrive { from { opacity: 0; filter: blur(14px); } to { opacity: 1; filter: blur(0); } }
.wa-head > * { animation: wx-arrive 1600ms var(--ease-soft) both; }
.wa-head > :nth-child(2) { animation-delay: 250ms; }
.wa-head > :nth-child(3) { animation-delay: 700ms; }
.wa-head > :nth-child(4) { animation-delay: 1000ms; }

.wa-note { margin-top: clamp(2.4rem, 6vh, 3.6rem); margin-bottom: clamp(2.4rem, 6vh, 3.6rem); }
.wa-note p {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.62;
  color: var(--wx-soft);
  transition: color 900ms var(--ease-soft);
}
.wa-note em { font-style: normal; }

.wa-body p {
  margin: 0 0 1.15em;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-read);
  line-height: var(--text-read-lh);
  text-wrap: pretty;
  hanging-punctuation: first;
}
/* the pull quotes: large, centred, softly lit, and they blur under the mouse like the homepage's words */
.wa-pull { margin: 0; padding: clamp(2rem, 6vh, 3.5rem) 0; text-align: center; }   /* the same size and measure as About's callouts */
.wa-pull p {
  max-width: var(--text-call-measure);
  margin: 0 auto;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;   /* pulled from the text, so set in italics; About's callouts stand on their own and stay upright */
  font-size: var(--text-call);
  line-height: var(--text-call-lh);
  text-wrap: balance;
}
.wa-break { display: grid; place-items: center; height: 4.2rem; }
/* a single drop of light, like the homepage's hidden spots */
.wa-break span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, currentColor 0%, transparent 70%);
  opacity: .35;
}

/* ---- the opening: the poster as a printed cover, beside the title (above it on a phone) ---- */
.wa > .wa-opening {
  display: grid;
  gap: clamp(2.2rem, 5vw, 4.5rem);
  align-items: center;
  width: min(100% - 2 * var(--gutter), 64rem);
  padding-top: clamp(7rem, 17vh, 10.5rem);
}
@media (min-width: 900px) {
  /* side by side, and kept clear of the JW's corner so the poster never passes under it */
  .wa > .wa-opening { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); width: min(100% - 2 * max(var(--gutter), 9.5rem), 64rem); }
}
.wa-cover { width: min(76vw, 22rem); margin: 0 auto; rotate: -2deg; animation: wx-arrive 1800ms var(--ease-soft) both; }
.wa-cover img { display: block; width: 100%; height: auto; max-width: none; border-radius: 4px; box-shadow: 0 30px 70px rgb(6 14 22 / .5), 0 2px 8px rgb(6 14 22 / .3); }
:root[data-theme="light"] .wa-cover img { box-shadow: 0 30px 70px rgb(70 50 30 / .25), 0 2px 8px rgb(70 50 30 / .14); }
.wa--cover .wa-head { margin-top: 0; text-align: left; }
@media (max-width: 899px) { .wa--cover .wa-head { text-align: center; } }
.wa--cover .wa-head::before { display: none; }
.wa--cover .wa-title { font-size: clamp(2.6rem, 1.7rem + 3.2vw, 4.6rem); line-height: 1.02; }
.wa-series { margin: 0 0 .7rem; font-family: var(--font-body); font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--wx-accent); transition: color 900ms var(--ease-soft); }
.wa--cover .wa-body { margin-top: clamp(3.5rem, 9vh, 6rem); }

/* a chapter heading, as the poster names it */
.wa-chapter { margin: 0 0 1.4em; font-family: var(--font-display); font-weight: 300; font-style: italic; font-size: clamp(1.7rem, 1.35rem + 1.2vw, 2.3rem); line-height: 1.2; text-align: center; }
.wa-chapter::after { content: ""; display: block; width: 2.6rem; height: 1px; margin: .55em auto 0; background: var(--wx-accent); opacity: .7; }

/* a few stars over the top of the dark page, quietly twinkling */
.wx-stars {
  position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: 120vh; pointer-events: none;
  background:
    radial-gradient(1.6px 1.6px at 8% 12%, rgb(248 228 190 / .9), transparent),
    radial-gradient(1.2px 1.2px at 17% 31%, rgb(248 228 190 / .7), transparent),
    radial-gradient(2px 2px at 26% 8%, rgb(248 228 190 / .85), transparent),
    radial-gradient(1.2px 1.2px at 33% 22%, rgb(255 240 214 / .6), transparent),
    radial-gradient(1.6px 1.6px at 41% 5%, rgb(248 228 190 / .8), transparent),
    radial-gradient(1.2px 1.2px at 47% 17%, rgb(255 240 214 / .55), transparent),
    radial-gradient(2px 2px at 58% 11%, rgb(248 220 170 / .85), transparent),
    radial-gradient(1.2px 1.2px at 64% 27%, rgb(255 240 214 / .6), transparent),
    radial-gradient(1.6px 1.6px at 71% 7%, rgb(248 228 190 / .8), transparent),
    radial-gradient(1.2px 1.2px at 79% 20%, rgb(255 240 214 / .6), transparent),
    radial-gradient(2px 2px at 87% 13%, rgb(248 220 170 / .85), transparent),
    radial-gradient(1.2px 1.2px at 93% 29%, rgb(255 240 214 / .55), transparent),
    radial-gradient(1.4px 1.4px at 5% 38%, rgb(248 228 190 / .55), transparent),
    radial-gradient(1.4px 1.4px at 95% 42%, rgb(248 228 190 / .5), transparent),
    radial-gradient(1.2px 1.2px at 52% 36%, rgb(255 240 214 / .45), transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
  animation: wx-twinkle 7s ease-in-out infinite;
  transition: opacity 900ms var(--ease-soft);
}
@keyframes wx-twinkle { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
:root[data-theme="light"] .wx-stars { opacity: 0; animation: none; }

/* the two ways on: the next part, and the conversation */
.wa-origin__links { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; margin: 0; }
.wa-origin__words--later { animation-delay: 3.7s; }

/* a subtitle set like a dictionary entry */
.wa-dek--define { font-style: normal; }
.wa-define__word { font-style: italic; }
.wa-define__part { margin: 0 .55em; font-family: var(--font-body); font-size: .58em; letter-spacing: .16em; text-transform: uppercase; vertical-align: .22em; opacity: .85; }
.wa-define__sense { font-style: italic; }
.wa-define__sense em { font-style: normal; }

/* the diary: set in, in italics, held by a faint line */
.wa-quote { margin: 1.6em 0 1.9em; padding: .1em 0 .1em 1.4em; border-left: 1px solid var(--wx-rule); }
.wa-quote p { margin: 0 0 .9em; font-style: italic; font-size: calc(var(--text-read) * .94) !important; line-height: 1.62 !important; opacity: .9; }
.wa-quote p:last-child { margin-bottom: 0; }
.wa-quote em { font-style: normal; }

/* "we / draw / in / breath": each word a step down and across, arriving on its own */
.wa-stair { margin: 1.3em 0 1.7em; font-weight: 300; font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem) !important; line-height: 1.5 !important; }
.wa-stair span { display: block; padding-left: calc(var(--step, 0) * 2.6em); }

/* short lines, each on its own line; some set in */
.wa-lines { margin: 1.4em 0 1.6em; line-height: 1.62 !important; }
.wa-lines span { display: block; }
.wa-lines span.is-in { padding-left: 2.2em; }

/* a photograph within the essay: a little wider than the text, as it is (the worn card and all), captioned in the hand of the page */
.wa-print { margin: 2.6em -2.5rem 2.8em; }
.wa-print img { display: block; width: 100%; height: auto; max-width: none; border-radius: 3px; box-shadow: 0 24px 60px rgb(10 14 18 / .38); }
:root[data-theme="light"] .wa-print img { box-shadow: 0 24px 60px rgb(40 50 60 / .2); }
.wa-print figcaption { margin-top: .9rem; font-family: var(--font-display); font-style: italic; font-size: 1.02rem; text-align: center; color: var(--wx-soft); }
@media (max-width: 700px) { .wa-print { margin-left: 0; margin-right: 0; } }

/* notes: small numbers in the text, the notes themselves after the essay */
.wa-ref { font-size: .6em; line-height: 0; vertical-align: .75em; }
.wa-ref a { padding: 0 .15em; font-family: var(--font-body); color: var(--wx-soft); text-decoration: none; }
.wa-ref a:hover { color: var(--wx-fg); }
.wa-notes { margin-top: clamp(2.5rem, 7vh, 4rem); padding-top: 1.4rem; border-top: 1px dashed var(--wx-rule); }
.wa-notes__label { margin: 0 0 .9rem; font-family: var(--font-body); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--wx-soft); }
.wa-notes ol { margin: 0; padding-left: 1.3em; }
.wa-notes li { margin: 0 0 .9em; padding-left: .3em; font-family: var(--font-display); font-size: 1rem; line-height: 1.6; color: var(--wx-soft); }
.wa-notes li::marker { font-family: var(--font-body); font-size: .8em; }
.wa-notes li:target { color: var(--wx-fg); }
.wa-notes__back { margin-left: .2em; color: inherit; text-decoration: none; opacity: .7; }
.wa-notes__back:hover { opacity: 1; }
.wa-notes + .wa-end { margin-top: clamp(2rem, 5vh, 3rem); }

/* the closing photograph, feathered into the page */
.wa-fig--after { width: min(100% - 2 * var(--gutter), 56rem); margin: clamp(3rem, 8vh, 5rem) auto 0; }
.wa-fig--after .wa-fig__frame {
  -webkit-mask-image: radial-gradient(ellipse 70% 68% at 50% 50%, #000 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 68% at 50% 50%, #000 50%, transparent 100%);
}
.wa-fig--after figcaption { text-align: center; }

.wa-end { margin-top: clamp(3rem, 8vh, 5rem); }
.wa-origin { padding: 1.6rem 0 1.5rem; border-top: 1px dashed var(--wx-rule); border-bottom: 1px dashed var(--wx-rule); }
.wa-origin__label { margin: 0 0 .5rem; font-family: var(--font-body); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--wx-soft); }
.wa-origin__text { margin: 0 0 1.4rem; font-family: var(--font-display); font-style: italic; font-size: 1.08rem; line-height: 1.55; color: var(--wx-soft); }
/*
  The way on to Substack: no outline, just a soft drop of light that swells in under the words,
  slides along them and fades (the homepage's cue under its words), and an arrow that leans forward.
*/
@property --drop-x { syntax: "<percentage>"; inherits: false; initial-value: 4%; }
@property --drop-a { syntax: "<number>"; inherits: false; initial-value: 0; }
.wa-origin__link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .2rem 0;
  color: inherit;
  text-decoration: none;
}
.wa-origin__words {
  --drop-x: 4%;
  --drop-a: 0;
  padding-bottom: .3em;
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.08rem, 1rem + .3vw, 1.22rem);
  letter-spacing: .005em;
  background-image: radial-gradient(closest-side,
    rgb(var(--wx-drop) / calc(var(--drop-a) * .8)) 0%,
    rgb(var(--wx-drop) / calc(var(--drop-a) * .45)) 35%,
    rgb(var(--wx-drop) / calc(var(--drop-a) * .12)) 70%,
    rgb(var(--wx-drop) / 0) 100%);
  background-repeat: no-repeat;
  background-size: 3.2em .34em;
  background-position: var(--drop-x) 100%;
  animation: wx-drop 5s linear 1.2s infinite;
}
@keyframes wx-drop {
  0% { --drop-x: 4%; --drop-a: 0; }
  22% { --drop-a: .95; }
  50% { --drop-a: .85; }
  72% { --drop-x: 96%; --drop-a: 0; }
  100% { --drop-x: 96%; --drop-a: 0; }
}
.wa-origin__arrow { flex: none; width: 15px; height: 15px; margin-top: -.35em; opacity: .7; transition: transform 700ms var(--ease-soft), opacity 500ms var(--ease-soft); }
.wa-origin__link:hover .wa-origin__arrow,
.wa-origin__link:focus-visible .wa-origin__arrow { transform: translate(3px, -3px); opacity: 1; }
/* hovering: the drop rests under the whole phrase */
.wa-origin__link:hover .wa-origin__words,
.wa-origin__link:focus-visible .wa-origin__words {
  animation: none;
  --drop-x: 50%;
  --drop-a: .6;
  background-size: 100% .34em;
}
.wa-origin__link:focus-visible { outline: 1px solid currentColor; outline-offset: 6px; border-radius: 4px; }

/*
  The article arrives after the title: each part comes out of a blur as it rises into view
  (set by the script as you scroll); until the title has settled, nothing below it shows.
*/
.js .wx [data-wx-reveal] { opacity: 0; filter: blur(12px); transition: opacity 700ms var(--ease-soft), filter 900ms var(--ease-soft); }
.js .wx.is-ready [data-wx-reveal] { will-change: opacity, filter; }

/* reading progress, a hairline along the top */
.wx-progress { position: fixed; z-index: 40; left: 0; right: 0; top: 0; height: 2px; }
.wx-progress span { display: block; height: 100%; background: currentColor; opacity: .5; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ---- light / dark: a quiet sun or moon, top right, opposite the monogram ---- */
.wx-theme {
  position: fixed;
  z-index: 45;
  top: calc(env(safe-area-inset-top, 0px) + clamp(20px, 3.4vw, 40px));
  right: calc(env(safe-area-inset-right, 0px) + clamp(22px, 4vw, 54px));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--wx-chrome, var(--paper));
  opacity: .72;
  cursor: pointer;
  transition: opacity 500ms var(--ease-soft), color 900ms var(--ease-soft);
}
[data-chrome-ink="dark"] .wx-theme { --wx-chrome: var(--ink); }
.wx-theme:hover, .wx-theme:focus-visible { opacity: 1; }
.wx-theme:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; }
.wx-theme svg { grid-area: 1 / 1; width: 22px; height: 22px; transition: opacity 700ms var(--ease-soft), transform 900ms var(--ease-soft); }
/* it shows the one you'd switch to: the sun on the dark page, the moon on the light one */
.wx-theme__moon { opacity: 0; transform: rotate(-30deg) scale(.7); }
:root[data-theme="light"] .wx-theme__sun { opacity: 0; transform: rotate(40deg) scale(.7); }
:root[data-theme="light"] .wx-theme__moon { opacity: 1; transform: none; }
/* a soft drop of light behind it, as on the homepage's arrows */
.wx-theme::before {
  content: ""; position: absolute; inset: -14px; border-radius: 50%; z-index: -1; opacity: 0;
  background: radial-gradient(circle, rgb(255 255 255 / .12) 0%, rgb(255 255 255 / .22) 42%, rgb(255 255 255 / 0) 72%);
  filter: blur(5px);
  transition: opacity 600ms var(--ease-soft);
}
.wx-theme:hover::before { opacity: 1; }
.is-menu-open .wx-theme { opacity: 0; visibility: hidden; }

/* ---- the footer: as on the homepage, on a gradient that flows on from the page into the evening slate ---- */
.wx-page .site-footer {
  position: relative;
  z-index: 2;
  min-height: 0;   /* only as tall as what it holds (the site's footer is otherwise most of a screen tall, with its words at the bottom) */
  /* it overlaps the end of the page and fades in over it, so there's no seam between them */
  margin-top: -9vh;
  padding-top: calc(9vh + clamp(2.5rem, 7vh, 4.5rem));
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 9vh);
  mask-image: linear-gradient(180deg, transparent 0, #000 9vh);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1.1rem);
  color: var(--paper);
  /* from the night blue at the end of the page into the steel-slate blues of the menu and the homepage footer */
  background: linear-gradient(180deg, #2b3e4d 0%, #2a4050 30%, #283f50 50%, #243746 74%, #1e2e3b 100%);   /* deepening only, with no lighter band */
}
/* the light page's footer: sand, through a soft lilac, into the same steel-slate blues */
.wx-page .site-footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, #ece3d4 0%, #dcd2cd 8%, #a9b6c3 18%, #6d8ca1 29%, #4e6c83 40%, #3d586c 52%, #2b4253 64%, #243746 80%, #1e2e3b 100%);
  transition: opacity 900ms var(--ease-soft);
}
:root[data-theme="light"] .wx-page .site-footer::before { opacity: 1; }
/* this piece's footer: a rainbow in the rain over open water. It dissolves slowly out of the end of the essay (one
   long, eased dissolve over 40vh, in the light and the dark reading alike); the closing line rests in the grey above;
   the rainbow rises from the horizon a little right of the middle, beside the signature, so the words never hide it;
   the horizon lies just below "Serving joy…", and the slate gathers only below that, so it never dims the rainbow. */
.wa { padding-bottom: calc(40vh + .5rem); }   /* room for the long dissolve */
.wx-page .site-footer {
  margin-top: -40vh;
  padding-top: calc(40vh + clamp(9rem, 30vh, 17rem));
  -webkit-mask-image: linear-gradient(180deg, transparent 0, rgb(0 0 0 / .03) 4vh, rgb(0 0 0 / .1) 8vh, rgb(0 0 0 / .22) 12vh, rgb(0 0 0 / .35) 16vh, rgb(0 0 0 / .5) 20vh, rgb(0 0 0 / .65) 24vh, rgb(0 0 0 / .78) 28vh, rgb(0 0 0 / .9) 32vh, rgb(0 0 0 / .97) 36vh, #000 40vh);
  mask-image: linear-gradient(180deg, transparent 0, rgb(0 0 0 / .03) 4vh, rgb(0 0 0 / .1) 8vh, rgb(0 0 0 / .22) 12vh, rgb(0 0 0 / .35) 16vh, rgb(0 0 0 / .5) 20vh, rgb(0 0 0 / .65) 24vh, rgb(0 0 0 / .78) 28vh, rgb(0 0 0 / .9) 32vh, rgb(0 0 0 / .97) 36vh, #000 40vh);
  /* the photograph is hung from the signature (--sig-y, set by read.js). Its horizon is 86% of the way down and the
     photo is .55 as tall as it is wide, so the horizon is .472 of its width from the top; --fw (its width) is wide
     enough that its top clears the footer's top and its sides reach both edges of the screen. The rainbow's foot is half way across it, and is set at 62% of the
     screen's width. */
  --fw: max(128vw, calc((var(--sig-y, 700px) + 120px) * 2.12 + 40px));   /* at least 124vw, so with its middle at 62vw it always reaches both edges */
  background:
    radial-gradient(60% 34% at 38% 100%, rgb(120 104 86 / .16), transparent 70%),
    linear-gradient(180deg,
      transparent 0%, transparent calc(var(--sig-y, 70%) + 116px),   /* clear sky right down to the horizon (120px below the signature) */
      rgb(52 72 90 / .3) calc(var(--sig-y, 70%) + 170px),
      rgb(44 64 82 / .6) calc(var(--sig-y, 70%) + 225px),
      rgb(40 60 78 / .85) calc(var(--sig-y, 70%) + 280px),
      #283f50 calc(var(--sig-y, 70%) + 335px),
      #1e2e3b 100%),   /* the slate gathers only on the water, from the horizon down */
    url('../img/writing/quietlings-1-footer.jpg') no-repeat,
    linear-gradient(#34495a, #34495a);   /* the sea's own colour beneath, wherever the photograph ends */
  background-size: auto, auto, var(--fw) auto, auto;
  background-position: 0 0, 0 0, calc(62vw - .5 * var(--fw)) calc(var(--sig-y, 700px) + 120px - .472 * var(--fw)), 0 0;
}
/* the light page: no sand laid over the photograph; the dissolve carries the page's own colour into it */
.wx-page .site-footer::before { display: none; }
.wx-page .site-footer__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.wx-page .site-footer__closing { order: 1; max-width: 24ch; font-size: var(--text-closing); line-height: 1.16; margin: 0 auto clamp(4rem, 11vh, 6.5rem); text-shadow: 0 2px 28px rgb(40 28 20 / .55); }
.wx-page .site-footer__sig {
  order: 2;
  display: block;
  margin: 0 auto;
  width: clamp(130px, 13vw, 170px);
  aspect-ratio: 1200 / 932;
  -webkit-mask: url("/assets/img/jesse-signature-white.png") center / contain no-repeat;
  mask: url("/assets/img/jesse-signature-white.png") center / contain no-repeat;
}
.wx-page .site-footer__role {
  order: 3;
  position: relative;
  margin: -2.6rem 0 clamp(2.5rem, 6.5vh, 4rem);
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(1.2rem, 1rem + .6vw, 1.5rem);
  letter-spacing: .01em;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .wx-page .site-footer__role {
    color: transparent;
    background-image: linear-gradient(90deg,
      rgb(243 237 227 / .78) 0%, rgb(243 237 227 / .78) 38%, #fff3e2 50%, rgb(243 237 227 / .78) 62%, rgb(243 237 227 / .78) 100%);
    background-size: 260% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 1px 8px rgb(40 28 20 / .55));
    animation: wx-role-glow 5.2s ease-in-out 1s infinite;
  }
}
.wx-page .site-footer__role.is-chars {
  color: rgb(243 237 227 / .8);
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  animation: none;
}
.wx-page .site-footer__role.is-chars .bt-char { animation: wx-role-char-glow 5.2s ease-in-out 1s infinite; }
@keyframes wx-role-char-glow {
  0%, 22%, 100% { color: rgb(243 237 227 / .8); text-shadow: none; }
  9% { color: #fff6ea; text-shadow: 0 0 12px rgb(255 240 220 / .45); }
}
@keyframes wx-role-glow {
  0% { background-position: 100% 0; }
  70%, 100% { background-position: 0% 0; }
}
.wx-page .site-footer__nav { order: 4; margin-bottom: clamp(.5rem, 1.5vh, 1rem); }
.wx-page .site-footer__nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem 1.9rem; margin: 0; padding: 0; list-style: none; }
.wx-page .site-footer__nav a { display: inline-block; padding: .45rem .1rem; font-size: .9375rem; letter-spacing: .02em; color: inherit; text-decoration: none; opacity: .9; transition: opacity 500ms var(--ease-soft), transform 600ms var(--ease-soft); }
.wx-page .site-footer__nav a:hover, .wx-page .site-footer__nav a:focus-visible { opacity: 1; transform: translateY(-2px); }   /* the word rises a little, as the menu's do */
.wx-page .site-footer__legal { order: 5; }
.wx-page .site-footer .visually-hidden { order: 6; }

@media (prefers-reduced-motion: reduce) {
  .wa-head > *, .wa-head::before { animation: none; }
  .wx, .wx::before, .wx::after { transition: none; }
  .js .wx [data-wx-reveal] { opacity: 1; filter: none; transition: none; }
  .wx-stars, .wa-cover { animation: none; }
  .wa-origin__words { animation: none; --drop-x: 50%; --drop-a: .45; background-size: 100% .34em; }
  .wx-page .site-footer__role { animation: none; background-position: 50% 0; }
  .wx-page .site-footer__role.is-chars .bt-char { animation: none; }
}

/*
  Links: no sliding drop of light (that means "there's something hidden here", in the opening and on the
  road and the moon). A link takes a fine line under its words when you point at it.
*/
.wa-origin__words { animation: none; background: none; text-decoration: underline 1px; text-underline-offset: .32em; text-decoration-color: transparent; transition: text-decoration-color 500ms var(--ease-soft); }
.wa-origin__link:hover .wa-origin__words,
.wa-origin__link:focus-visible .wa-origin__words { background: none; text-decoration-color: color-mix(in srgb, currentColor 55%, transparent); }

/* the footer's small links: a straight line under the one the mouse is on */
.site-footer__legal a:hover { text-decoration: underline solid 1px; text-underline-offset: .3em; }
/* the closing words rest over pale grey rain here, so they carry a deeper shade */
.wx-page .site-footer__closing { text-shadow: 0 1px 3px rgb(16 24 34 / .5), 0 2px 26px rgb(16 24 34 / .62), 0 0 60px rgb(16 24 34 / .4); }

/* light: the opening photograph dissolves into the page on a long eased curve (the plain straight fade left a visible
   line where it met the pale page, its end too sudden against the light) */
:root[data-theme="light"] .wa-fig--before .wa-fig__frame {
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 30%, rgb(0 0 0 / .96) 38%, rgb(0 0 0 / .88) 46%, rgb(0 0 0 / .76) 54%, rgb(0 0 0 / .61) 62%, rgb(0 0 0 / .45) 70%, rgb(0 0 0 / .3) 77%, rgb(0 0 0 / .18) 84%, rgb(0 0 0 / .09) 90%, rgb(0 0 0 / .03) 95%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 30%, rgb(0 0 0 / .96) 38%, rgb(0 0 0 / .88) 46%, rgb(0 0 0 / .76) 54%, rgb(0 0 0 / .61) 62%, rgb(0 0 0 / .45) 70%, rgb(0 0 0 / .3) 77%, rgb(0 0 0 / .18) 84%, rgb(0 0 0 / .09) 90%, rgb(0 0 0 / .03) 95%, transparent 100%);
}
