/* Self-hosted so nothing render-blocking points at another origin.
   Latin only: latin-ext was dead weight for this site. */
@font-face { font-family: 'Schibsted Grotesk'; font-style: italic; font-weight: 400 600; font-display: swap; src: url(fonts/schibsted-grotesk-italic.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/schibsted-grotesk-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Reenie Beanie'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/reenie-beanie-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Amiri'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/amiri-normal.woff2) format('woff2'); unicode-range: U+20, U+623, U+627-628, U+62d, U+62f, U+631, U+633, U+643-647, U+654; }

/* ============================================================
   sakib.page — a well-kept notebook
   paper + ink + one red biro. no framework, no build step.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  color-scheme: light;

  /* paper + ink (warm, never pure) */
  --paper:      oklch(97.4% 0.011 90);
  --paper-high: oklch(99.2% 0.006 90);
  --ink:        oklch(24% 0.014 85);
  --ink-2:      oklch(44% 0.014 85);
  --ink-3:      oklch(54% 0.016 85);   /* measured: clears AA 4.5:1 on small text */
  --line:       color-mix(in oklab, var(--ink) 11%, transparent);
  --line-soft:  color-mix(in oklab, var(--ink) 6%, transparent);

  /* the one accent: seal red (a teacher's biro) */
  --seal:       oklch(53% 0.19 30);
  --seal-soft:  color-mix(in oklab, var(--seal) 12%, transparent);

  /* selection is the only gold in the house */
  --select-bg:  oklch(90% 0.06 85);

  /* motion: three speeds, named like gears */

  /* type: one sans ramp for hierarchy, and the biro sized on its own terms.
     the pen has a much smaller x-height, so matching it to the sans by number
     would set it visibly smaller. two families, stated, instead of 25 guesses. */
  --t-xs: 0.78rem;
  --t-s: 0.84rem;
  --t-m: 0.9rem;
  --t-ml: 0.95rem;
  --t-b: 1rem;
  --t-l: 1.1rem;
  --t-xl: 1.28rem;
  --t-2xl: 1.4rem;
  --pen-s: 1.15rem;
  --pen-m: 1.35rem;
  --pen-l: 1.5rem;

  --swift:  160ms;   /* feedback */
  --settle: 340ms;   /* state change */
  --grand:  700ms;   /* entrances */
  --out:    cubic-bezier(0.19, 1, 0.22, 1);
  --nudge:  cubic-bezier(0.34, 1.36, 0.44, 1);

  /* type: a newsroom grotesk, a real biro, and the Amiria Press for dhikr */
  --sans:   "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif:  var(--sans);   /* one voice: emphasis is the same face, leaning */
  --pen:    "Reenie Beanie", "Segoe Script", cursive;
  --arabic: "Amiri", "Geeza Pro", serif;
  --mono:   ui-monospace, "SF Mono", Menlo, monospace;


  /* spacing: one ramp instead of thirty-five improvisations.
     Values under 0.4rem stay literal, they are optical nudges not rhythm. */
  --s2: 0.5rem;  --s3: 0.75rem; --s4: 1rem;   --s5: 1.25rem;
  --s6: 1.5rem;  --s7: 2rem;    --s8: 2.5rem; --s9: 3rem;  --s10: 3.5rem;

  /* layered shadow, warm not grey */
  --raised:
    0 0 0 1px color-mix(in oklab, var(--ink) 7%, transparent),
    0 1px 2px   color-mix(in oklab, var(--ink) 4%, transparent),
    0 4px 8px   color-mix(in oklab, var(--ink) 5%, transparent),
    0 12px 24px color-mix(in oklab, var(--ink) 6%, transparent),
    0 28px 56px color-mix(in oklab, var(--ink) 7%, transparent);
}

@supports (color: color(display-p3 1 1 1)) {
  :root { --seal: color(display-p3 0.72 0.23 0.15); }
}

/* after maghrib */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper:      oklch(20% 0.008 80);
    --paper-high: oklch(24% 0.009 80);
    --ink:        oklch(90% 0.012 85);
    --ink-2:      oklch(72% 0.012 85);
    --ink-3:      oklch(60% 0.012 85);   /* measured: clears AA in dark too */
    --seal:       oklch(64% 0.17 32);
    --select-bg:  oklch(38% 0.05 85);
    --grain: 0.018;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:      oklch(20% 0.008 80);
  --paper-high: oklch(24% 0.009 80);
  --ink:        oklch(90% 0.012 85);
  --ink-2:      oklch(72% 0.012 85);
  --ink-3:      oklch(60% 0.012 85);   /* measured: clears AA in dark too */
  --seal:       oklch(64% 0.17 32);
  --select-bg:  oklch(38% 0.05 85);
  --grain: 0.018;
}

/* ---------- ground ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.6;
  /* 440 is a variable-font weight, not a preset: 400 read thin on this paper,
     500 read heavy. Tracking is optical, negative here and neutral on the
     small print, where tightening only hurts. */
  font-weight: 440;
  letter-spacing: -0.004em;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: oldstyle-nums;
  min-height: 100svh;
}

/* faint paper grain, both themes */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: var(--grain, 0.028);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* rapid tapping must never zoom the page or flash a grey box */
button, a, summary, [role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* the one a11y affordance a keyboard user actually reaches for */
.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 1002;
  background: var(--paper-high);
  color: var(--ink);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  box-shadow: var(--raised);
  font-size: var(--t-s);
  transition: top var(--settle) var(--out);
}
.skip:focus { top: 0.75rem; }

/* Short things get balanced so a heading never drops one lonely word;
   prose gets pretty so paragraphs never end on a widow. */
h1, h2, h3,
.stand, .menu-note, .lede, .article-head .when,
.ledger .what, .peek, .feed-end { text-wrap: balance; }

.prose p, .article p, .beat .say, .post .body p { text-wrap: pretty; }

/* a long unbroken handle or link must never push the column sideways */
.post .body p { overflow-wrap: anywhere; }

