/* digvijayshahi.com — design system and homepage.
   Direction: docs/decisions/2026-10-29-homepage-design-direction.md */

/* ---------- Fonts (self-hosted, subset to Latin + IAST) ---------- */
@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-roman.woff2") format("woff2");
  font-weight: 300 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Code Pro";
  src: url("/assets/fonts/source-code-pro-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
/* Devanagari (Sanskrit in Writings): Source Serif has none, so these characters, and only
   these, are set in Tiro Devanagari Sanskrit (owner, 2026-12-02), a serif drawn for Sanskrit
   with its full set of conjuncts and Vedic marks. Self-hosted and subset to Devanagari
   (licence: /assets/fonts/LICENSE-OFL.txt). The unicode-range means the browser fetches it
   only on a page that has Devanagari on it; until it arrives, or if it can't, the text
   shows in a Devanagari font already on the reader's device ("Devanagari Fallback"). */
@font-face {
  font-family: "Tiro Devanagari Sanskrit";
  src: local("Tiro Devanagari Sanskrit"), local("TiroDevanagariSanskrit-Regular"),
    url("/assets/fonts/tiro-devanagari-sanskrit.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  unicode-range: U+0900-097F, U+1CD0-1CFF, U+A8E0-A8FF, U+200C-200D, U+25CC;
  font-display: swap;
}
@font-face {
  font-family: "Devanagari Fallback";
  src: local("Noto Serif Devanagari"), local("NotoSerifDevanagari-Regular"),
    local("Devanagari Sangam MN"), local("DevanagariSangamMN"), local("Kohinoor Devanagari"), local("KohinoorDevanagari-Regular"),
    local("Nirmala UI"), local("NirmalaUI"), local("Noto Sans Devanagari"), local("Mangal");
  unicode-range: U+0900-097F, U+1CD0-1CFF, U+A8E0-A8FF, U+200C-200D, U+25CC;
  font-display: swap;
}

/* ---------- Tokens ---------- */
/* Scene colours are a continuous blend between a day and a night value.
   site.js sets --day (0 = night, 1 = day) from the scroll position every frame,
   so the change follows the reader's scroll instead of firing on a timer.
   --day-text is a steeper version of --day for the fixed header, which sits over
   both scenes; page text keeps its own scene's ink (see .js .section below). */
@property --day { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --day-text { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --ink-day { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --ink-night { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --ink-header { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --scene-fade { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --day-surface { syntax: "<color>"; inherits: true; initial-value: #f4f1ea; }
@property --day-surface-2 { syntax: "<color>"; inherits: true; initial-value: #eae5d9; }
@property --day-ink { syntax: "<color>"; inherits: true; initial-value: #141a2e; }
@property --day-ink-muted { syntax: "<color>"; inherits: true; initial-value: #4e5367; }
@property --day-rubric { syntax: "<color>"; inherits: true; initial-value: #b23a22; }
@property --day-rule { syntax: "<color>"; inherits: true; initial-value: #d6cfc0; }
@property --surface { syntax: "<color>"; inherits: true; initial-value: #f4f1ea; }
@property --surface-2 { syntax: "<color>"; inherits: true; initial-value: #eae5d9; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #141a2e; }
@property --ink-muted { syntax: "<color>"; inherits: true; initial-value: #4e5367; }
@property --rubric { syntax: "<color>"; inherits: true; initial-value: #b23a22; }
@property --rule { syntax: "<color>"; inherits: true; initial-value: #d6cfc0; }

:root {
  /* Indigo is shared by both themes: the night scene (hero, footer) and the menu. */
  --indigo: #0e1530;
  --indigo-2: #172042;
  --on-indigo: #ece6d9;
  --on-indigo-muted: #a7adc6;
  --rubric-night: #e8714e;

  /* Day values: light theme. */
  --day-surface: #f4f1ea;
  --day-surface-2: #eae5d9;
  --day-ink: #141a2e;
  --day-ink-muted: #4e5367;
  --day-rubric: #b23a22;
  --day-rule: #d6cfc0;
  --day-shadow: rgb(20 26 46 / 0.2);
  --grain-opacity: 0.045;
  --image-filter: none;
  --cover-shadow: 0 1px 1px rgb(20 26 46 / 0.08), 0 12px 24px -8px rgb(20 26 46 / 0.28), 0 40px 80px -24px rgb(20 26 46 / 0.35);
  color-scheme: light;

  /* Night values: the same in both themes. */
  --night-rule: #2a3354;
  --night-shadow: rgb(0 0 0 / 0.5);

  /* The tokens components use. */
  --surface: color-mix(in oklab, var(--day-surface) calc(var(--day) * 100%), var(--indigo));
  --surface-2: color-mix(in oklab, var(--day-surface-2) calc(var(--day) * 100%), var(--indigo-2));
  --ink: color-mix(in oklab, var(--day-ink) calc(var(--day-text) * 100%), var(--on-indigo));
  --ink-muted: color-mix(in oklab, var(--day-ink-muted) calc(var(--day-text) * 100%), var(--on-indigo-muted));
  --rubric: color-mix(in oklab, var(--day-rubric) calc(var(--day) * 100%), var(--rubric-night));
  --rule: color-mix(in oklab, var(--day-rule) calc(var(--day) * 100%), var(--night-rule));
  --thread-shadow: color-mix(in oklab, var(--day-shadow) calc(var(--day) * 100%), var(--night-shadow));
  --lamp: calc(1 - var(--day));

  --font-serif: "Source Serif 4", "Source Serif Pro", "Tiro Devanagari Sanskrit", "Devanagari Fallback", Georgia, "Times New Roman", serif;
  --font-mono: "Source Code Pro", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(1.5rem, 6vw, 7.5rem);
  --max: 90rem;
  --measure: 38rem;
  --intro: 44rem; /* the hero's introduction, and each homepage section's opening paragraph */
  --header-h: 4.5rem;

  --scene-fade: 1;

  --dur-instant: 100ms;
  --dur-quick: 220ms;
  --dur-move: 420ms;
  --dur-story: 1400ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  /* Theme switches tween the day values; scroll never does (it scrubs --day directly). */
  transition:
    --day-surface 600ms var(--ease-in-out),
    --day-surface-2 600ms var(--ease-in-out),
    --day-ink 600ms var(--ease-in-out),
    --day-ink-muted 600ms var(--ease-in-out),
    --day-rubric 600ms var(--ease-in-out),
    --day-rule 600ms var(--ease-in-out),
    --scene-fade 600ms var(--ease-in-out);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --day-surface: #17161c;
    --day-surface-2: #201f27;
    --day-ink: #e9e3d6;
    --day-ink-muted: #a9a5b3;
    --day-rubric: #e8714e;
    --day-rule: #34323d;
    --day-shadow: rgb(0 0 0 / 0.5);
    --grain-opacity: 0.03;
    --image-filter: brightness(0.94);
    --cover-shadow: 0 1px 1px rgb(0 0 0 / 0.3), 0 12px 24px -8px rgb(0 0 0 / 0.55), 0 40px 80px -24px rgb(0 0 0 / 0.6);
    --scene-fade: 0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --day-surface: #17161c;
  --day-surface-2: #201f27;
  --day-ink: #e9e3d6;
  --day-ink-muted: #a9a5b3;
  --day-rubric: #e8714e;
  --day-rule: #34323d;
  --day-shadow: rgb(0 0 0 / 0.5);
  --grain-opacity: 0.03;
  --image-filter: brightness(0.94);
  --cover-shadow: 0 1px 1px rgb(0 0 0 / 0.3), 0 12px 24px -8px rgb(0 0 0 / 0.55), 0 40px 80px -24px rgb(0 0 0 / 0.6);
  --scene-fade: 0;
  color-scheme: dark;
}

/* Text never flips between light and dark. Each part of the page keeps the ink of
   its own scene: reading sections keep dark ink, which rises out of the surface as
   day arrives and sinks back into it at dusk; the night hero and footer keep light
   ink, which does the reverse. site.js sets --ink-day and --ink-night alongside --day.
   In the dark theme both inks are light on a dark surface, so they simply stay
   (--scene-fade: 0). Without JS the page is day throughout and the root tokens apply. */
.js .section {
  --ink-in: calc(1 - var(--scene-fade) * (1 - var(--ink-day)));
  --ink: color-mix(in oklab, var(--day-ink) calc(var(--ink-in) * 100%), var(--surface));
  --ink-muted: color-mix(in oklab, var(--day-ink-muted) calc(var(--ink-in) * 100%), var(--surface));
  --rubric: color-mix(in oklab, var(--day-rubric) calc(var(--ink-in) * 100%), var(--surface));
  /* Rules rise with the ink, so no line shows at night without its text. */
  --rule: color-mix(in oklab, var(--day-rule) calc(var(--ink-in) * 100%), var(--surface));
}
.js .hero, .js .site-footer {
  --ink-in: calc(1 - var(--scene-fade) * (1 - var(--ink-night)));
  --ink: color-mix(in oklab, var(--on-indigo) calc(var(--ink-in) * 100%), var(--surface));
  --ink-muted: color-mix(in oklab, var(--on-indigo-muted) calc(var(--ink-in) * 100%), var(--surface));
  --rubric: color-mix(in oklab, var(--rubric-night) calc(var(--ink-in) * 100%), var(--surface));
}
.js .section, .js .hero, .js .site-footer { color: var(--ink); }
/* A still page (articles; Base.astro scene="still"): no night, so the hero and footer
   take the page's own ink, and the hero stays put as the reader scrolls on. */
:root[data-scene="still"] :is(.hero, .site-footer) {
  --ink-in: 1;
  --ink: var(--day-ink);
  --ink-muted: var(--day-ink-muted);
  --rubric: var(--day-rubric);
}
:root[data-scene="still"] .hero__inner { opacity: 1; transform: none; }
/* Without the night to mark it, the footer begins at a rule. */
:root[data-scene="still"] .site-footer { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
:root[data-scene="still"] .site-footer__top { border-top: 1px solid var(--rule); padding-top: clamp(4rem, 8vw, 7rem); }
/* The fixed header sits over both scenes, so its ink does have to change: it sinks
   into the bar, changes while it can't be seen, and rises again (--ink-header). */
.js .site-header {
  --ink-in: calc(1 - var(--scene-fade) * (1 - var(--ink-header)));
  --ink: color-mix(in oklab, color-mix(in oklab, var(--day-ink) calc(var(--day-text) * 100%), var(--on-indigo)) calc(var(--ink-in) * 100%), var(--surface));
}

/* While the scene is blending, element-level colour transitions would lag behind
   the scroll and then snap; switch them off so everything moves as one. */
:root.is-blending *, :root.is-blending *::before, :root.is-blending *::after {
  transition-property: transform, opacity, clip-path, background-size !important;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  /* Keeps the layout still when the preview locks scrolling and the scrollbar goes. */
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
  font-optical-sizing: auto;
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
/* Paper grain: static, barely perceptible. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: color-mix(in srgb, var(--rubric) 22%, transparent); }
:focus-visible {
  outline: 2px solid var(--rubric);
  outline-offset: 3px;
  border-radius: 2px;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 0.75rem; left: 0.75rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--on-indigo);
  color: var(--indigo);
  font: 500 0.8125rem/1 var(--font-mono);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.icon {
  width: 1em; height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Type ---------- */
.display, .display-2, .display-3 {
  font-weight: 300;
  letter-spacing: -0.02em;
  text-wrap: balance;
  font-variant-numeric: lining-nums;
}
.display {
  font-size: clamp(3.1rem, 1rem + 8.4vw, 9.5rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
}
.display-2 {
  font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4.5rem);
  line-height: 1.02;
}
.display-3 {
  font-size: clamp(1.9rem, 1.2rem + 2.2vw, 3rem);
  line-height: 1.05;
}
.eyebrow, .label, .meta, .cue, .tag {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-variant-numeric: lining-nums tabular-nums;
}
.label { color: var(--ink-muted); display: flex; gap: 0.9em; align-items: baseline; }
.label__num { color: var(--rubric); }
.meta { color: var(--ink-muted); }
.tag {
  display: inline-block;
  padding: 0.15em 0.5em;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--rubric);
  margin-right: 0.6em;
}

/* ---------- Layout ---------- */
.page { position: relative; }
.container {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { position: relative; padding-block: clamp(5rem, 10vw, 10rem); }
.above-thread { position: relative; z-index: 2; }
.section-head { display: grid; gap: 1.25rem; max-width: 52rem; }
.section-head__standard {
  max-width: var(--intro);
  color: var(--ink-muted);
  font-size: 1.125em;
}
.section-foot { margin-top: clamp(2.5rem, 5vw, 4rem); display: flex; flex-wrap: wrap; gap: 1.5rem 2.25rem; align-items: center; }

/* ---------- Links & buttons ---------- */
.link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-block: 0.35em;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
}
.link .icon { transition: transform var(--dur-quick) var(--ease-out); }
.link:hover .icon { transform: translateX(3px); }
.link--external:hover .icon { transform: translate(2px, -2px); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .link:hover { animation: underline-redraw var(--dur-move) var(--ease-in-out); }
}
@keyframes underline-redraw {
  0% { background-size: 100% 1px; background-position: 100% 100%; }
  50% { background-size: 0 1px; background-position: 100% 100%; }
  50.01% { background-size: 0 1px; background-position: 0 100%; }
  100% { background-size: 100% 1px; background-position: 0 100%; }
}

.button {
  --btn-bg: var(--ink);
  --btn-fg: var(--surface);
  --btn-fill: var(--rubric);
  --btn-fill-fg: var(--surface);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  height: 3rem;
  padding: 0 1.4rem 0 1.5rem;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  overflow: hidden;
  transition: color var(--dur-move) var(--ease-out), transform var(--dur-instant) var(--ease-out);
}
.button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-fill);
  clip-path: inset(100% 0 0 0 round 999px);
  transition: clip-path var(--dur-move) var(--ease-out);
}
/* The label rolls: the visible text slides up and an identical copy follows from below. */
.button__label {
  display: block;
  overflow: hidden;
  height: 1.4em;
  line-height: 1.4;
}
.button__text {
  position: relative;
  display: block;
  transition: transform var(--dur-move) var(--ease-out);
}
.button__text::after {
  content: attr(data-label);
  position: absolute;
  left: 0;
  top: 100%;
}
.button .icon { font-size: 1.05rem; transition: transform var(--dur-move) var(--ease-out); }
.button:hover {
  color: var(--btn-fill-fg);
  /* Once the fill has risen, take its colour so no edge of the old background shows. */
  background-color: var(--btn-fill);
  transition: color var(--dur-move) var(--ease-out), background-color 0s linear var(--dur-move), transform var(--dur-instant) var(--ease-out);
}
.button:hover::before { clip-path: inset(0 0 0 0 round 999px); }
@media (prefers-reduced-motion: no-preference) {
  .button:hover .button__text { transform: translateY(-100%); }
  .button:hover .icon { transform: translateX(3px); }
}
.button:active { transform: scale(0.98); }
.button--quiet {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.actions { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; align-items: center; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  color: var(--ink);
  transition: transform var(--dur-move) var(--ease-out), background-color var(--dur-quick) linear, color var(--dur-quick) linear, box-shadow var(--dur-quick) linear;
}
.site-header[data-state="pinned"] {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--rule);
}
.site-header[data-state="hidden"] { transform: translateY(-100%); }
.site-header__inner {
  height: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 2rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.125rem;
  font-weight: 500;
  font-variation-settings: "opsz" 20;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark__dot {
  width: 0.42rem; height: 0.42rem;
  border-radius: 50%;
  background: var(--rubric);
  transition: transform var(--dur-move) var(--ease-out);
}
.wordmark:hover .wordmark__dot { transform: scale(1.5); }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: clamp(1.5rem, 3vw, 3rem); }
.site-nav a {
  position: relative;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding-block: 0.5rem;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.15rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-move) var(--ease-out);
}
.site-nav a:hover::after, .site-nav a[aria-current]::after { transform: scaleX(1); transform-origin: left; }
.site-header__tools { display: flex; align-items: center; gap: 0.5rem; }
.icon-button {
  display: inline-grid;
  place-items: center;
  grid-auto-flow: column;
  gap: 0.5rem;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.6rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 1.15rem;
  transition: background-color var(--dur-quick) var(--ease-out);
}
.icon-button:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.theme-toggle .icon { transition: transform var(--dur-move) var(--ease-out), opacity var(--dur-quick) linear; grid-area: 1 / 1; }
.theme-toggle .icon--moon { opacity: 0; transform: rotate(-40deg) scale(0.6); }
:root[data-theme-effective="dark"] .theme-toggle .icon--sun { opacity: 0; transform: rotate(40deg) scale(0.6); }
:root[data-theme-effective="dark"] .theme-toggle .icon--moon { opacity: 1; transform: none; }
.menu-toggle { display: none; }
.menu-toggle__label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* ---------- Mobile menu ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  align-content: center;
  padding: var(--gutter);
  background: var(--indigo);
  color: var(--on-indigo);
}
.menu[hidden] { display: none; }
.menu__close { position: absolute; top: 0.9rem; right: calc(var(--gutter) - 0.6rem); }
.menu__list { display: grid; gap: 1.75rem; }
.menu__list a { display: grid; gap: 0.2rem; text-decoration: none; }
.menu__list a[aria-current] .menu__title { color: var(--rubric-night); }
.menu__title { font-size: clamp(2.5rem, 10vw, 3.5rem); font-weight: 300; line-height: 1; letter-spacing: -0.02em; }
.menu__meaning { font: 500 0.75rem/1.4 var(--font-mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--on-indigo-muted); }
@media (prefers-reduced-motion: no-preference) {
  .menu.is-open .menu__list li { animation: rise var(--dur-move) var(--ease-out) both; }
  .menu.is-open .menu__list li:nth-child(2) { animation-delay: 40ms; }
  .menu.is-open .menu__list li:nth-child(3) { animation-delay: 80ms; }
  .menu.is-open .menu__list li:nth-child(4) { animation-delay: 120ms; }
}

/* ---------- Hero (night) ---------- */
.hero {
  position: relative;
  min-height: max(36rem, 94svh);
  display: grid;
  grid-template-rows: 1fr auto;
  padding: calc(var(--header-h) + 3rem) 0 0;
  overflow: clip;
}
/* Lamp: a faint warm light that drifts toward the pointer. */
.hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(38rem 30rem at var(--lamp-x, 74%) var(--lamp-y, 30%), rgb(255 214 170 / 0.075), transparent 70%);
  pointer-events: none;
  opacity: var(--lamp);
}
.hero__inner {
  align-self: end;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  /* Scroll-linked: the hero recedes as the reader moves on (--hero-p is set by site.js). */
  opacity: calc(1 - var(--hero-p, 0) * 0.85);
  transform: translateY(calc(var(--hero-p, 0) * -4rem));
}
.hero--page { min-height: max(30rem, 72svh); }
.hero__name { color: var(--ink-muted); }
.hero__title { font-variation-settings: "opsz" 60; }
/* The homepage proposition is two longer phrases: sized so each keeps to one line
   and stays clear of the thread on laptop and desktop widths. */
.page-home .hero__title { font-size: clamp(2.25rem, 0.6rem + 6.6vw, 7.5rem); }
.hero__title .line { display: block; overflow: clip; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.hero__title .line > span { display: inline-block; }
.hero__intro {
  max-width: var(--intro);
  color: var(--ink-muted);
  font-size: clamp(1.125rem, 1rem + 0.35vw, 1.3125rem);
  line-height: 1.55;
}
.hero__foot {
  width: 100%;
  max-width: var(--max);
  margin: clamp(3rem, 7vw, 5.5rem) auto 0;
  padding: 1.1rem var(--gutter) 1.4rem;
}
/* A head with nothing in its foot draws no rule: the page body’s first rule follows. */
.hero__foot.hero__foot--bare { margin-top: clamp(1rem, 2vw, 2rem); padding-block: 0; }
.hero__foot.hero__foot--bare::before { display: none; }
.hero__foot::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: 1.1rem;
  background: var(--rule);
}
.cue {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color var(--dur-quick) linear;
}
.cue:hover { color: var(--ink); }
.cue .icon { font-size: 1rem; }
@media (prefers-reduced-motion: no-preference) {
  .cue .icon { animation: nudge 2.4s var(--ease-in-out) 2.4s infinite; }
}
@keyframes nudge { 0%, 70%, 100% { transform: none; } 35% { transform: translateY(4px); } }

/* Hero entrance: lines rise into place at their final size and weight. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__name, .js .hero__intro, .js .hero__foot, .js .crumbs { animation: fade-up 900ms var(--ease-out) both; }
  .js .hero__name { animation-delay: 80ms; }
  .js .hero__intro { animation-delay: 700ms; }
  .js .hero__foot { animation-delay: 1000ms; }
  .js .hero__title .line > span { animation: line-in 1100ms var(--ease-out) both; }
  .js .hero__title .line:nth-child(2) > span { animation-delay: 120ms; }
}
@keyframes line-in { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- The thread ---------- */
.thread {
  position: absolute;
  top: 0; left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
/* Colours of the thread follow the scene: vermilion by day, a lighter vermilion at night. */
.thread {
  --thread: var(--rubric);
  --thread-light: color-mix(in oklab, var(--rubric), #fff 30%);
  --thread-dark: color-mix(in oklab, var(--rubric), #000 32%);
  --thread-hole: color-mix(in oklab, var(--surface), #000 55%);
  --thread-rim: color-mix(in oklab, var(--surface), #fff 30%);
}
.thread__route { fill: none; stroke: none; }
.thread__strand path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1000 1000;
  stroke-dashoffset: 1000;
}
.thread__shadow { stroke: var(--thread-shadow); stroke-width: 2.8; }
.thread__body { stroke: var(--thread); stroke-width: 2.6; }
.thread__ply-b { stroke: var(--thread-dark); stroke-width: 1.2; }
.thread__ply-a { stroke: var(--thread-light); stroke-width: 1.2; }
.thread__shine { stroke: color-mix(in oklab, var(--thread-light), #fff 40%); stroke-width: 0.5; opacity: 0.75; }
.thread__cover { fill: none; stroke: var(--surface); stroke-width: 9; stroke-linecap: butt; }
/* Eyelets: a ring set into the page, faint until the thread reaches it. */
.thread {
  /* The ring follows the header's ink, so it fades through the change instead of flipping. */
  --eyelet-ring: color-mix(in oklab, var(--ink) calc(38% * var(--ink-header)), var(--surface));
  --eyelet-shine: color-mix(in oklab, var(--surface), #fff 55%);
}
.eyelet { opacity: 0.4; transition: opacity var(--dur-move) var(--ease-out); }
.eyelet.is-lit { opacity: 1; }
.eyelet__shadow { fill: var(--thread-shadow); }
.eyelet__ring { fill: var(--surface); stroke: var(--eyelet-ring); stroke-width: 1.5; }
.eyelet__hole { fill: var(--thread-hole); }
.eyelet__shine { fill: none; stroke: var(--eyelet-shine); stroke-width: 0.8; stroke-linecap: round; }
.thread__knot path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.knot__shadow { stroke: var(--thread-shadow); stroke-width: 2.8; }
.knot__body { stroke: var(--thread); stroke-width: 2.6; }
.knot__shine { stroke: var(--thread-light); stroke-width: 0.8; opacity: 0.8; }
.knot__halo { stroke: var(--surface); stroke-width: 6.5; stroke-linecap: butt !important; }
.knot__fibre { stroke: var(--thread-light); stroke-width: 0.5; }
.thread-anchor { position: absolute; width: 0; height: 0; pointer-events: none; }
/* Wide screens weave through the layout; narrow screens keep the thread in the gutters. */
.thread-anchor--narrow { display: none; }
[data-anchor="hero-rail"] { left: calc(var(--gutter) * 0.5); top: -1.5rem; }
/* Anchor positions (tune the route here). */
[data-anchor="start"] { right: 17%; top: 22%; }
[data-anchor="hero-swing"] { right: 6.5%; top: 48%; }
[data-anchor="hero-weave"] { right: 21%; top: 76%; }
[data-anchor="book"] { left: 50%; top: 46%; }
[data-anchor="writings-in"] { right: 22%; top: clamp(1.5rem, 3vw, 3rem); }
.thread-waypoints { display: contents; }
[data-anchor="writings-low"] { right: 12%; top: calc(clamp(3rem, 6vw, 5rem) * -0.5); }
[data-anchor="writings-cross"] { left: 6%; top: calc(clamp(3rem, 6vw, 5rem) * -0.42); }
.thread-anchor--rail { left: calc(var(--gutter) * -0.5); top: 2.2rem; }
[data-anchor="essays"] { top: 1.6rem; }
[data-anchor="work-in"] { left: calc(var(--gutter) * 0.5); top: clamp(1.5rem, 3vw, 3rem); }
/* Across the top of Work the thread hangs between two points, sagging a little in the middle. */
[data-anchor="work-drape"] { left: 50%; top: clamp(3rem, 5vw, 5rem); }
[data-anchor="work-corner"] { right: calc(var(--gutter) * 0.5); top: clamp(4.5rem, 8vw, 8rem); }
[data-anchor="work-out"] { right: calc(var(--gutter) * 0.5); bottom: clamp(2.5rem, 5vw, 5rem); }
[data-anchor="knot"] { left: 50%; top: 50%; }
[data-anchor="gutter-in"] { right: calc(var(--gutter) * 0.5); top: clamp(1.5rem, 3vw, 3rem); }
[data-anchor="gutter-out"] { right: calc(var(--gutter) * 0.5); bottom: clamp(2.5rem, 5vw, 5rem); }
/* Books page: from the page head into the gap between covers and text, where the
   thread runs like a binding, stitched at each book, then out to the footer knot.
   Narrow screens keep it in the right gutter. */
[data-anchor="page-swing"] { right: 7%; top: 52%; }
[data-anchor="page-drop"] { left: 52%; bottom: 6%; }
[data-anchor="shelf-spine"] { left: 50%; top: 0.4rem; }
[data-anchor="shelf-spine-end"] { left: 50%; bottom: 0; }
[data-anchor="shelf-out"] { left: 75%; bottom: clamp(1.5rem, 3vw, 3rem); }
[data-anchor="page-drop-narrow"] { right: calc(var(--gutter) * 0.5); bottom: 12%; }
[data-anchor="shelf-item"] { right: calc(var(--gutter) * -0.5); top: calc(var(--shelf-pad-top) + 0.4rem); }
[data-anchor="shelf-out-narrow"] { right: calc(var(--gutter) * 0.5); bottom: clamp(2.5rem, 5vw, 5rem); }

/* ---------- Books ---------- */
.books { padding-top: clamp(6rem, 12vw, 11rem); }
.books__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
  row-gap: clamp(3rem, 6vw, 5rem);
  align-items: center;
}
.books__text { grid-column: 1 / span 7; display: grid; gap: 1.25rem; }
.books__title { margin-top: 0.75rem; }
.books__premise { max-width: var(--intro); font-size: 1.125em; }
.books__text .actions { margin-top: 1rem; }
/* "Available in": a book's formats on Amazon, one row per edition, between the summary
   and the actions. site.js marks formats the visitor's store doesn't sell. */
.formats {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  max-width: var(--intro);
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.formats__label { color: var(--rubric); }
.formats__groups { display: grid; gap: 0.4rem; }
.formats__list { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1.75rem; font-size: 1rem; }
.formats__edition { min-width: 4.5rem; color: var(--ink-muted); }
/* Each format carries its own marker, so the row wraps without a stray separator. */
.formats__item { display: inline-flex; align-items: baseline; gap: 0.6rem; }
.formats__item::before {
  content: "";
  flex: none;
  width: 0.3rem; height: 0.3rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
  transform: translateY(-0.2em);
}
.formats__item a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size var(--dur-move) var(--ease-out);
}
.formats__item a[href]:hover { background-size: 100% 1px; }
.formats__note { font-size: 0.6875rem; color: var(--ink-muted); }
.formats__note:empty { display: none; }
.formats__item.is-unavailable a { color: var(--ink-muted); opacity: 0.7; }
.formats__store { grid-column: 1 / -1; }
/* "Showing Amazon.in · Change": once per page, as quiet as a footnote. */
.store-choice { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.6rem; color: var(--ink-muted); }
.store-choice[hidden] { display: none; }
.store-choice [data-store-name] { color: var(--ink); }
.store-choice__change {
  padding: 0;
  border: 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  color: var(--ink-muted);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: color var(--dur-quick) linear;
}
.store-choice__change:hover, .store-choice__change[aria-expanded="true"] { color: var(--ink); }

/* ---------- Books page: coming soon ---------- */
/* Not a cover: a page of the manuscript, with printer's marks, on a small stack. The
   site's thread passes over it (it is not above the thread) and stab-binds its spine
   through four holes; two more are left empty. On the page, the eight limbs. */
.soon { position: relative; }
/* A lamp over the desk: warm light pooled behind the page. */
.soon::before {
  content: "";
  position: absolute;
  inset: -18% -30% -14%;
  background: radial-gradient(closest-side, color-mix(in oklab, #ffcf8a 22%, transparent), transparent);
  opacity: calc(0.35 + var(--day, 1) * 0.65);
  pointer-events: none;
}
.soon-board {
  position: relative;
  aspect-ratio: 0.68;
  margin: 14px 14px 14px 0;
}
.soon-board .thread-anchor { left: 7%; }
[data-anchor="soon-exit"] { left: 12% !important; top: 112%; }
.soon-board__marks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: color-mix(in oklab, var(--ink) 40%, transparent);
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
}
.soon-board__page {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.9rem;
  padding: 8% 6% 8% 15%;
  border-radius: 1px 3px 3px 1px;
  background: var(--surface);
  box-shadow:
    inset 0 0 0 1px var(--rule),
    3px 3px 0 -1px var(--surface), 3px 3px 0 0 var(--rule),
    6px 6px 0 -1px var(--surface), 6px 6px 0 0 var(--rule),
    0 26px 44px -24px rgb(20 26 46 / 0.45);
}
/* The holes still waiting for the thread: eyelets like the thread's own. */
.soon-board__hole {
  position: absolute;
  left: 7%;
  width: 8.2px;
  height: 8.2px;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--surface), #000 55%) 0 2.1px, var(--surface) 2.6px);
  box-shadow: 0 0 0 1.5px color-mix(in oklab, var(--ink) 38%, var(--surface)), 0.6px 1px 1.5px rgb(20 26 46 / 0.25);
  opacity: 0.75;
}
.soon-board__sewn { display: none; position: absolute; left: 1%; top: 0; width: 12%; height: 100%; overflow: visible; }
.soon-board__sewn path { fill: none; stroke: var(--rubric); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.soon-board__sewn circle { fill: color-mix(in oklab, var(--surface), #000 55%); stroke: color-mix(in oklab, var(--ink) 38%, var(--surface)); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
@media (max-width: 767px) {
  .soon-board__sewn { display: block; }
  /* The lamp's glow stays on screen. */
  .soon::before { inset: -8% -4%; }
}

  position: absolute;
.shelf-item--soon .shelf-item__title { text-wrap: balance; }
/* The page is as wide as a featured cover, so the figure can be read. */
.shelf-item--secondary.shelf-item--soon .shelf-item__cover { grid-column: 1 / span 4; }
/* The eight limbs: a seated figure first, then the arcs radiating outward from its head,
   yama nearest and samādhi at the top, each name inking in beneath its arc. */
.limbs { width: 100%; overflow: visible; }
.limbs__arc {
  fill: none;
  stroke: color-mix(in oklab, var(--ink) 45%, transparent);
  stroke-width: 0.35;
  stroke-linecap: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
}
.limbs text {
  font-family: var(--font-serif);
  font-size: 5.2px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-anchor: middle;
  fill: var(--ink);
  opacity: 0;
}
.limbs__figure { opacity: 0; }
.limbs__figure circle, .limbs__figure path { fill: color-mix(in oklab, var(--ink) 55%, var(--surface)); }
.soon-board.is-drawn .limbs__figure { opacity: 1; transition: opacity 900ms var(--ease-out); }
.soon-board.is-drawn .limbs__arc { stroke-dashoffset: 0; transition: stroke-dashoffset 800ms var(--ease-in-out) calc(300ms + var(--i) * 170ms); }
.soon-board.is-drawn .limbs text { opacity: 1; transition: opacity 700ms var(--ease-out) calc(650ms + var(--i) * 170ms); }
.soon-board__caption {
  font: 500 0.625rem/1.4 var(--font-mono);
  letter-spacing: 0.12em;
  white-space: nowrap;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.soon__meanwhile {
  display: grid;
  gap: 0.4rem;
  max-width: 32rem;
  margin-top: 0.75rem;
  padding: 0.2rem 0 0.2rem 1.25rem;
  border-left: 2px solid var(--rubric);
  color: var(--ink-muted);
  font-size: 0.975rem;
}
.soon__meanwhile-label { color: var(--rubric); }
.soon__meanwhile a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.store-choice__picker select {
  font: inherit;
  letter-spacing: inherit;
  text-transform: none;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.1rem 0.2rem;
  cursor: pointer;
}
.store-choice__picker select:focus-visible { outline: 2px solid var(--rubric); outline-offset: 2px; }
/* A quieter route onward than the book's own actions. */
.quiet-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 0.5rem;
  padding-block: 0.35em;
  color: var(--ink-muted);
  font: 500 0.75rem/1.5 var(--font-mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color var(--dur-quick) linear;
}
.quiet-link:hover { color: var(--ink); }
.quiet-link .icon { transition: transform var(--dur-move) var(--ease-out); }
.quiet-link:hover .icon { transform: translateX(3px); }
.book-object { grid-column: 9 / span 4; position: relative; perspective: 1400px; }
.book {
  position: relative;
  transform-style: preserve-3d;
  transform: translateY(var(--lift, 0)) rotateY(var(--ry, -9deg)) rotateX(var(--rx, 3deg));
  transition: transform 900ms var(--ease-out);
  will-change: transform;
}
.book img {
  width: 100%;
  border-radius: 2px 5px 5px 2px;
  filter: var(--image-filter);
  /* Page block on the fore-edge plus a layered contact shadow. */
  box-shadow: 3px 0 0 -0.5px #efe9dc, 5px 1px 0 -1px #ddd5c5, 7px 1px 0 -1.5px #efe9dc, var(--cover-shadow);
}
.book::before {
  /* Spine crease and highlight. */
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7%;
  z-index: 1;
  border-radius: 2px 0 0 2px;
  background: linear-gradient(90deg, rgb(0 0 0 / 0.22), rgb(255 255 255 / 0.12) 38%, rgb(0 0 0 / 0.14) 62%, transparent);
  pointer-events: none;
}
.book__glare {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 2px 5px 5px 2px;
  background: radial-gradient(70% 55% at var(--gx, 30%) var(--gy, 20%), rgb(255 255 255 / 0.16), transparent 70%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* ---------- Look inside: the cover opens a preview ---------- */
.book-link { display: block; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a.book-link { cursor: pointer; }
a.book-link:focus-visible { outline: none; }
a.book-link:focus-visible .book img { outline: 2px solid var(--rubric); outline-offset: 6px; }
.look-inside { display: none; }
.js .look-inside {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
  margin-top: 1.75rem;
  color: var(--ink-muted);
  font: 500 0.75rem/1.5 var(--font-mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.look-inside .icon { transition: transform var(--dur-move) var(--ease-out); }
/* On a phone the label is always there; with a mouse it appears as the cover lifts. */
@media (hover: hover) and (pointer: fine) {
  .js .look-inside { opacity: 0; transform: translateY(-6px); transition: opacity var(--dur-quick) linear, transform var(--dur-move) var(--ease-out); }
  a.book-link:hover .look-inside, a.book-link:focus-visible .look-inside { opacity: 1; transform: none; }
  a.book-link:hover .look-inside .icon { transform: translateX(3px); }
  a.book-link:hover .book, a.book-link:focus-visible .book { --lift: -6px; }
}
/* A button set like a link ("Look inside" among a book's links). It needs JS to work. */
.link--button { border: 0; padding-inline: 0; cursor: pointer; }
html:not(.js) .link--button { display: none; }
/* While its preview is open, the cover on the page is the one in the reader's hands. */
.is-lifted .book, .is-lifted .look-inside { visibility: hidden; }
/* ---------- Books page: the shelf ---------- */
.shelf { padding-top: clamp(5rem, 10vw, 9rem); }
.shelf__list { display: grid; }
.shelf-item {
  --shelf-pad: clamp(4rem, 8vw, 7rem);
  --shelf-pad-top: var(--shelf-pad);
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
  row-gap: 2.5rem;
  align-items: start;
  padding-block: var(--shelf-pad-top) var(--shelf-pad);
  border-top: 1px solid var(--rule);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.shelf-item:first-child { --shelf-pad-top: 0rem; border-top: 0; }
.shelf-item > * { grid-row: 1; }
.shelf-item__cover { grid-column: 1 / span 4; }
.shelf-item__spine { grid-column: 5; align-self: stretch; position: relative; }
.shelf-item__text { grid-column: 6 / span 7; display: grid; gap: 1.25rem; justify-items: start; }
.shelf-item__title { margin-top: 0.5rem; }
.shelf-item__title a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size var(--dur-move) var(--ease-out); }
.shelf-item__title a:hover { background-size: 100% 1px; }
/* The second book sits a little quieter: a smaller cover and title. */
.shelf-item--secondary .shelf-item__cover { grid-column: 2 / span 3; }
.shelf-item__premise { max-width: var(--measure); font-size: 1.125em; }
.shelf-item__text .actions { margin-top: 0.75rem; }
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem clamp(1rem, 2vw, 2rem);
  width: 100%;
  max-width: var(--measure);
  margin-top: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.facts:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts__item { display: grid; gap: 0.35rem; align-content: start; }
.facts dt { color: var(--rubric); }
.facts dd { font-size: 1rem; line-height: 1.45; }

/* ---------- Writings ---------- */
.pillars { margin-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--rule); }
.pillar { position: relative; border-bottom: 1px solid var(--rule); }
.pillar__link {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: start;
  margin-inline: -1.25rem;
  padding: clamp(1.75rem, 3vw, 2.5rem) 1.25rem;
  text-decoration: none;
  transition: background-color var(--dur-quick) var(--ease-out);
}
.pillar__num {
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--rubric);
  font-variant-numeric: lining-nums;
}
.pillar__body { display: grid; gap: 0.7rem; transition: transform var(--dur-move) var(--ease-out); }
.pillar__title { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem); font-weight: 300; line-height: 1.1; letter-spacing: -0.015em; }
.pillar__desc { max-width: var(--measure); color: var(--ink-muted); }
.pillar__go {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 0.9rem;
  color: var(--rubric);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity var(--dur-quick) linear, transform var(--dur-move) var(--ease-out);
}
/* Only a theme with its own page responds to the pointer. */
a.pillar__link:hover, a.pillar__link:focus-visible { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
a.pillar__link:hover .pillar__body, a.pillar__link:focus-visible .pillar__body { transform: translateX(6px); }
a.pillar__link:hover .pillar__go, a.pillar__link:focus-visible .pillar__go { opacity: 1; transform: none; }

/* ---------- Essays ---------- */
.essays { padding-top: 0; }
.section-head--row {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.section-head__aside { color: var(--ink-muted); font-style: italic; }
.essay-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(1.5rem, 3vw, 3rem); }
.essay a {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  height: 100%;
  padding: 2rem 0 2.5rem;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.essay__title {
  font-size: clamp(1.4rem, 1.1rem + 0.9vw, 1.9rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size var(--dur-move) var(--ease-out);
  justify-self: start;
}
.essay a:hover .essay__title { background-size: 100% 1px; }
.essay__dek { color: var(--ink-muted); }
.essay__meta { margin-top: 0.5rem; }

/* ---------- Work: the builder's register ---------- */
.work { overflow: clip; }
.work::before {
  /* Blueprint grid, fading from the centre. */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px);
  background-size: 3rem 3rem;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 60% 55%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 60% 55%, #000, transparent 75%);
  pointer-events: none;
}
.work__grid { display: grid; gap: clamp(3rem, 6vw, 5rem); }
/* The preview: three entries, each a numbered label, one figure and a line, linking
   to its part of /work/. Set like notes, not cards. */
.work-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem clamp(1.5rem, 4vw, 4rem);
}
.work-entry a {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  height: 100%;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  transition: border-color var(--dur-quick) linear;
}
.work-entry a:hover { border-top-color: var(--rubric); }
.work-entry__label { display: flex; align-items: center; gap: 0.9em; }
.work-entry__label .icon { margin-left: auto; color: var(--rubric); transition: transform var(--dur-quick) var(--ease-out); }
.work-entry a:hover .work-entry__label .icon { transform: translateX(3px); }
.work-entry__value { font-size: clamp(2.6rem, 1.6rem + 2.4vw, 4rem); }
.work-entry__text { max-width: 22rem; color: var(--ink-muted); line-height: 1.55; }
.work .section-foot { margin-top: 0; }

/* ---------- Footer (night returns) ---------- */
.site-footer { position: relative; padding: clamp(6rem, 12vw, 11rem) 0 2rem; }
.site-footer__top {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2rem clamp(1rem, 2vw, 2rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
}
.site-footer__closing { grid-column: 1 / span 7; display: grid; gap: 1.5rem; justify-items: start; }
.site-footer__line { color: var(--ink-muted); font-size: 1.125em; }
.site-footer__closing .button { margin-top: 0.75rem; }
.site-footer__knot { grid-column: 9 / span 4; position: relative; min-height: 10rem; }
.site-footer__main {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 3rem clamp(2rem, 5vw, 6rem);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--rule);
}
.site-footer__brand { display: grid; gap: 1.1rem; align-content: start; justify-items: start; }
.site-footer__brand p { max-width: 24rem; color: var(--ink-muted); }
.site-footer__brand cite { font-style: italic; }
.social { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.6rem; }
.social__link {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--rule);
  color: var(--ink-muted);
  transition: color var(--dur-quick) linear, box-shadow var(--dur-quick) linear, transform var(--dur-move) var(--ease-out);
}
.social__link:hover { color: var(--rubric); box-shadow: inset 0 0 0 1px var(--rubric); transform: translateY(-2px); }
.brand { width: 1.05rem; height: 1.05rem; fill: currentColor; }
.footer-nav { justify-self: end; align-self: start; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 0.75rem 2.25rem; }
.footer-nav a {
  text-decoration: none;
  color: var(--ink-muted);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: color var(--dur-quick) linear, background-size var(--dur-move) var(--ease-out);
}
.footer-nav a:hover { color: var(--ink); background-size: 100% 1px; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font: 500 0.75rem/1.5 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  text-decoration: none;
  transition: color var(--dur-quick) linear;
}
.back-to-top:hover { color: var(--ink); }
.back-to-top .icon { transition: transform var(--dur-move) var(--ease-out); }
.back-to-top:hover .icon { transform: translateY(-3px); }

/* ---------- Reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- Preview: a modal flipbook ---------- */
/* site.js builds the leaves. Each leaf turns on the spine (its left edge) through
   --turn, from 0 (lying on the right) to 1 (turned over to the left), and is shaded
   as it rises and falls. Desktop shows spreads; under 768px, one page at a time. */
@property --turn { syntax: "<number>"; inherits: true; initial-value: 0; }
/* Scrolling stops while it is open; the scrollbar's gutter takes the night colour. */
:root.preview-open { overflow: hidden; background: var(--indigo); }
.preview {
  --paper: #f8f1e3;
  --page-ratio: 0.6483; /* the printed book's width over height; set per book from its cover */
  --page-h: min(calc(100svh - 10rem), calc((100vw - 8rem) / 2 / var(--page-ratio)));
  --page-w: calc(var(--page-h) * var(--page-ratio));
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--on-indigo);
  overflow: hidden;
}
.preview[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.preview::backdrop { background: transparent; }
.preview__veil {
  position: absolute;
  inset: 0;
  background: var(--indigo);
  opacity: 0;
  transition: opacity 450ms var(--ease-out);
}
.preview.is-shown .preview__veil { opacity: 1; }
.preview__bar, .preview__controls {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem var(--gutter);
  opacity: 0;
  transition: opacity 350ms linear;
}
.preview.is-shown .preview__bar, .preview.is-shown .preview__controls { opacity: 1; transition-delay: 250ms; }
.preview__title { margin-right: auto; color: var(--on-indigo); }
.preview__sub { color: var(--on-indigo-muted); }
.preview__controls { justify-content: center; gap: 1.5rem; padding-bottom: 1.25rem; }
.preview__count { min-width: 11rem; text-align: center; color: var(--on-indigo-muted); }
.preview__turn { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--on-indigo) 28%, transparent); }
.preview__turn--prev .icon { transform: scaleX(-1); }
.preview__turn:disabled { opacity: 0.3; cursor: default; }
.preview__turn:disabled:hover { background: transparent; }
.preview__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
}

.flipbook {
  position: relative;
  width: calc(var(--page-w) * 2);
  height: var(--page-h);
  perspective: calc(var(--page-w) * 5);
  touch-action: pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 600ms var(--ease-in-out);
}
/* Closed, the cover sits in the middle; open, the spread does. */
.flipbook.is-closed { transform: translateX(calc(var(--page-w) * -0.5)); }
/* One shadow under the pages that lie flat, so no page casts one across the spread. */
.flipbook::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.25), 0 30px 60px -20px rgb(0 0 0 / 0.7);
  transition: left 600ms var(--ease-in-out);
}
.flipbook.is-closed::before { left: 50%; }
.flipbook.is-single { width: var(--page-w); transform: none; }
.flipbook.is-flying { transition: transform 650ms var(--ease-out); }
.leaf {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--page-w);
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  transform: rotateY(calc(var(--turn) * -180deg));
  transition: --turn 720ms var(--ease-in-out);
  cursor: pointer;
}
.is-single .leaf { left: 0; }
.leaf.is-dragging { transition: none; }
.leaf__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--paper);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 0 3px 3px 0;
}
.leaf__face--back { transform: rotateY(180deg); border-radius: 3px 0 0 3px; }
/* One page at a time: a turned page leaves the stage instead of landing on the left. */
.is-single .leaf__face--back { visibility: hidden; }
.leaf__img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
/* The gutter: pages darken a little toward the spine. */
.leaf__face::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to right, rgb(60 40 20 / 0.16), rgb(60 40 20 / 0.04) 6%, transparent 14%);
}
.leaf__face--back::before { background: linear-gradient(to left, rgb(60 40 20 / 0.16), rgb(60 40 20 / 0.04) 6%, transparent 14%); }
.leaf__face--cover::before { background: linear-gradient(to right, rgb(0 0 0 / 0.25), rgb(255 255 255 / 0.08) 3%, transparent 8%); }
/* The turn: a page darkens as it rises off the paper and lightens as it lands. */
.leaf__face::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to left, rgb(30 20 10 / 0.42), rgb(30 20 10 / 0.12));
  opacity: calc(var(--turn) * 1.6);
}
.leaf__face--back::after {
  background: linear-gradient(to right, rgb(30 20 10 / 0.42), rgb(30 20 10 / 0.12));
  opacity: calc((1 - var(--turn)) * 1.6);
}
/* The inside of the cover: plain board. */
.leaf__face--inside { background: #efe6d4; }
/* After the last preview page: a page of our own, set like the book's. */
.page-end {
  --ink: #141a2e;
  --ink-muted: #4e5367;
  --rubric: #b23a22;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1rem;
  height: 100%;
  padding: 12%;
  text-align: center;
  color: var(--ink);
}
.page-end__label { color: var(--rubric); }
.page-end__title { font-size: clamp(1.4rem, 1rem + 1vw, 2rem); font-weight: 300; line-height: 1.1; letter-spacing: -0.01em; }
.page-end__line { color: var(--ink-muted); font-size: 0.95rem; max-width: 18rem; }
.page-end__actions { display: grid; justify-items: center; gap: 0.5rem; margin-top: 0.75rem; }

@media (max-width: 767px) {
  .preview { --page-w: min(calc(100vw - 1.5rem), calc((100svh - 8.5rem) * var(--page-ratio))); --page-h: calc(var(--page-w) / var(--page-ratio)); }
  .preview__sub { display: none; }
  .preview__controls { gap: 1rem; }
  .preview__count { min-width: 8rem; }
}

/* ---------- Subpages: shared ---------- */
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.65rem;
  font: 500 0.75rem/1.5 var(--font-mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.crumbs li + li::before { content: "/"; margin-right: 0.65rem; opacity: 0.5; }
.crumbs a { text-decoration: none; transition: color var(--dur-quick) linear; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); }
/* Book and article titles run longer than a section name. */
.hero__title--long { font-size: clamp(2.6rem, 1.2rem + 4.6vw, 6rem); line-height: 1; letter-spacing: -0.025em; }
/* At least a screen tall, so the page reaches full day before the footer's night begins. */
.page-body { padding-top: clamp(4rem, 8vw, 7rem); min-height: 100svh; }
.page-body > .container { display: grid; row-gap: clamp(3.5rem, 7vw, 6rem); }

/* An empty list: a blank ruled sheet and one plain line. */
.empty {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2rem, 4vw, 3rem);
  border-block: 1px solid var(--rule);
}
.empty__sheet {
  flex: none;
  width: 4.5rem;
  aspect-ratio: 800 / 1234;
  border-radius: 1px 3px 3px 1px;
  background:
    repeating-linear-gradient(to bottom, transparent 0 0.55rem, color-mix(in oklab, var(--ink) 12%, transparent) 0.55rem calc(0.55rem + 1px)) 0.6rem 1rem / calc(100% - 1.2rem) 55% no-repeat,
    var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.empty__text { display: grid; gap: 0.6rem; justify-items: start; }
.empty__label { color: var(--rubric); }
.empty__line { font-size: 1.125em; color: var(--ink-muted); }

/* Shown by the dev server only, where a section's content is still to come. */
.pending {
  display: grid;
  gap: 0.4rem;
  padding: 1.5rem 1.75rem;
  border: 1px dashed color-mix(in oklab, var(--ink) 30%, transparent);
  border-radius: 4px;
  color: var(--ink-muted);
}
.pending__title { font-size: 1.4rem; font-weight: 300; }

/* ---------- Book pages ---------- */
.book-head__line { color: var(--ink-muted); }
.book-detail {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
  align-items: start;
}
.book-detail__cover { grid-column: 1 / span 4; }
.book-detail__text { grid-column: 6 / span 7; display: grid; gap: clamp(2.25rem, 4vw, 3rem); }
.book-detail__back { justify-self: start; }
.book-detail__summary { max-width: var(--intro); font-size: 1.25em; line-height: 1.55; }
.book-detail__part { display: grid; gap: 1rem; width: 100%; max-width: var(--intro); }
.book-detail__part .facts { margin-top: 0; max-width: none; }
.icon--back { transform: scaleX(-1); }
a.quiet-link:hover .icon--back { transform: scaleX(-1) translateX(3px); }

/* ---------- Writings: the library ---------- */
/* Let the tracks scroll inside their columns on narrow screens. */
.library, .library__part, .rows, .row { grid-template-columns: minmax(0, 1fr); }
.library__part { display: grid; gap: 1.5rem; }
.library__label { padding-bottom: 1rem; border-bottom: 1px solid var(--rule); }
/* The label’s rule is already the list’s first line. */
/* A section label with a button at its end ("View all writings"). */
.library__label--action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.library__part > .entries { border-top: 0; }
.library__part > .entries .entry:last-child a { border-bottom: 0; padding-bottom: 0; }
/* The Writings page: a row for each format and each subject, its newest articles in a
   strip that scrolls sideways (/assets/js/rows.js adds the mouse wheel). */
.rows { display: grid; gap: clamp(3rem, 6vw, 4.5rem); }
.row { display: grid; gap: clamp(1.25rem, 2.5vw, 1.75rem); }
.row__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.25rem 2.5rem; }
.row__heading { display: grid; gap: 0.6rem; max-width: var(--intro); }
.row__title {
  display: flex;
  gap: 0.55em;
  align-items: baseline;
  font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.row__num { color: var(--rubric); font-variant-numeric: lining-nums; }
.row__desc { color: var(--ink-muted); }
.row__all { flex: none; height: 2.75rem; }
.row__track {
  --row-gap: clamp(1.25rem, 2.5vw, 2.5rem);
  --row-in-view: 3;
  --row-fade: 2rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
  padding-bottom: 1rem;
}
/* Touch screens settle on a card; a mouse wheel scrolls freely (rows.js). */
@media (pointer: coarse) { .row__track { scroll-snap-type: x mandatory; } }
.row__track:focus-visible { outline: 2px solid var(--rubric); outline-offset: 4px; }
/* A soft edge where the row has more to show. */
.row__track[data-more-end] { mask-image: linear-gradient(to right, #000 calc(100% - var(--row-fade)), transparent); }
.row__track[data-more-start] { mask-image: linear-gradient(to right, transparent, #000 var(--row-fade)); }
.row__track[data-more-start][data-more-end] { mask-image: linear-gradient(to right, transparent, #000 var(--row-fade), #000 calc(100% - var(--row-fade)), transparent); }
.row__list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--row-in-view) - 1) * var(--row-gap)) / var(--row-in-view));
  gap: var(--row-gap);
}
.row__item { scroll-snap-align: start; }
/* Arrow buttons at the row’s edges, shown while the pointer is over it (rows.js). */
.row__frame { position: relative; }
.row__step {
  position: absolute;
  z-index: 3;
  top: calc(50% - 0.5rem);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--rule), 0 4px 14px rgb(0 0 0 / 0.08);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity var(--dur-quick) linear, color var(--dur-quick) linear, box-shadow var(--dur-quick) linear;
}
.row__step--prev { left: -1.375rem; }
.row__step--next { right: -1.375rem; }
.row__step .icon { font-size: 1.05rem; }
.row__frame:hover .row__step:not(:disabled), .row__step:focus-visible { opacity: 1; }
.row__step:hover { color: var(--rubric); box-shadow: inset 0 0 0 1px currentColor, 0 4px 14px rgb(0 0 0 / 0.08); }
.row__step:focus-visible { outline: 2px solid var(--rubric); outline-offset: 2px; }
.row__step:disabled { pointer-events: none; }
/* Armed for the mouse wheel: the scrollbar darkens, to show the wheel now turns the row. */
.row__track.is-armed { scrollbar-color: var(--ink-muted) transparent; }
@media (hover: none), (pointer: coarse) { .row__step { display: none; } }
.row__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
  align-content: start;
  height: 100%;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  transition: border-color var(--dur-quick) linear;
}
.row__image { display: block; width: 100%; height: auto; aspect-ratio: 12 / 5; object-fit: cover; }
.row__card:hover { border-top-color: var(--rubric); }
.row__card:hover .card__title { background-size: 100% 1px; }
.row__card .card__meta { margin-top: 0.2rem; }
.row__empty { padding-top: 1.25rem; border-top: 1px solid var(--rule); }
/* A row without a heading sits under its section’s label, whose rule is enough. */
.row--bare .row__card { padding-top: 0; border-top: 0; }

/* An article list, set like a catalogue: details on the left, title and excerpt on the right. */
.entries { border-top: 1px solid var(--rule); }
.entry a {
  display: grid;
  grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr);
  gap: 0.75rem clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.entry__meta { display: grid; gap: 0.3rem; align-content: start; padding-top: 0.45rem; }
.entry__meta .tag { justify-self: start; }
.entry__text { display: grid; gap: 0.6rem; align-content: start; max-width: var(--intro); }
.entry__title {
  font-size: clamp(1.4rem, 1.1rem + 0.9vw, 1.9rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
  justify-self: start;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size var(--dur-move) var(--ease-out);
}
.entry a:hover .entry__title { background-size: 100% 1px; }
.entry__excerpt { color: var(--ink-muted); }
.other-ways { display: grid; gap: 0.9rem; }
.other-ways__label { color: var(--rubric); }
.other-ways ul { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; }
.other-ways a { color: var(--ink-muted); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: color var(--dur-quick) linear, background-size var(--dur-move) var(--ease-out); }
.other-ways a:hover { color: var(--ink); background-size: 100% 1px; }

/* ---------- Articles ---------- */
/* The eyebrow's format and subject link to their archives: quiet, but visibly links. */
.page-article .hero__name a,
.article-meta a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  text-decoration-color: color-mix(in oklab, currentColor 35%, transparent);
  transition: color var(--dur-quick) linear, text-decoration-color var(--dur-quick) linear;
}
.page-article .hero__name a:hover, .article-meta a:hover { color: var(--ink); text-decoration-color: currentColor; }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; color: var(--ink-muted); }
.article-meta a { color: var(--ink); }
.article-draft { display: grid; gap: 1.5rem; justify-items: start; }
.article-page { row-gap: clamp(3rem, 6vw, 5rem); }
/* A shorter masthead brings the frontispiece into view on illustrated articles. */
.page-article--featured .hero--page { min-height: 0; }
.page-article--featured .hero__foot { margin-top: clamp(1.5rem, 4vw, 3rem); }
.page-article--featured .page-body { padding-top: clamp(1.25rem, 3vw, 2.5rem); }
/* Featured image: 16:9, a little wider than the reading column. */
.article-hero { max-width: 60rem; }
.article-hero img { width: 100%; height: auto; }
.article-hero figcaption { margin-top: 0.75rem; max-width: 42.5rem; font-size: 0.875rem; color: var(--ink-muted); }
.article-hero__credit { display: block; margin-top: 0.25rem; font: 500 0.6875rem/1.5 var(--font-mono); letter-spacing: 0.09em; text-transform: uppercase; }
/* The reading column: about 70 characters of body text. */
.article-layout { display: grid; grid-template-columns: minmax(0, 42.5rem); align-items: start; }
.article-layout--toc {
  grid-template-columns: minmax(0, 42.5rem) minmax(0, 15rem);
  justify-content: space-between;
  column-gap: clamp(2rem, 5vw, 5rem);
}
.article-layout--toc .prose { grid-column: 1; grid-row: 1; }
.article-layout--toc .toc { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--header-h) + 2rem); }
.toc { display: grid; gap: 0.75rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.toc__label { color: var(--rubric); }
.toc ol { display: grid; gap: 0.55rem; }
.toc a { font-size: 0.95rem; line-height: 1.4; color: var(--ink-muted); text-decoration: none; transition: color var(--dur-quick) linear; }
.toc a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }
/* The section being read (article.js). */
.toc a[aria-current] { color: var(--ink); font-weight: 600; }

/* Reading progress: a thin line under the header while it shows, at the very top while
   it is hidden (article.js sets --read, 0 to 1). */
.read-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 49;
  height: 2px;
  pointer-events: none;
  transform: translateY(var(--header-h));
  transition: transform var(--dur-move) var(--ease-out);
}
.read-progress::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--rubric);
  transform: scaleX(var(--read, 0));
  transform-origin: 0 50%;
}
body:has(.site-header[data-state="hidden"]) .read-progress { transform: none; }
.article-back { margin-top: 0; }

/* The book card after a related article. */
.book-invite {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
  max-width: 42.5rem;
  padding-block: 1.75rem;
  border-block: 1px solid var(--rule);
}
.book-invite__cover { width: 6rem; height: auto; box-shadow: var(--cover-shadow); }
.book-invite__text { display: grid; gap: 0.5rem; justify-items: start; }
.book-invite__eyebrow { color: var(--rubric); }
.book-invite__title { font-size: 1.4rem; line-height: 1.2; }
.book-invite__line { color: var(--ink-muted); }

/* "Continue reading": up to three published articles as cards. */
.cards-section { display: grid; gap: 1.5rem; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem clamp(1.5rem, 3vw, 2.5rem); }
.card a { display: grid; gap: 0.6rem; align-content: start; height: 100%; text-decoration: none; }
.card picture { display: block; margin-bottom: 0.4rem; }
.card__img, .entry__img { width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; }
.card__eyebrow { color: var(--rubric); }
.card__title {
  font-size: clamp(1.3rem, 1.1rem + 0.5vw, 1.6rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
  justify-self: start;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size var(--dur-move) var(--ease-out);
}
.card a:hover .card__title { background-size: 100% 1px; }
.card__excerpt { color: var(--ink-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }

/* "About the writer", at the end of an article. */
.author-card {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
  max-width: 42.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}
.author-card__portrait { display: block; }
.author-card__portrait img { width: 7rem; height: auto; aspect-ratio: 4 / 5; object-fit: cover; filter: var(--image-filter); }
.author-card__text { display: grid; gap: 0.5rem; justify-items: start; }
.author-card__label { color: var(--rubric); }
.author-card__name { font-size: 1.4rem; line-height: 1.2; }
.author-card__bio { color: var(--ink-muted); }

/* Archives: sorting, filtering and pages (archive.js), shown only once useful. */
.archive { display: grid; gap: 1.75rem; }
.archive [hidden] { display: none !important; }
.archive-tools { display: flex; flex-wrap: wrap; gap: 1rem 3rem; }
.archive-tools__group, .archive-tools ul, .pager ol { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.25rem; }
.archive-tools__label { color: var(--rubric); }
.archive-tools a, .pager a {
  display: inline-block;
  padding-block: 0.35em;
  font: 500 0.75rem/1.5 var(--font-mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: color var(--dur-quick) linear, background-size var(--dur-move) var(--ease-out);
}
.archive-tools a:hover, .pager a:hover, .archive-tools a[aria-current], .pager a[aria-current] { color: var(--ink); background-size: 100% 1px; }
.entry__meta picture { display: block; margin-bottom: 0.5rem; }
/* Long-form reading. */
.prose { font-size: 1.125em; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.2em; font-size: 1.6em; font-weight: 400; line-height: 1.2; letter-spacing: -0.01em; }
.prose h3 { margin-top: 1.8em; font-size: 1.25em; font-weight: 500; line-height: 1.3; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: color-mix(in oklab, currentColor 45%, transparent); }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--rubric); }
.prose blockquote { margin: 1.6em 0; padding-left: 1.25em; border-left: 2px solid var(--rubric); color: var(--ink-muted); font-style: italic; }
.prose hr { margin: 2.5em auto; width: 4rem; border: 0; border-top: 1px solid var(--rule); }
.prose img, .prose figure { margin-block: 2em; }
.prose figcaption { margin-top: 0.6em; font-size: 0.85em; color: var(--ink-muted); }
.prose :is(.archival-figure, .article-figure) {
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}
.prose .article-figure img { display: block; width: 100%; height: auto; margin: 0; }
.prose .quote-plate {
  --ink: var(--on-indigo);
  --ink-muted: var(--on-indigo-muted);
  --rubric: var(--rubric-night);
  padding: clamp(1.5rem, 5vw, 3rem);
  background: var(--indigo-2);
  color: var(--ink);
  text-align: center;
}
.prose .quote-plate .quote-plate__mark { width: min(100%, 12rem); margin: 0 auto 1rem; }
.prose .quote-plate .verse { margin: 0; padding: 0; border: 0; }
.prose .quote-plate .verse__text { font-size: clamp(1.4rem, 4vw, 2.125rem); line-height: 1.5; }
.prose .quote-plate .verse > p:nth-child(2) { font-size: clamp(1.2rem, 3vw, 1.625rem); color: var(--ink); }
.action-comparison__events { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(0.75rem, 3vw, 1.5rem); }
.action-comparison__events strong { display: block; color: var(--ink); }
.action-comparison > p { margin-top: 0.75em; padding-top: 0.55em; border-top: 1px solid var(--rule); }
.archival-figure__mount {
  display: flex;
  justify-content: center;
  block-size: clamp(22rem, 56vw, 24rem);
  padding: clamp(0.75rem, 2vw, 1.5rem);
  border: 1px solid var(--rule);
  background: var(--surface-2);
}
.prose .archival-figure__mount img { width: auto; height: 100%; object-fit: contain; margin: 0; }
.prose code { font-family: var(--font-mono); font-size: 0.85em; }
.prose h2, .prose h3 { scroll-margin-top: calc(var(--header-h) + 1.5rem); }
/* Wide tables scroll sideways inside the column, never the page. */
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 0.95em; }
.prose th, .prose td { padding: 0.5em 0.75em; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose sup { line-height: 0; }
.prose .footnotes { margin-top: 3em; padding-top: 1.25em; border-top: 1px solid var(--rule); font-size: 0.875em; color: var(--ink-muted); }

/* Sanskrit in Devanagari (marked lang="sa" in the source, or by src/markdown/sanskrit.mjs).
   An exact match: :lang(sa) would also catch transliteration, lang="sa-Latn". */
.prose [lang="sa"] { font-style: normal; }

/* A quoted verse: the Devanagari upright in ink, the working translation beneath it,
   then its source. Other blockquotes keep the italic quotation style above. */
.prose .verse { margin: 2.2em 0; padding: 0.15em 0 0.15em 1.35em; font-style: normal; color: var(--ink); }
.prose .verse > * + * { margin-top: 0.55em; }
.prose .verse__text { font-size: 1.1em; line-height: 1.9; letter-spacing: 0.01em; }
.prose .verse > p:not(.verse__text, .verse__source) { color: var(--ink-muted); }
.prose .verse__source { margin-top: 0.8em; font-size: 0.8em; line-height: 1.5; color: var(--ink-muted); }

/* Citations: a rubric numeral, and a comma between two that sit side by side ("1, 2"). */
.prose [data-footnote-ref] {
  padding-inline: 0.12em;
  font-family: var(--font-mono);
  font-size: 0.78em;
  font-weight: 500;
  color: var(--rubric);
  text-decoration: none;
  scroll-margin-top: calc(var(--header-h) + 2rem);
}
.prose [data-footnote-ref]:hover { text-decoration: underline; }
.prose sup:has(> [data-footnote-ref]) + sup:has(> [data-footnote-ref])::before { content: ","; font-size: 0.78em; color: var(--ink-muted); }

/* References: the article's own "References" heading opens the notes; the renderer's
   "Footnotes" heading stays for screen readers only. */
.prose #references {
  margin-top: 3.5em;
  padding-top: 1.5em;
  border-top: 1px solid var(--rule);
  font: 500 0.75rem/1.5 var(--font-mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--rubric);
}
.prose #references ~ p { font-size: 0.875em; color: var(--ink-muted); }
.prose #references ~ .footnotes { margin-top: 1.5em; padding-top: 0; border-top: 0; }
.prose .footnotes ol { display: grid; gap: 0.7em; padding-left: 2em; list-style: decimal; }
.prose .footnotes li { padding-left: 0.35em; overflow-wrap: anywhere; scroll-margin-top: calc(var(--header-h) + 2rem); }
.prose .footnotes li + li { margin-top: 0; }
.prose .footnotes li::marker { font: 500 0.85em var(--font-mono); color: var(--rubric); }
.prose .footnotes li:target { margin-left: -0.5em; padding: 0.35em 0.5em 0.35em 0.85em; border-radius: 3px; background: color-mix(in oklab, var(--rubric) 9%, transparent); }
.prose .footnotes p { margin: 0; }
.prose [data-footnote-backref] { margin-left: 0.2em; color: var(--ink-muted); font-size: 0.85em; text-decoration: none; font-family: var(--font-mono); }
.prose [data-footnote-backref]:hover { color: var(--rubric); }

/* Reference and comparison tables. */
.prose table { margin-block: 1.8em; line-height: 1.5; }
.prose thead th { padding-top: 0; border-bottom: 1px solid color-mix(in oklab, var(--ink) 55%, transparent); font-weight: 600; vertical-align: bottom; }
.prose tbody tr:last-child > * { border-bottom: 0; }
.prose th:first-child, .prose td:first-child { padding-left: 0; }
.prose td :is([lang="sa"]), .prose th :is([lang="sa"]) { white-space: nowrap; }

/* Explanatory diagrams drawn inline, so they follow the light and dark themes. */
.prose .diagram { margin-block: 2.5em; }
.prose .diagram svg { display: block; width: 100%; max-width: 30rem; height: auto; margin-inline: auto; }
.prose .diagram figcaption { max-width: 30rem; margin-inline: auto; }
.diagram .d-rule { fill: none; stroke: var(--rule); }
.diagram .d-box { fill: var(--surface-2); }
.diagram .d-focus { fill: var(--surface); stroke: var(--rubric); }
.diagram .d-line { stroke: var(--ink-muted); }
.diagram .d-note { fill: var(--ink-muted); font-family: var(--font-mono); }
.diagram .d-text { fill: var(--ink); font-family: var(--font-serif); }
.diagram .d-text .d-key { fill: var(--rubric); }

/* Hidden visually, kept for screen readers (the footnotes' generated heading). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Figures ---------- */
/* A number set for display (Figure.astro, the homepage Work preview): large lining digits, with the
   approximation mark, units and connectors smaller. */
.fig {
  font-family: var(--font-serif);
  font-weight: 300;
  font-variation-settings: "opsz" 60;
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-variant-numeric: lining-nums proportional-nums;
  white-space: nowrap;
}
.fig__approx { font-size: 0.55em; color: var(--ink-muted); margin-right: 0.05em; vertical-align: 0.2em; }
.fig__unit { font-size: 0.62em; margin-left: 0.03em; }
.fig__to { font-size: 0.55em; color: var(--ink-muted); margin-inline: 0.14em; vertical-align: 0.15em; }
.fig__dash { font-size: 0.8em; color: var(--ink-muted); margin-inline: 0.04em; }

/* ---------- About: a narrative ---------- */
.narrative__part {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
  row-gap: 1.25rem;
  align-items: start;
}
.narrative__part > :first-child { grid-column: 1 / span 4; }
.narrative__part > :not(:first-child) { grid-column: 5 / span 8; }
.narrative__title { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem); font-weight: 300; line-height: 1.15; letter-spacing: -0.01em; }
.narrative__body { display: grid; gap: 1.1em; max-width: var(--intro); font-size: 1.125em; line-height: 1.65; }
.narrative__body a { text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: color-mix(in oklab, currentColor 45%, transparent); }
.narrative__body a:hover { text-decoration-color: currentColor; }
.narrative__more { margin-top: 0.4rem; }

/* About: the introduction beside an editorial portrait. The portrait keeps its 4:5
   shape, is framed by a hairline set off from the print, and holds still while the
   reader scrolls, because the thread is pinned beside it: it starts at the upper corner
   and runs down outside the frame, never across it. */
.hero--about .hero__inner {
  grid-template-columns: minmax(0, 1fr) clamp(16rem, 30vw, 26.25rem);
  column-gap: clamp(2.5rem, 6vw, 6rem);
  align-items: end;
  opacity: 1;
  transform: none;
}
.about-hero__text { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); align-content: end; }
.about-hero__title { font-size: clamp(2.75rem, 1rem + 5.4vw, 6.25rem); line-height: 1; }
.portrait { position: relative; width: 100%; justify-self: end; }
.portrait picture { display: block; }
.portrait__img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px;
  outline: 1px solid var(--rule);
  outline-offset: 0.6rem;
  box-shadow: 0 32px 64px -32px var(--night-shadow);
  /* The owner's photo: no dragging out or long-press saving (site.js blocks the menu). */
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
.hero--about .portrait [data-anchor="start"] { right: calc(var(--gutter) * -0.5); top: 1.5rem; }
.hero--about .portrait [data-anchor="portrait-side"] { right: calc(var(--gutter) * -0.5); bottom: 1.5rem; }
/* The narrative: one continuous essay, its sections divided by hairlines, with a stitch
   in the margin at each. */
.about-part { position: relative; }
.about-part + .about-part { margin-top: clamp(3rem, 6vw, 5rem); }
.about-part + .about-part .narrative__part { padding-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--rule); }
[data-anchor="part"] { right: calc(var(--gutter) * 0.5); top: 0; }
/* The footer's closing on About itself: the three parts, quietly. */
.closing-paths { display: flex; flex-wrap: wrap; gap: 0.75rem 2.25rem; }

/* ---------- 404 ---------- */
.page-404 .hero { min-height: 100svh; }
.page-404 .hero__inner { align-self: center; }
.page-404 .actions { margin-top: 1rem; }

.loose-end {
  position: absolute;
  right: 6%;
  top: 12%;
  width: min(38vw, 26rem);
  fill: none;
  stroke: var(--rubric-night);
  stroke-width: 1.5;
  stroke-linecap: round;
  overflow: visible;
}
.loose-end circle { fill: var(--rubric-night); stroke: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .shelf-item__cover { grid-column: 1 / span 5; }
  .shelf-item__spine { grid-column: 6; }
  .shelf-item__text { grid-column: 7 / span 6; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row__track { --row-in-view: 2; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  :root { --header-h: 4rem; }
  .site-nav { display: none; }
  .site-header__tools { margin-left: auto; }
  .menu-toggle { display: inline-grid; }
  .hero { min-height: max(34rem, 92svh); }
  .books__grid { row-gap: 3rem; }
  .books__text { grid-column: 1 / -1; }
  .book-object { grid-column: 2 / span 10; grid-row: 2; max-width: 20rem; justify-self: center; width: 100%; }
  .shelf-item { row-gap: 2rem; }
  .shelf-item > * { grid-row: auto; }
  .shelf-item__spine { display: none; }
  .shelf-item__cover, .shelf-item__text, .shelf-item--secondary .shelf-item__cover,
  .shelf-item--secondary.shelf-item--soon .shelf-item__cover { grid-column: 1 / -1; }
  /* The coming-soon page needs room for its figure. */
  .shelf-item--secondary.shelf-item--soon .shelf-item__cover { max-width: 20rem; }
  .shelf-item__cover { width: 100%; max-width: 14rem; }
  .hero--page [data-anchor="start"] { right: calc(var(--gutter) * 0.5); }
  .pillar__link { grid-template-columns: 2.5rem minmax(0, 1fr); gap: 1rem; }
  .pillar__go { display: none; }
  .essay-list, .work-preview { grid-template-columns: 1fr; }
  /* One card and the edge of the next. */
  .row__track { --row-in-view: 1.15; --row-fade: 1rem; }
  .formats { grid-template-columns: 1fr; }
  .book-detail__cover, .book-detail__text { grid-column: 1 / -1; }
  .book-detail__cover { max-width: 16rem; margin-bottom: 2.5rem; }
  .entry a { grid-template-columns: 1fr; }
  .entry__meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; padding-top: 0; }
  .article-layout, .article-layout--toc { grid-template-columns: minmax(0, 1fr); row-gap: 2.5rem; }
  .article-layout--toc .toc, .article-layout--toc .prose { grid-column: auto; grid-row: auto; }
  .article-layout--toc .toc { position: static; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .author-card { grid-template-columns: 5rem minmax(0, 1fr); }
  .author-card__portrait img { width: 5rem; }
  .book-invite { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .book-invite__cover { width: 4.5rem; }
  .entry__meta picture { flex-basis: 100%; max-width: 20rem; }
  .narrative__part > :first-child, .narrative__part > :not(:first-child) { grid-column: 1 / -1; }
  .hero--about .hero__inner { grid-template-columns: minmax(0, 1fr); row-gap: 3rem; }
  .portrait { justify-self: start; max-width: 26rem; }
  .portrait__img { outline-offset: 0.4rem; }
  .site-footer__closing, .site-footer__knot { grid-column: 1 / -1; }
  .site-footer__knot { min-height: 6rem; }
  .site-footer__main { grid-template-columns: 1fr; }
  .footer-nav { justify-self: start; }
  .thread-anchor--wide { display: none; }
  .thread-anchor--narrow { display: block; }
  [data-anchor="start"] { right: 14%; top: calc(var(--header-h) + 1rem); }
  [data-anchor="knot"] { left: auto; right: calc(var(--gutter) * 0.5); }
}

/* ---------- Reduced motion: everything instant ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