::selection { background: var(--select-bg); color: var(--ink); }

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

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-thumb {
  background: transparent;
  border: 4px solid transparent;
  border-radius: 8px;
  background-clip: padding-box;
}
:hover::-webkit-scrollbar-thumb { background-color: color-mix(in oklab, var(--ink) 16%, transparent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* cross-page fades where supported */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation-duration: 120ms; }
::view-transition-new(root) { animation-duration: 200ms; }

/* ---------- page grid ----------
   one narrow column of ink; margins are for the pen. */
.page {
  display: grid;
  grid-template-columns:
    [full-start gutter-start] minmax(1.25rem, 1fr)
    [main-start] min(36.5rem, calc(100% - 2.5rem)) [main-end]
    minmax(1.25rem, 1fr) [gutter-end full-end];
  padding-block: clamp(3.5rem, 11vh, 7.5rem) clamp(4rem, 10vh, 7rem);
  row-gap: 0;
}
.page > * { grid-column: main; }

/* ---------- masthead ---------- */
.masthead h1 {
  font-size: var(--t-b);
  font-weight: 600;
  letter-spacing: -0.012em;
}
.masthead .updated {
  letter-spacing: 0;
  color: var(--ink-3);
  font-size: var(--t-s);
  margin-top: 0.15rem;
}

/* ---------- prose ---------- */
.prose { margin-top: 2.2rem; }
.prose p + p { margin-top: 1.05em; }

.prose em, .accent, .article em {
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.004em;
}

/* links: quiet ink, a hairline under, red on approach */
a { color: inherit; text-decoration: none; }

.u {
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, var(--ink) 30%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2.6px;
  transition: text-decoration-color var(--swift) ease, color var(--swift) ease;
}
.u:hover { text-decoration-color: var(--seal); color: color-mix(in oklab, var(--ink) 82%, var(--seal)); }

/* \FE0E is the text presentation selector: without it iOS renders this arrow
   as a blue emoji button. font-variant-emoji is the modern belt-and-braces. */
a[data-out]::after {
  content: "\2197\FE0E";
  font-variant-emoji: text;
  font-size: 0.72em;
  color: var(--ink-3);
  margin-left: 0.14em;
  display: inline-block;
  transition: transform var(--settle) var(--nudge), color var(--swift) ease;
}
a[data-out]:hover::after { transform: translate(0.1em, -0.12em); color: var(--seal); }

/* ---------- section label + ledger tables ---------- */
.section { margin-top: var(--s10); }
.section > h2 {
  letter-spacing: 0;
  font-size: var(--t-s);
  font-weight: 500;
  color: var(--ink-3);
  margin-bottom: var(--s2);
}

.ledger { list-style: none; }
.ledger li { border-top: 1px solid var(--line-soft); }
.ledger li:last-child { border-bottom: 1px solid var(--line-soft); }

.ledger a, .ledger .row {
  display: grid;
  grid-template-columns: 3.2rem 1fr auto;
  align-items: baseline;
  column-gap: var(--s4);
  padding-block: var(--s2);
}

.ledger .yr {
  letter-spacing: 0;
  color: var(--ink-3);
  font-size: var(--t-s);
  font-variant-numeric: tabular-nums;
}
.ledger .what { font-weight: 500; font-size: var(--t-ml); }
.ledger .what small {
  display: block;
  font-size: var(--t-s);
  font-weight: 440;
  color: var(--ink-2);
}
.ledger .meta {
  letter-spacing: 0;
  color: var(--ink-3);
  font-size: var(--t-s);
  text-align: right;
  transition: color var(--swift) ease;
}

/* Hovering the list makes the whole list recede and brings back only the row
   under the pointer. Years stay legible so you can still scan the dates. */
@media (hover: hover) and (pointer: fine) {
  .ledger a .what,
  .ledger a .meta { transition: opacity var(--swift) ease, color var(--swift) ease; }
  .ledger:hover a .what,
  .ledger:hover a .meta { opacity: 0.34; }
  .ledger a:hover .what,
  .ledger a:hover .meta { opacity: 1; }
  .ledger:hover a .yr { opacity: 0.55; transition: opacity var(--swift) ease; }
  .ledger a:hover .yr { opacity: 1; }
}

/* row hover: the arrow leans in */
.ledger a .what::after {
  content: "\2192";
  display: inline-block;
  margin-left: 0.45em;
  opacity: 0;
  color: var(--seal);
  transform: translateX(-0.35em);
  transition: opacity var(--swift) ease, transform var(--settle) var(--nudge);
}
.ledger a:hover .what::after { opacity: 1; transform: translateX(0); }
.ledger a:hover .meta { color: var(--ink-2); }

/* the red dot: something new lives here */
.dot {
  display: inline-block;
  font-family: var(--pen);
  font-size: var(--pen-s);
  line-height: 1;
  color: var(--seal);
  margin-left: 0.5em;
  vertical-align: 0.02em;
  transform-origin: left center;
  animation: dot-in var(--grand) var(--nudge) both;
  animation-delay: 900ms;
}
@keyframes dot-in {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* ---------- entrances: rise with the page ---------- */
.rise {
  opacity: 0;
  transform: translateY(9px);
  animation: rise var(--grand) var(--out) forwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}

html.locked { overflow: hidden; }
@keyframes rise {
  to { opacity: 1; transform: none; }
}

/* ---------- footer ---------- */
.foot {
  letter-spacing: 0;
  margin-top: 4.2rem;
  padding-top: var(--s4);
  border-top: 1px solid var(--line-soft);
  display: grid;
  /* the clock takes the slack. it changes length through the day and with
     the reader's timezone, so anything else in 1fr gets squeezed by it. */
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 0.75rem 1.15rem;
  color: var(--ink-3);
  font-size: var(--t-s);
}
.foot .clock  { grid-column: 1; grid-row: 1; min-width: 0; }

/* Bilal's actual insight: a prayer time only matters when it is nearly time
   to move. Inside half an hour the clock stops reporting and starts nudging. */
.clock.soon { color: var(--seal); }
.foot .tasbih { grid-column: 2; grid-row: 1; }
.foot .links  { grid-column: 3; grid-row: 1; justify-self: end; flex-wrap: nowrap; }
.foot .moon   { grid-column: 4; grid-row: 1; justify-self: end; }
.foot .player { grid-column: 1 / -1; grid-row: 2; }
.foot .colophon-line { grid-column: 1 / -1; grid-row: 3; }
.foot .clock { font-variant-numeric: normal; }
.foot .links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.05rem;
}
.foot .links a { white-space: nowrap; }
.foot .quiet-link { color: var(--ink-3); white-space: nowrap; }
.foot .hint {
  color: var(--ink-3);
  background: none;
  border: 0;
  padding: 0.4rem 0;
  margin: -0.4rem 0;
  font: inherit;
  cursor: pointer;
  transition: color var(--swift) ease;
}
.foot .hint:hover { color: var(--ink); }
/* a key is a key wherever it appears. prose used to mark these with the
   highlighter, which is the component for emphasis, not for hardware. */
kbd {
  font-family: var(--sans);
  font-size: 0.86em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.08rem 0.32rem;
  white-space: nowrap;
  color: var(--ink-2);
}

.foot .hint kbd {
  font-family: var(--sans);
  font-size: 0.72rem;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
  margin-left: 0.15rem;
}
.colophon-line {
  width: 100%;
  margin-top: 0.35rem;
  color: var(--ink-3);
}

/* ---------- tasbih ---------- */
.tasbih {
  display: inline-flex;
  align-items: center;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  gap: var(--s2);
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink-3);
  font: inherit;
  padding: 0.7rem 0.2rem;
  margin: -0.7rem -0.2rem;
}
.tasbih.done svg { animation: tasbih-pulse 650ms var(--out); }
@keyframes tasbih-pulse {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.22); }
  100% { transform: scale(1); }
}
.tasbih svg { display: block; overflow: visible; }
.tasbih .ring {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
}
.tasbih .fill {
  fill: none;
  stroke: var(--seal);
  stroke-width: 1.5;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset var(--settle) var(--out);
}
.tasbih .bead {
  fill: var(--ink-3);
  transition: fill var(--swift) ease, transform var(--settle) var(--nudge);
  transform-origin: center;
}
.tasbih:active .bead { transform: scale(1.45); fill: var(--seal); }
.tasbih .count {
  font-variant-numeric: normal;
  min-width: 3.4ch;
  text-align: left;
}
.tasbih .phrase {
  font-family: var(--arabic);
  font-size: var(--t-b);
  color: var(--seal);
  opacity: 0;
  transform: translateY(3px);
  transition: opacity var(--settle) ease, transform var(--settle) var(--out);
}
.tasbih.done .phrase { opacity: 1; transform: none; }

/* ---------- theme toggle: the sun sets properly ---------- */
.moon {
  background: none;
  border: 0;
  cursor: pointer;
  padding: var(--s3);
  margin: -0.7rem;
  color: var(--ink-3);
  display: inline-flex;
  border-radius: 50%;
  transition: color var(--swift) ease, transform var(--settle) var(--nudge);
}
.moon:hover { color: var(--ink); }
.moon:active { transform: scale(0.88); }
.moon svg { display: block; overflow: visible; }
.moon .core {
  fill: currentColor;
  transition: r var(--settle) var(--out);
}
.moon .ray {
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  transform-origin: 11px 11px;
  transition: transform var(--settle) var(--nudge), opacity var(--settle) ease;
}
.moon .bite {
  fill: var(--paper);
  transition: transform var(--settle) var(--out);
  transform: translate(8px, -9px);
}
.moon[aria-pressed="true"] .ray { transform: scale(0); opacity: 0; }
.moon[aria-pressed="true"] .bite { transform: translate(2.5px, -2.5px); }

/* ---------- pen: margin annotations ---------- */
.pen-note {
  font-family: var(--pen);
  font-size: var(--pen-m);
  line-height: 1.02;
  color: var(--seal);
  transform: rotate(-1.6deg);
  display: flex;
  align-items: flex-start;
  gap: 0.3rem;
}

@media (min-width: 1180px) {
  .anchored { position: relative; }
  .anchored > aside.pen-note {
    position: absolute;
    left: 100%;
    top: var(--pin, 0);
    margin-left: var(--s4);
    width: 15rem;
  }
  /* the arrow sits in the gap and points back at the paragraph */
  aside.pen-note .stroke { flex: none; margin-top: 0.35rem; }
}
@media (max-width: 1179.9px) {
  aside.pen-note {
    display: block;
    margin: 1.1rem 0 0.2rem;
    font-size: var(--pen-m);
  }
  aside.pen-note .stroke { display: none; }
}

/* the hand-drawn arrow draws itself in: shaft first, then the barbs */
.pen-note .stroke path {
  fill: none;
  stroke: var(--seal);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Only hide them if JS is actually here to bring them back. With no JS the
   notes and their arrows just render, because they carry real content. */
.js .pen-note .txt { opacity: 0; transition: opacity 420ms ease 420ms; }
.js .pen-note.drawn .txt { opacity: 1; }
.pen-note.drawn .stroke path {
  animation: draw 460ms var(--out) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- article pages ---------- */
.crumb {
  font-size: var(--t-s);
  color: var(--ink-3);
  margin-bottom: var(--s7);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.crumb .back {
  display: inline-block;
  transition: transform var(--settle) var(--nudge);
}
.crumb:hover .back { transform: translateX(-0.22em); }
.crumb:hover { color: var(--ink); }

.article-head h1 { font-size: var(--t-2xl); font-weight: 600; letter-spacing: -0.018em; }
.article-head .when {
  letter-spacing: 0; color: var(--ink-3); font-size: var(--t-s); margin-top: 0.2rem; }
.article-head .stand {
  margin-top: var(--s5);
  color: var(--ink-2);
}

.article h2 {
  font-size: var(--t-ml);
  font-weight: 600;
  margin-top: var(--s9);
  display: flex;
  align-items: center;
  gap: var(--s4);
  scroll-margin-top: var(--s8);
}
.article h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}
.article h2 .chno {
  color: var(--ink-3);
  font-weight: 440;
  font-size: var(--t-s);
  font-variant-numeric: tabular-nums;
}
.article h2 + p, .article h2 + .anchored { margin-top: var(--s4); }
.article p + p, .article p + .anchored, .article .anchored + p, .article .anchored + .anchored { margin-top: 1.05em; }

.article .highlight {
  background: linear-gradient(transparent 42%, var(--select-bg) 42% 88%, transparent 88%);
  padding-inline: 0.1em;
  margin-inline: -0.1em;
}

.article .quiet { color: var(--ink-2); }

.article .sign {
  margin-top: var(--s9);
  color: var(--ink-2);
}

/* Arriving somewhere should be confirmed. Follow a link to a section and the
   heading lights in the same gold the selection uses, then lets go. */
.article h2:target,
.section:target > h2 {
  animation: arrived 1.6s var(--out) 1;
}
@keyframes arrived {
  0%, 22% { background: var(--select-bg); box-shadow: -0.4rem 0 0 var(--select-bg), 0.4rem 0 0 var(--select-bg); }
  100%    { background: transparent; box-shadow: -0.4rem 0 0 transparent, 0.4rem 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .article h2:target, .section:target > h2 { animation: none; background: var(--select-bg); }
}

/* sticky index in the left gutter */
@media (min-width: 1180px) {
  .toc {
    grid-column: gutter-start;
    grid-row: 3 / span 40;
    justify-self: end;
    margin-right: 3.2rem;
    align-self: start;
    position: sticky;
    top: 5.5rem;
    width: 11rem;
    text-align: right;
    font-size: var(--t-s);
  }
  .toc a {
    display: block;
    padding-block: 0.18rem;
    color: var(--ink-3);
    transition: color var(--swift) ease;
  }
  .toc a:hover { color: var(--ink); }
  .toc a[aria-current] { color: var(--ink); }
  .toc a[aria-current]::after {
    content: "";
    display: inline-block;
    width: 0.32em; height: 0.32em;
    border-radius: 50%;
    background: var(--seal);
    margin-left: 0.5em;
    vertical-align: 0.14em;
  }
}
@media (max-width: 1179.9px) { .toc { display: none; } }

/* ---------- command palette ---------- */
.veil {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: color-mix(in oklab, var(--paper) 55%, transparent);
  backdrop-filter: blur(9px) saturate(1.1);
  -webkit-backdrop-filter: blur(9px) saturate(1.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--settle) ease;
  display: grid;
  justify-items: center;
  align-items: start;
  padding-top: min(18vh, 11rem);
}
.veil.open { opacity: 1; pointer-events: auto; }

.palette {
  width: min(33rem, calc(100vw - 2.5rem));
  background: var(--paper-high);
  border-radius: 14px;
  box-shadow: var(--raised);
  overflow: hidden;
  transform: translateY(8px) scale(0.985);
  transition: transform var(--settle) var(--nudge);
}
.veil.open .palette { transform: none; }

.palette input {
  width: 100%;
  border: 0;
  /* the outline was suppressed here, which left keyboard users with no idea
     where they were. the field shows its own focus line instead. */
  outline: 0;
  box-shadow: inset 0 -2px 0 -1px transparent;
  transition: box-shadow var(--swift) ease;
  background: transparent;
  font: inherit;
  font-size: var(--t-ml);
  color: var(--ink);
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--line-soft);
}
.palette input::placeholder { color: var(--ink-3); }
.palette input:focus { box-shadow: inset 0 -2px 0 -1px var(--seal); }

.palette ul {
  list-style: none;
  max-height: 17rem;
  overflow-y: auto;
  padding: var(--s2);
}
.palette li {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 0.52rem 0.68rem;
  border-radius: 9px;
  font-size: var(--t-m);
  cursor: pointer;
  color: var(--ink-2);
}
.palette li .glyph {
  width: 1.15rem;
  text-align: center;
  color: var(--ink-3);
  font-size: var(--t-m);
}
/* the drawn icons: hairline, same ink as the text glyphs they replaced */
.palette li svg.glyph {
  height: 1.05rem;
  flex: 0 0 auto;
  opacity: 0.9;
  stroke-width: 1.75;
  transition: color var(--swift) ease, opacity var(--swift) ease, transform var(--swift) var(--out);
}
.palette li .kbd {
  margin-left: auto;
  color: var(--ink-3);
  font-size: var(--t-xs);
}
.palette li[aria-selected="true"] {
  background: color-mix(in oklab, var(--ink) 5.5%, transparent);
  color: var(--ink);
}
.palette li[aria-selected="true"] .glyph { color: var(--seal); }
/* the row you are on: the icon takes the biro and leans in a hair */
.palette li[aria-selected="true"] svg.glyph {
  opacity: 1;
  transform: translateX(1px) scale(1.07);
}

/* Hover motion, in the spirit of lucide-animated (MIT) but written as CSS
   because that library is React and this site has no framework to hang it on.
   Only the icons where movement means something get it: the equaliser plays,
   the dhikr ring turns, the bowl steams, the heart beats. Everything else
   keeps the 1px lean it already had. Durations sit in the site's own gears. */
@media (prefers-reduced-motion: no-preference) {
  .palette li:hover svg.glyph,
  .palette li[aria-selected="true"] svg.glyph { animation-fill-mode: both; }

  /* vibenasheeds: the bars play, left to right */
  .palette li:hover svg[data-i="waves"] path,
  .palette li[aria-selected="true"] svg[data-i="waves"] path {
    animation: eq var(--grand) var(--out) infinite alternate;
    transform-origin: center;
  }
  .palette li:hover svg[data-i="waves"] path:nth-child(2),
  .palette li[aria-selected="true"] svg[data-i="waves"] path:nth-child(2) { animation-delay: 80ms; }
  .palette li:hover svg[data-i="waves"] path:nth-child(3),
  .palette li[aria-selected="true"] svg[data-i="waves"] path:nth-child(3) { animation-delay: 160ms; }
  .palette li:hover svg[data-i="waves"] path:nth-child(4),
  .palette li[aria-selected="true"] svg[data-i="waves"] path:nth-child(4) { animation-delay: 240ms; }
  .palette li:hover svg[data-i="waves"] path:nth-child(5),
  .palette li[aria-selected="true"] svg[data-i="waves"] path:nth-child(5) { animation-delay: 320ms; }
  @keyframes eq { from { transform: scaleY(0.55); } to { transform: scaleY(1); } }

  /* dhikry: the ring turns the way beads do */
  .palette li:hover svg[data-i="beads"] circle:first-child,
  .palette li[aria-selected="true"] svg[data-i="beads"] circle:first-child {
    animation: turn 4s linear infinite;
    transform-origin: 12px 12px;
  }
  @keyframes turn { to { transform: rotate(360deg); } }

  /* psk: steam off the bowl */
  .palette li:hover svg[data-i="bowl"] .steam,
  .palette li[aria-selected="true"] svg[data-i="bowl"] .steam {
    animation: steam 1.6s ease-in-out infinite;
  }
  .palette li:hover svg[data-i="bowl"] .steam:nth-of-type(3),
  .palette li[aria-selected="true"] svg[data-i="bowl"] .steam:nth-of-type(3) { animation-delay: 200ms; }
  .palette li:hover svg[data-i="bowl"] .steam:nth-of-type(4),
  .palette li[aria-selected="true"] svg[data-i="bowl"] .steam:nth-of-type(4) { animation-delay: 400ms; }
  @keyframes steam {
    0%   { opacity: 0.35; transform: translateY(1.5px); }
    50%  { opacity: 1;    transform: translateY(-1px); }
    100% { opacity: 0.35; transform: translateY(1.5px); }
  }

  /* minideed: one beat, not a throb */
  .palette li:hover svg[data-i="heart"],
  .palette li[aria-selected="true"] svg[data-i="heart"] {
    animation: beat 1.4s var(--out) infinite;
    transform-origin: center;
  }
  @keyframes beat {
    0%, 70%, 100% { transform: scale(1.07); }
    12%           { transform: scale(1.22); }
    26%           { transform: scale(1.07); }
  }

  /* the tasbih bead is the one thing on this site allowed to bounce */
  .palette li:hover svg[data-i="dot"] circle:last-child,
  .palette li[aria-selected="true"] svg[data-i="dot"] circle:last-child {
    animation: bead 1.1s var(--nudge) infinite;
    transform-origin: 12px 12px;
  }
  @keyframes bead { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.5); } }

  /* the moon's rays, turning slowly */
  .palette li:hover svg[data-i="moon"],
  .palette li[aria-selected="true"] svg[data-i="moon"] {
    animation: turn 9s linear infinite;
    transform-origin: center;
  }

  /* bilal: the screen wakes */
  .palette li:hover svg[data-i="tv"],
  .palette li[aria-selected="true"] svg[data-i="tv"] {
    animation: wake var(--grand) var(--out);
    transform-origin: center;
  }
  @keyframes wake { from { transform: scale(0.9); opacity: 0.5; } to { transform: scale(1.07); opacity: 1; } }

  /* draper: the bubble arrives, the way a message does */
  .palette li:hover svg[data-i="pen"],
  .palette li[aria-selected="true"] svg[data-i="pen"] {
    animation: said var(--settle) var(--out) forwards;
    transform-origin: 20% 85%;
  }
  @keyframes said {
    from { transform: scale(0.86) translateY(1.5px); }
    to   { transform: scale(1.07) translateY(0); }
  }

  /* the craft page's pencil still writes */
  .palette li:hover svg[data-i="pencil"],
  .palette li[aria-selected="true"] svg[data-i="pencil"] {
    animation: write var(--settle) var(--out) forwards;
    transform-origin: 70% 70%;
  }
  @keyframes write { to { transform: rotate(-9deg) translateX(1px) scale(1.07); } }

  /* lofi muslim: a head tilt */
  .palette li:hover svg[data-i="phones"],
  .palette li[aria-selected="true"] svg[data-i="phones"] {
    animation: tilt var(--settle) var(--out) forwards;
    transform-origin: center;
  }
  @keyframes tilt { to { transform: rotate(-7deg) scale(1.07); } }

  /* simply clo: the shirt sways on the hanger */
  .palette li:hover svg[data-i="shirt"],
  .palette li[aria-selected="true"] svg[data-i="shirt"] {
    animation: sway 1.8s ease-in-out infinite;
    transform-origin: top center;
  }
  @keyframes sway { 0%, 100% { transform: rotate(-3.5deg); } 50% { transform: rotate(3.5deg); } }

  /* ventures: the cells come up in order */
  .palette li:hover svg[data-i="grid"] rect,
  .palette li[aria-selected="true"] svg[data-i="grid"] rect {
    animation: cell var(--settle) var(--out) both;
  }
  .palette li:hover svg[data-i="grid"] rect:nth-child(2),
  .palette li[aria-selected="true"] svg[data-i="grid"] rect:nth-child(2) { animation-delay: 60ms; }
  .palette li:hover svg[data-i="grid"] rect:nth-child(3),
  .palette li[aria-selected="true"] svg[data-i="grid"] rect:nth-child(3) { animation-delay: 120ms; }
  .palette li:hover svg[data-i="grid"] rect:nth-child(4),
  .palette li[aria-selected="true"] svg[data-i="grid"] rect:nth-child(4) { animation-delay: 180ms; }
  @keyframes cell { from { opacity: 0.25; } to { opacity: 1; } }

  /* home: it lifts, the way a door opens */
  .palette li:hover svg[data-i="home"],
  .palette li[aria-selected="true"] svg[data-i="home"] {
    animation: lift var(--settle) var(--out) forwards;
  }
  @keyframes lift { to { transform: translateY(-1.5px) scale(1.07); } }
}
.palette .none {
  padding: var(--s4);
  color: var(--ink-3);
  font-family: var(--pen);
  font-size: var(--pen-m);
  transform: rotate(-1.2deg);
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 12px);
  background: var(--paper-high);
  color: var(--ink);
  font-size: var(--t-m);
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  box-shadow: var(--raised);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--settle) ease, transform var(--settle) var(--nudge);
  z-index: 1001;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- craft page demos ---------- */
.demo {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 1.2rem 1.3rem;
  margin-top: var(--s5);
  background: color-mix(in oklab, var(--paper-high) 55%, transparent);
}
.demo .label {
  font-size: var(--t-xs);
  color: var(--ink-3);
  margin-bottom: var(--s3);
}

.race { display: grid; gap: var(--s3); cursor: pointer; }
.race .lane {
  display: grid;
  grid-template-columns: 4.4rem 1fr;
  align-items: center;
  gap: var(--s4);
}
.race .lane span { font-size: var(--t-xs); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.race .track { position: relative; height: 14px; border-bottom: 1px dashed var(--line); }
.race .ball {
  position: absolute;
  top: 3px;
  left: 0;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--seal);
}
.race.go .b1 { transition: transform var(--swift) var(--out); transform: translateX(var(--tx)); }
.race.go .b2 { transition: transform var(--settle) var(--out); transform: translateX(var(--tx)); }
.race.go .b3 { transition: transform var(--grand) var(--out); transform: translateX(var(--tx)); }

.swatches { display: flex; gap: var(--s6); flex-wrap: wrap; }
.swatches figure { display: flex; align-items: center; gap: var(--s2); }
.swatches i {
  width: 1.05rem; height: 1.05rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-block;
}
.swatches figcaption { font-size: var(--t-s); color: var(--ink-2); }

.specimen { display: grid; gap: var(--s2); }
.specimen .s1 { font-weight: 600; }
.specimen .s2 { font-style: italic; font-weight: 500; font-size: var(--t-l); }
.specimen .s3 { font-family: var(--pen); font-size: var(--pen-l); color: var(--seal); transform: rotate(-1.4deg); }
.specimen .s4 { font-family: var(--arabic); font-size: var(--pen-s); }
.specimen small { color: var(--ink-3); font-size: var(--t-xs); display: block; margin-top: -0.35rem; }

.chapter-link {
  margin-top: var(--s2);
  font-size: var(--t-s);
  letter-spacing: 0;
  color: var(--ink-3);
}

/* ---------- venture pages: my voice now, my posts then ---------- */
.venture .proof {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  justify-content: start;
  gap: 0.9rem 2.4rem;
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid var(--line-soft);
}
@media (max-width: 460px) {
  .venture .proof { gap: 0.85rem 1.3rem; }
  .venture .proof b { font-size: var(--t-l); }
  .venture .proof span { font-size: var(--t-xs); }
}
.venture .proof li { display: flex; flex-direction: column; }
.venture .proof b {
  font-size: var(--t-xl);
  font-weight: 600;
  letter-spacing: -0.012em;
  font-variant-numeric: normal;
}
.venture .proof span { font-size: var(--t-s); color: var(--ink-3); margin-top: -0.1rem; }

.venture .lede {
  letter-spacing: 0;
  margin-top: var(--s8);
  color: var(--ink-3);
  font-size: var(--t-s);
}

.beat { margin-top: var(--s7); }
.beat .say + .clip { margin-top: var(--s4); }

/* ---------- a post: a row in a stream, not a card in a stack ---------- */
.post {
  display: grid;
  grid-template-columns: 2.35rem 1fr;
  column-gap: var(--s3);
  padding: 0.95rem 0 0.85rem;
  border-bottom: 1px solid var(--line-soft);
  transition: background var(--swift) ease;
}
.post:first-child { padding-top: 0.35rem; }
.post:hover { background: color-mix(in oklab, var(--ink) 2.5%, transparent); }

.post .pfp {
  width: 2.35rem; height: 2.35rem;
  border-radius: 50%;
  object-fit: cover;
  background: color-mix(in oklab, var(--ink) 8%, transparent);
}
.post .col { min-width: 0; }

.post > .col > header {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: var(--t-m);
  line-height: 1.3;
  white-space: nowrap;
}
.post .name { font-weight: 600; }
.post .handle,
.post .sep,
.post > .col > header time {
  color: var(--ink-3);
  font-size: var(--t-s);
  overflow: hidden;
  text-overflow: ellipsis;
}
.post .mark {
  margin-left: auto;
  color: var(--ink-3);
  font-size: var(--t-m);
  font-variant-emoji: text;
}
.post.li .mark { font-weight: 700; letter-spacing: -0.03em; }

.post .body { margin-top: 0.2rem; }
.post .body p {
  font-size: var(--t-m);
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-line;
}
.post .shot {
  display: block;
  width: 100%;
  height: auto;
  margin-top: var(--s2);
  border-radius: 12px;
  border: 1px solid color-mix(in oklab, var(--ink) 8%, transparent);
}

.post > .col > footer {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  margin-top: var(--s2);
  font-size: var(--t-xs);
  color: var(--ink-3);
}
.post > .col > footer .open {
  margin-left: auto;
  color: var(--ink-3);
  opacity: 0;
  transition: opacity var(--swift) ease, color var(--swift) ease;
}
.post:hover > .col > footer .open,
.post:focus-within > .col > footer .open { opacity: 1; }
.post > .col > footer .open:hover { color: var(--seal); }
.post > .col > footer .open::after {
  content: "\2197\FE0E";
  font-variant-emoji: text;
  margin-left: 0.2em;
}

/* on a venture page the spine posts sit in from the prose */
.beat .post { margin-left: 0.1rem; }

@media (max-width: 640px) {
  .post { grid-template-columns: 2.1rem 1fr; column-gap: var(--s2); }
  .post .pfp { width: 2.1rem; height: 2.1rem; }
  .post > .col > footer .open { opacity: 1; }
}

/* ---------- the menu: mains and sides ---------- */
.menu-note {
  letter-spacing: 0;
  color: var(--ink-3);
  font-size: var(--t-s);
  margin-top: var(--s2);
}
.side-list { list-style: none; margin-top: 0.3rem; }
/* the anchor inside carries the grid (see .ledger a), so this must not
   declare its own or the link lands in the 3.2rem year column */
.side-list li { border-top: 1px solid var(--line-soft); }
.side-list li:last-child { border-bottom: 1px solid var(--line-soft); }
.side-list .yr { color: var(--ink-3); font-size: var(--t-s); }
.side-list .what { font-weight: 500; font-size: var(--t-ml); }
.side-list .what small {
  display: block; font-weight: 440; font-size: var(--t-s); color: var(--ink-2);
}
.side-list .meta { color: var(--ink-3); font-size: var(--t-s); text-align: right; }

/* ---------- the beats: one quiet line, never plays on its own ---------- */
.player {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-top: 0.15rem;
  color: var(--ink-3);
  font-size: var(--t-s);
}
.player .pp {
  background: none;
  border: 0;
  cursor: pointer;
  padding: var(--s2);
  margin: -0.45rem;
  color: var(--ink-3);
  display: inline-flex;
  transition: color var(--swift) ease, transform var(--settle) var(--nudge);
  touch-action: manipulation;
}
.player .pp:hover { color: var(--ink); }
.player .pp:active { transform: scale(0.9); }
.player .tri {
  width: 0; height: 0;
  border-left: 8px solid currentColor;
  border-top: 5.5px solid transparent;
  border-bottom: 5.5px solid transparent;
  transition: border-left-color var(--swift) ease;
}
/* the triangle becomes two bars when it is running */
.player.on .tri {
  width: 8px; height: 11px;
  border: 0;
  background: linear-gradient(currentColor, currentColor) left / 3px 100% no-repeat,
              linear-gradient(currentColor, currentColor) right / 3px 100% no-repeat;
}
.player .track { transition: color var(--swift) ease; }
.player.on .track { color: var(--ink-2); }
.player .bar {
  flex: 1;
  max-width: 7rem;
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.player .bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--seal);
  transition: width 240ms linear;
}
.player .mine {
  color: var(--seal);
  font-family: var(--pen);
  font-size: var(--pen-s);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity var(--settle) ease, transform var(--settle) var(--out);
}
.player .mine.show { opacity: 1; transform: none; }

/* ---------- listen: a music project you can actually hear ---------- */
.tracks-wrap { margin-top: var(--s10); }
.tracks { list-style: none; margin-top: var(--s3); counter-reset: t; }
.tracks li { border-top: 1px solid var(--line-soft); }
.tracks li:last-child { border-bottom: 1px solid var(--line-soft); }

/* scoped on purpose: a bare .track also matched the footer player's
   label, which turned it into a grid and squashed it to five lines. */
.tracks .track {
  width: 100%;
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) 0;
  background: none; border: 0; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
  touch-action: manipulation;
  transition: opacity var(--swift) ease;
}
.tracks:hover .track { opacity: 0.45; }
.tracks .track:hover, .tracks .track.on { opacity: 1; }

.tracks .track .art {
  width: 2.6rem; height: 2.6rem; border-radius: 5px; object-fit: cover;
  background: color-mix(in oklab, var(--ink) 7%, transparent);
}
.tracks .track .no-art {
  display: block;
  background:
    linear-gradient(var(--seal), var(--seal)) center/0.5rem 0.5rem no-repeat,
    color-mix(in oklab, var(--ink) 7%, transparent);
  border-radius: 5px;
}
.tracks .track .meta { min-width: 0; }
.tracks .track .t { display: block; font-weight: 500; font-size: var(--t-ml); }
.tracks .track .n { display: block; font-size: var(--t-s); color: var(--ink-3); letter-spacing: 0; }

.tracks .track .play {
  width: 0; height: 0;
  border-left: 9px solid var(--ink-3);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transition: border-left-color var(--swift) ease;
}
.tracks .track:hover .play { border-left-color: var(--ink); }
.tracks .track.on .play {
  width: 9px; height: 12px; border: 0;
  background: linear-gradient(var(--seal), var(--seal)) left/3px 100% no-repeat,
              linear-gradient(var(--seal), var(--seal)) right/3px 100% no-repeat;
}

/* ---------- the feed: a window onto the posts, not a longer page ---------- */
.feed-wrap { margin-top: var(--s10); }
.feed {
  margin-top: var(--s4);
  max-height: min(72vh, 40rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 0.9rem 0.5rem 0;
  /* a soft hint of more below, without slicing the text at the top */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 34px), transparent 100%);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 34px), transparent 100%);
}
/* the scrollbar is a hairline that only shows while you're in the feed,
   never a chrome bar sitting on the paper */
.feed { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.feed:hover, .feed:focus-within { scrollbar-color: color-mix(in oklab, var(--ink) 16%, transparent) transparent; }
.feed::-webkit-scrollbar { width: 6px; }
.feed::-webkit-scrollbar-track { background: transparent; }
.feed::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
  transition: background var(--settle) ease;
}
.feed:hover::-webkit-scrollbar-thumb,
.feed:focus-within::-webkit-scrollbar-thumb {
  background: color-mix(in oklab, var(--ink) 15%, transparent);
}
.feed:hover::-webkit-scrollbar-thumb:hover {
  background: color-mix(in oklab, var(--ink) 26%, transparent);
}

.feed .post { margin-left: 0; max-width: 30rem; }
.feed .post + .post { margin-left: 0; margin-top: var(--s4); }

.feed-end {
  min-height: 2rem;
  padding: 1rem 0 0.4rem;
  color: var(--ink-3);
  font-size: var(--t-s);
}
.feed-more {
  display: inline-block;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font: inherit;
  font-size: var(--t-s);
  color: var(--ink-2);
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color var(--swift) ease, color var(--swift) ease;
}
.feed-more:hover { border-color: var(--seal); color: var(--ink); }

@media (max-width: 640px) {
  .feed { max-height: 68vh; padding-right: 0.4rem; }
}

/* ---------- walk between ventures ---------- */
.prevnext {
  margin-top: var(--s9);
  padding-top: var(--s4);
  border-top: 1px solid var(--line-soft);
  display: flex;
  gap: var(--s4);
}
.prevnext a {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0;
  min-width: 0;
}
.prevnext .next { margin-left: auto; text-align: right; }
.prevnext .dir { font-size: var(--t-xs); color: var(--ink-3); }
.prevnext .t {
  font-size: var(--t-m);
  font-weight: 500;
  transition: color var(--swift) ease;
}
.prevnext a:hover .t { color: var(--seal); }

/* the page follows your thumb, then settles */
.page { will-change: auto; }

/* ---------- swipe: where you're heading, and which way the page leaves ---------- */
.peek {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translate(100%, -50%);
  z-index: 900;
  pointer-events: none;
  background: var(--paper-high);
  color: var(--ink-3);
  font-size: var(--t-s);
  padding: 0.5rem 0.8rem;
  border-radius: 999px 0 0 999px;
  box-shadow: var(--raised);
  opacity: 0;
  transition: transform 220ms var(--out), opacity 180ms ease, color 160ms ease;
  max-width: 62vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.peek.left {
  right: auto; left: 0;
  transform: translate(-100%, -50%);
  border-radius: 0 999px 999px 0;
}
.peek.show { opacity: 1; transform: translate(0, -50%); }
.peek.ready { color: var(--seal); }

@media (prefers-reduced-motion: reduce) { .peek { display: none; } }

/* the page leaves in the direction you sent it */
@media (prefers-reduced-motion: no-preference) {
  :root[data-nav="next"]::view-transition-old(root) { animation: slide-out-left 200ms both; }
  :root[data-nav="next"]::view-transition-new(root) { animation: slide-in-right 260ms both; }
  :root[data-nav="prev"]::view-transition-old(root) { animation: slide-out-right 200ms both; }
  :root[data-nav="prev"]::view-transition-new(root) { animation: slide-in-left 260ms both; }
}
@keyframes slide-out-left  { to { transform: translateX(-26px); opacity: 0; } }
@keyframes slide-in-right  { from { transform: translateX(26px); opacity: 0; } }
@keyframes slide-out-right { to { transform: translateX(26px); opacity: 0; } }
@keyframes slide-in-left   { from { transform: translateX(-26px); opacity: 0; } }

/* ---------- lost page ---------- */
.lost { text-align: left; }
.lost .big {
  font-family: var(--sans);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(2.2rem, 6vw, 3rem);
  font-weight: 500;
  line-height: 1.1;
  margin-top: var(--s8);
}
.lost p + p { margin-top: var(--s4); max-width: 30rem; }
.lost aside.pen-note { margin-top: 2.2rem; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .ledger a, .ledger .row { grid-template-columns: 2.6rem 1fr auto; column-gap: var(--s3); }

  /* Two tidy rows instead of five stacked ones:
     clock + tasbih, then links + moon, with the colophon underneath. */
  .foot {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.85rem 1rem;
    margin-top: var(--s8);
  }
  /* the clock is a sentence now, so it gets its own line instead of fighting
     the tasbih for one. the three controls share the row beneath it. */
  .foot { grid-template-columns: auto 1fr auto; }
  .foot .clock  { grid-column: 1 / -1; grid-row: 1; }
  .foot .tasbih { grid-column: 1; grid-row: 2; justify-self: start; }
  .foot .links  { grid-column: 2; grid-row: 2; justify-self: center; gap: var(--s4); }
  .foot .moon   { grid-column: 3; grid-row: 2; justify-self: end; }
  .foot .player { grid-column: 1 / -1; grid-row: 3; }
  .foot .colophon-line { grid-column: 1 / -1; grid-row: 4; margin-top: 0; }
  .foot .hint { display: none; }
  .lane-wrap { margin-top: var(--s8); }
}


/* Below about 360px three controls will not share a row without the links
   breaking up. Give them their own line rather than letting them stack
   raggedly against the tasbih. */
@media (max-width: 360px) {
  .foot { grid-template-columns: 1fr auto; }
  .foot .tasbih { grid-column: 1; grid-row: 2; justify-self: start; }
  .foot .moon   { grid-column: 2; grid-row: 2; justify-self: end; }
  .foot .links  { grid-column: 1 / -1; grid-row: 3; justify-self: start; gap: var(--s4); }
  .foot .player { grid-column: 1 / -1; grid-row: 4; }
  .foot .colophon-line { grid-column: 1 / -1; grid-row: 5; }
}

/* ---------- print: paper wants the words, not the furniture ---------- */
@media print {
  :root { --paper: #fff; --ink: #111; --ink-2: #333; --ink-3: #555; }
  html[data-theme="dark"] { --paper: #fff; --ink: #111; }
  .foot, .toc, .veil, .toast, .skip, .peek, .lane-more,
  .moon, .tasbih, .player, .race, .demo { display: none !important; }
  body { background: #fff; }
  .page { max-width: none; padding: 0; }
  /* a printed link is a dead end unless it says where it went */
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.75em; color: #555; word-break: break-all; }
  .rise, .drawn { opacity: 1 !important; transform: none !important; animation: none !important; }
  .feed { max-height: none !important; overflow: visible !important; -webkit-mask-image: none !important; mask-image: none !important; }
  h1, h2, h3 { break-after: avoid; }
  .post, .beat { break-inside: avoid; }
}


/* ---------- named client proof (draper page) ---------- */
.clients { margin-top: var(--s7); }
.cl-head {
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-3);
  margin-bottom: var(--s3);
}
.clients ul { list-style: none; }
.clients li { border-top: 1px solid var(--line-soft); padding: var(--s4) 0; }
.clients li:last-of-type { border-bottom: 1px solid var(--line-soft); }
.cl-said { font-style: italic; color: var(--ink); text-wrap: pretty; }
.cl-who {
  margin-top: var(--s2);
  font-size: var(--t-s);
  color: var(--ink-3);
  letter-spacing: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s3);
  align-items: baseline;
}
/* the outcome is the point, so it keeps the ink */
/* the outcome gets its own line so a wrap can never strand a separator */
.cl-win {
  display: block;
  width: 100%;
  margin-top: 0.15rem;
  color: var(--ink-2);
  font-variant-numeric: normal;
}
.cl-at::before { content: "\00b7"; margin-right: var(--s3); color: var(--line); }
.cl-ask { margin-top: var(--s4); font-size: var(--t-m); color: var(--ink-2); }
