/* ============================================================
   Take Care of Language — penumbra design system
   A single hand-written stylesheet. No frameworks, no external
   fonts, no external requests. Motif: vagueness — the passage
   from blur to clarity, the penumbra of borderline cases, the
   sorites heap fading grain by grain.
   ============================================================ */

:root {
  /* paper & ink */
  --paper:      #faf8f2;
  --paper-2:    #f2eee2;
  --paper-3:    #e9e2d0;
  --ink:        #211e19;
  --ink-soft:   #47413a;
  --muted:      #6e6555;   /* ~5.3:1 on --paper (AA for small text) */

  /* the single penumbral accent (a borderline gold) */
  --accent:     #7a5c2e;   /* ~6.3:1 on --paper */
  --accent-2:   #9a7b43;
  --accent-pale:#c9b384;

  --line:       rgba(34, 31, 26, 0.14);
  --line-soft:  rgba(34, 31, 26, 0.07);

  /* type — system stacks only, zero webfonts */
  --serif:   "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --display: "Baskerville", "Hoefler Text", "Iowan Old Style", "Palatino Linotype", Palatino, ui-serif, Georgia, serif;
  --mono:    ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --measure: 64ch;
  --gap:     clamp(1.2rem, 4vw, 3rem);
  --radius:  2px;

  --shadow-1: 0 1px 2px rgba(34,31,26,.05), 0 10px 34px rgba(34,31,26,.07);
  --ease-out: cubic-bezier(.2,.7,.2,1);
}

/* ---------- reset (minimal) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--paper); }
body, h1, h2, h3, h4, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- base ---------- */
body {
  font-family: var(--serif);
  font-size: clamp(1.03rem, 0.55vw + 0.93rem, 1.19rem);
  line-height: 1.78;
  color: var(--ink);
  background: transparent; /* the paper colour lives on <html> so the ambient field can sit beneath */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.14; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: clamp(2.15rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); }
h3 { font-size: 1.22rem; }
p  { max-width: var(--measure); }
p + p { margin-top: 1.05em; }

a.link, .prose a:not(.btn), .ref a, footer a {
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 1px;
  transition: color .22s ease, background-size .28s var(--ease-out), filter .3s ease;
}
a.link:hover, .prose a:not(.btn):hover, .ref a:hover, footer a:hover {
  color: var(--accent-2);
  background-size: 100% 2px;
  filter: blur(0.2px);
}
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 1px; }

em, i { font-style: italic; }
strong { font-weight: 600; }
hr { border: 0; height: 1px; background: var(--line); margin: 3rem 0; }
::selection { background: rgba(154, 123, 67, 0.24); }

/* ============================================================
   Atmosphere — ambient penumbra field, paper grain, cursor glow
   ============================================================ */

/* a slow light-field fixed behind everything; its gradients drift
   with the pointer (--mx/--my) and the scroll position (--sp),
   both eased in JS. Static and quiet when JS or motion is off. */
body::before {
  content: "";
  position: fixed; inset: -12%;
  z-index: -1; pointer-events: none;
  background:
    radial-gradient(42rem 34rem at calc(18% + var(--mx, 0px) * 0.035) calc(6% + var(--sp, 0) * 22%), rgba(154,123,67,0.10), transparent 68%),
    radial-gradient(34rem 30rem at calc(88% - var(--mx, 0px) * 0.025) calc(78% - var(--sp, 0) * 16%), rgba(34,31,26,0.055), transparent 66%),
    radial-gradient(26rem 22rem at calc(55% + var(--my, 0px) * 0.02) calc(45% + var(--sp, 0) * 10%), rgba(201,179,132,0.07), transparent 70%);
}

/* living paper grain (very subtle) */
.paper-grain {
  position: fixed; inset: 0; z-index: 50;
  pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  mix-blend-mode: multiply;
  animation: grainBreathe 7s ease-in-out infinite;
}
@keyframes grainBreathe {
  0%, 100% { opacity: 0.03; }
  50% { opacity: 0.055; }
}
@media (max-width: 720px), (prefers-reduced-motion: reduce) {
  .paper-grain { animation: none; opacity: 0.03; }
}

/* penumbra cursor: a soft pool of lamplight following the pointer,
   with a wide outer halo for depth (desktop only) */
.penumbra-cursor {
  position: fixed; left: 0; top: 0;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(154,123,67,0.26) 0%, rgba(154,123,67,0.12) 34%, transparent 70%);
  transform: translate(-50%, -50%) scale(0.92);
  pointer-events: none; z-index: 45;
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity .5s ease;
  will-change: transform;
}
.penumbra-cursor::after {
  content: ""; position: absolute; inset: -70%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(201,179,132,0.10), transparent 62%);
}
body.cursor-ready .penumbra-cursor { opacity: 1; }
@media (pointer: coarse), (max-width: 720px), (prefers-reduced-motion: reduce) {
  .penumbra-cursor { display: none; }
}

/* ---------- layout ---------- */
.wrap { width: min(100% - 2.4rem, 1140px); margin-inline: auto; }
.prose { width: min(100% - 2.4rem, 72ch); margin-inline: auto; }
.lede { font-size: 1.19em; color: var(--ink-soft); line-height: 1.68; }
.section { padding-block: clamp(3rem, 8vw, 6.5rem); }
.section--paper2 {
  background: var(--paper-2);
  box-shadow: inset 0 1px 0 var(--line-soft), inset 0 -1px 0 var(--line-soft);
}
.center { text-align: center; }

/* soft penumbral divider instead of a hard rule */
.penumbra-rule {
  height: 1px; border: 0; margin: 0;
  background: linear-gradient(90deg, transparent, var(--line) 18%, var(--line) 82%, transparent);
}

/* eyebrow / small-caps section label */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.9rem;
}
.eyebrow::before { content: "§ "; color: var(--accent-2); }

/* ---------- the sorites strip (a heap fading grain by grain) ---------- */
.sorites {
  height: 14px; width: clamp(120px, 30vw, 280px);
  background-image: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 9px);
  -webkit-mask-image: linear-gradient(90deg, #000 35%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 35%, transparent 100%);
  opacity: 0.45;
  animation: soritesShift 9s ease-in-out infinite;
}
@keyframes soritesShift {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.3; }
}
.sorites--center { margin-inline: auto; }
.sorites--accent { background-image: repeating-linear-gradient(90deg, var(--accent) 0 2px, transparent 2px 9px); opacity: 0.6; }

/* ---------- header / nav ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(1.05); backdrop-filter: blur(10px) saturate(1.05);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow .3s ease, background .3s ease;
}
.site-head.is-scrolled {
  box-shadow: 0 8px 30px rgba(34,31,26,.08);
  background: color-mix(in srgb, var(--paper) 93%, transparent);
}
.site-head__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.85rem; }
.brand { display: inline-flex; align-items: baseline; gap: 0.5ch; font-family: var(--display); font-size: 1.32rem; font-weight: 600; letter-spacing: 0.01em; text-decoration: none; color: var(--ink); }
.brand .lam { font-family: var(--mono); color: var(--accent); font-size: 1.15em; line-height: 1; filter: blur(0.6px); transition: filter .45s var(--ease-out), text-shadow .45s ease; }
.brand:hover .lam { filter: blur(0); text-shadow: 0 0 14px rgba(154,123,67,.5); }

.nav { display: flex; align-items: center; gap: clamp(0.9rem, 2vw, 1.8rem); }
.nav a {
  position: relative;
  font-size: 0.95rem; text-decoration: none; color: var(--ink-soft);
  padding-bottom: 3px;
  transition: color .2s ease, filter .3s ease;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .32s var(--ease-out);
}
.nav a:hover { color: var(--ink); filter: blur(0.2px); }
.nav a:hover::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-pale));
}

.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.4rem 0.6rem; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px 0; transition: transform .25s, opacity .2s; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 34px rgba(34,31,26,.09);
    max-height: 0; overflow: hidden; transition: max-height .34s var(--ease-out);
  }
  .nav a { width: 100%; padding: 0.9rem 1.2rem; border-bottom: 1px solid var(--line-soft); }
  .nav a::after { display: none; }
  .nav a[aria-current="page"] { border-left: 3px solid var(--accent); padding-left: calc(1.2rem - 3px); }
  .site-head.open .nav { max-height: 60vh; }
  .site-head.open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .site-head.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-head.open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* ---------- hero ---------- */
.hero { position: relative; padding-block: clamp(4.5rem, 15vh, 10rem); overflow: hidden; }
.hero__inner { max-width: 58ch; }
.hero h1 {
  margin-bottom: 1.3rem;
  font-size: clamp(2.5rem, 6.2vw, 4.3rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
}
.hero .lede { margin-bottom: 2rem; }
.hero__theme { font-family: var(--display); font-style: italic; color: var(--accent); }

/* the title resolves from blur to clarity once on load */
.blur-in { animation: blurIn 1.7s var(--ease-out) both; }
@keyframes blurIn {
  from { filter: blur(16px); opacity: 0; letter-spacing: 0.05em; }
  60%  { filter: blur(3px);  opacity: 1; }
  to   { filter: blur(0);    opacity: 1; }
}

/* a faint penumbra glow behind the hero */
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 460px; z-index: -1;
  background:
    radial-gradient(60% 70% at 30% 30%, rgba(154,123,67,0.12), transparent 70%),
    radial-gradient(40% 55% at 78% 20%, rgba(201,179,132,0.10), transparent 70%);
  pointer-events: none;
}

/* hero parallax penumbra layers */
.hero__parallax {
  position: absolute; inset: -15% -10%;
  pointer-events: none; z-index: -1;
  opacity: 0.65;
}
.hero__parallax .pen-layer {
  position: absolute;
  will-change: transform;
  transition: opacity .4s ease;
}
.hero__parallax .pen-layer--1 {
  top: 12%; left: 8%;
  width: clamp(180px, 28vw, 360px); height: clamp(180px, 28vw, 360px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(154,123,67,0.12), transparent 65%);
  filter: blur(20px);
}
.hero__parallax .pen-layer--2 {
  bottom: 5%; right: 5%;
  width: clamp(140px, 22vw, 280px); height: clamp(140px, 22vw, 280px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,31,26,0.07), transparent 60%);
  filter: blur(16px);
}
.hero__parallax .pen-layer--3 {
  top: 35%; right: 18%;
  font-family: var(--display); font-style: italic; font-size: clamp(1rem, 2vw, 1.4rem);
  color: var(--accent-2); opacity: 0.4;
  transform: rotate(-12deg);
  filter: blur(0.8px);
}

/* ---------- buttons ---------- */
.btnrow { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.5rem; }
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 0.5ch;
  font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.04em;
  padding: 0.72rem 1.15rem; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); background: var(--paper);
  transition: border-color .22s ease, background .22s ease, transform .22s var(--ease-out), box-shadow .22s ease;
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(201,179,132,0.28) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform .55s var(--ease-out);
  pointer-events: none;
}
.btn:hover { border-color: var(--accent); background: var(--paper-2); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.btn:hover::before { transform: translateX(110%); }
.btn--solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--solid:hover { background: #000; color: #fff; box-shadow: 0 8px 22px rgba(34,31,26,.28); }
.btn .arr { color: var(--accent-2); display: inline-block; transition: transform .25s var(--ease-out); }
.btn:hover .arr { transform: translateX(4px); }
.btn--solid .arr { color: var(--accent-pale); }

/* ---------- reveal: scroll-triggered entrance. JS-gated via the
   .js class on <html>, so with scripts disabled everything is
   simply visible; reduced-motion forces the settled state. ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(7px);
  transition:
    opacity .85s var(--ease-out),
    transform .85s var(--ease-out),
    filter .85s var(--ease-out);
}
html.js .reveal.is-in { opacity: 1; transform: none; filter: blur(0); }

/* ---------- card grid ---------- */
.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  position: relative;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.7rem 1.55rem;
  transition: border-color .28s ease, transform .28s var(--ease-out), box-shadow .28s ease;
}
.card::before {
  content: ""; position: absolute; top: -1px; left: -1px; right: -1px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-pale));
  transform: scaleX(0); transform-origin: left center;
  transition: transform .4s var(--ease-out);
}
.card:hover { border-color: var(--accent-pale); transform: translateY(-3px); box-shadow: var(--shadow-1); }
.card:hover::before { transform: scaleX(1); }
.card h3 { margin-bottom: 0.45rem; }
.card h3 a { text-decoration: none; }
.card .meta { font-family: var(--mono); font-size: 0.73rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.85rem; }
.card p { color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- bibliography (canon) ---------- */
.canon-group { margin-top: 3rem; }
.canon-group__head { display: flex; align-items: baseline; gap: 1.1ch; flex-wrap: wrap; margin-bottom: 0.4rem; }
.canon-group__head .tag {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1;
  color: var(--accent-pale);
}
.canon-group > p.note { color: var(--muted); font-style: italic; margin-bottom: 1.2rem; }

ol.refs, ul.refs { list-style: none; padding: 0; margin: 0; }
.ref {
  padding: 0.95rem 0 0.95rem 1.5rem; border-bottom: 1px solid var(--line-soft);
  position: relative; max-width: 80ch;
  transition: background .2s ease;
}
.ref:hover { background: linear-gradient(90deg, rgba(201,179,132,0.08), transparent 55%); }
.ref::before {
  content: ""; position: absolute; left: 0.1rem; top: 1.38rem;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-pale);
  transition: background .25s ease, box-shadow .25s ease, transform .25s var(--ease-out);
}
.ref:hover::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(154,123,67,.16); transform: scale(1.15); }
.ref .who { font-variant: small-caps; letter-spacing: 0.02em; color: var(--ink); }
.ref .title { font-style: italic; }
.ref .yr { font-family: var(--mono); font-size: 0.82em; color: var(--muted); }
.ref .sig { display: block; color: var(--ink-soft); font-size: 0.95rem; margin-top: 0.15rem; }
.ref .sep { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; }

/* ---------- margin gloss ---------- */
.glossed { position: relative; }
.gloss {
  font-size: 0.86rem; line-height: 1.55; color: var(--muted); font-style: italic;
  border-left: 2px solid var(--accent-pale); padding-left: 0.9rem; margin: 1.4rem 0;
}
@media (min-width: 1080px) {
  .gloss {
    position: absolute; right: -16.5rem; width: 14.5rem; margin: 0; border-left: 0;
    padding-left: 0; border-top: 1px solid var(--accent-pale); padding-top: 0.5rem;
  }
}

/* ---------- blockquote ---------- */
blockquote {
  position: relative;
  font-family: var(--display); font-size: 1.32rem; line-height: 1.5; font-style: italic;
  color: var(--ink);
  border-left: 3px solid var(--accent-pale);
  padding: 0.4rem 0 0.3rem 1.5rem; margin: 2.2rem 0;
}
blockquote::before {
  content: "\201C";
  position: absolute; left: 0.55rem; top: -1.7rem;
  font-family: var(--display); font-style: normal;
  font-size: 3.2rem; line-height: 1;
  color: var(--accent-pale); opacity: 0.75;
  pointer-events: none;
}
blockquote cite { display: block; font-family: var(--mono); font-style: normal; font-size: 0.77rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin-top: 0.85rem; }

/* ---------- note article (notes/*.html) ---------- */
.article-head { padding-block: clamp(3.2rem, 9vw, 5.5rem) 1.6rem; position: relative; }
.article-head .kicker { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.8rem; }
.article-head h1 { letter-spacing: -0.018em; }
.article-meta { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); margin-top: 1rem; }
.draft-flag {
  display: inline-block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--accent); background: var(--paper-2); border: 1px dashed var(--accent-pale);
  border-radius: var(--radius); padding: 0.25rem 0.6rem; margin-bottom: 1.4rem;
}
.prose h2 {
  margin-top: 2.6rem; margin-bottom: 0.65rem;
  padding-top: 0.35rem;
}
.prose h2::before {
  content: "§"; color: var(--accent-pale); font-weight: 400;
  margin-right: 0.45ch;
}
.prose h3 { margin-top: 1.9rem; margin-bottom: 0.45rem; }
.prose ul, .prose ol { max-width: var(--measure); padding-left: 1.3rem; }
.prose li { margin-top: 0.4rem; }
.prose li::marker { color: var(--accent-2); }
.footnote { font-size: 0.86rem; color: var(--muted); }

/* drop cap on the opening paragraph of a note */
.dropcap::first-letter {
  font-family: var(--display);
  font-size: 3.35em; line-height: 0.8;
  float: left;
  padding: 0.09em 0.14em 0 0;
  color: var(--accent);
  font-weight: 600;
}

/* ---------- audio player (lecture hall) ---------- */
.player {
  position: relative;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 2rem);
  box-shadow: var(--shadow-1);
}
.player::before {
  content: ""; position: absolute; top: -1px; left: 12%; right: 12%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-pale), transparent);
  opacity: 0.8; pointer-events: none;
}
.player__now { display: flex; align-items: center; gap: 1rem; }
.player__disc {
  flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255,255,255,0.5), transparent 42%),
    radial-gradient(circle at 50% 50%, var(--paper) 17%, var(--accent-pale) 18% 21%, var(--paper-3) 22%, var(--paper-3) 38%, var(--accent-pale) 39% 41%, var(--paper-3) 42% 58%, var(--accent-pale) 59%, var(--accent-2) 100%);
  box-shadow: inset 0 0 0 1px var(--line), 0 3px 10px rgba(34,31,26,.12);
}
.player.is-playing .player__disc { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.player__meta { min-width: 0; }
.player__title { font-family: var(--display); font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; }
.player__sub { font-size: 0.9rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.player__bar { margin-top: 1.15rem; }
.player__progress {
  position: relative;
  height: 6px; background: var(--paper-3); border-radius: 99px;
  cursor: pointer;
  transition: height .18s ease;
}
.player__progress:hover, .player__progress:focus-visible { height: 8px; }
.player__buf, .player__progress > .player__fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  border-radius: 99px;
}
.player__buf { width: 0%; background: rgba(154,123,67,0.18); }
.player__progress > .player__fill { width: 0%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.player__progress::after {
  content: ""; position: absolute; top: 50%; left: var(--pct, 0%);
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--accent);
  transform: translate(-50%, -50%) scale(0);
  transition: transform .18s var(--ease-out);
  box-shadow: 0 1px 4px rgba(34,31,26,.25);
  pointer-events: none;
}
.player__progress:hover::after, .player__progress:focus-visible::after { transform: translate(-50%, -50%) scale(1); }
.player__times { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); margin-top: 0.45rem; }

.player__controls { display: flex; align-items: center; flex-wrap: wrap; gap: 0.55rem; margin-top: 0.75rem; }
.pbtn {
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%;
  background: var(--paper);
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .2s ease, background .2s ease, transform .2s var(--ease-out), box-shadow .2s ease;
}
.pbtn:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 3px 10px rgba(34,31,26,.1); }
.pbtn:active { transform: translateY(0) scale(0.96); }
.pbtn--play {
  width: 54px; height: 54px;
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
.pbtn--play:hover { background: #000; box-shadow: 0 6px 16px rgba(34,31,26,.3); }
.pbtn svg { width: 18px; height: 18px; fill: currentColor; }
.pbtn--play svg { width: 20px; height: 20px; }
.pbtn--rate {
  width: auto; min-width: 46px; padding: 0 0.6rem; border-radius: 99px;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.pbtn--rate:hover { color: var(--ink); }
.player__spacer { flex: 1; }
.player__hint { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }

.playlist { list-style: none; padding: 0; margin: 1.7rem 0 0; border-top: 1px solid var(--line); }
.playlist li {
  position: relative;
  display: flex; gap: 0.9rem; align-items: baseline;
  padding: 0.85rem 0.5rem 0.8rem;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background .18s ease;
}
.playlist li::before {
  content: ""; position: absolute; left: -0.5rem; top: 0.6rem; bottom: 0.6rem; width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-pale));
  border-radius: 2px;
  transform: scaleY(0); transform-origin: top;
  transition: transform .3s var(--ease-out);
}
.playlist li:hover { background: var(--paper); }
.playlist li.active { background: var(--paper); }
.playlist li.active::before { transform: scaleY(1); }
.playlist li.active .pl-title { color: var(--accent); }
.playlist li.is-missing .pl-title { color: var(--muted); }
.playlist li.is-missing .pl-sub::after { content: " · not yet on the shelf"; font-style: italic; }

/* equaliser bars marking the live track */
.pl-eq { display: none; align-items: flex-end; gap: 2px; height: 12px; margin-left: 0.4rem; transform: translateY(1px); }
.pl-eq i {
  width: 2px; height: 100%;
  background: var(--accent);
  transform: scaleY(0.35); transform-origin: bottom;
  animation: eq 0.9s ease-in-out infinite;
  animation-play-state: paused;
}
.pl-eq i:nth-child(2) { animation-delay: 0.18s; }
.pl-eq i:nth-child(3) { animation-delay: 0.36s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }
.playlist li.active .pl-eq { display: inline-flex; }
.player.is-playing .playlist li.active .pl-eq i { animation-play-state: running; }

.pl-n { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); flex: 0 0 1.8rem; }
.playlist li.active .pl-n { color: var(--accent); }
.pl-main { flex: 1; min-width: 0; display: block; }
.pl-title { font-weight: 600; }
.pl-sub { display: block; font-size: 0.86rem; color: var(--muted); }
.pl-progress {
  display: block; height: 2px; margin-top: 0.4rem;
  background: var(--paper-3); border-radius: 99px; overflow: hidden;
  max-width: 34ch;
}
.pl-progress > span { display: block; height: 100%; width: 0%; background: var(--accent-pale); transition: width .3s linear; }
.playlist li.is-done .pl-progress > span { background: var(--accent-2); }
.pl-dur { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); margin-left: auto; flex: 0 0 auto; }

/* ---------- footer ---------- */
.site-foot {
  position: relative; overflow: hidden;
  background: var(--paper-2); border-top: 1px solid var(--line);
  padding-block: 3.2rem 2.4rem; margin-top: 4rem;
}
.site-foot::before {
  content: "\03BB"; /* a vast lambda sunk into the paper */
  position: absolute; right: -1.5rem; bottom: -5.5rem;
  font-family: var(--display); font-size: clamp(11rem, 22vw, 17rem); line-height: 1;
  color: rgba(154,123,67,0.06);
  pointer-events: none; user-select: none;
}
.site-foot .wrap { position: relative; display: grid; gap: 1.4rem; }
.foot-quote { font-family: var(--display); font-style: italic; font-size: 1.12rem; line-height: 1.55; color: var(--ink-soft); max-width: 52ch; }
.foot-row { display: flex; flex-wrap: wrap; gap: 1.4rem 2rem; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.foot-links a { font-size: 0.92rem; text-decoration: none; color: var(--ink-soft); background-image: none !important; border-bottom: 1px solid transparent; transition: color .2s ease, border-color .2s ease; }
.foot-links a:hover { border-bottom-color: var(--accent); color: var(--ink); }
.foot-fine { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); letter-spacing: 0.03em; }
.foot-mail { font-family: var(--mono); }

/* ---------- utilities ---------- */
.stack > * + * { margin-top: 1.1rem; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-2 { margin-bottom: 2rem; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; z-index: 100;
  font-family: var(--mono); font-size: 0.85rem;
}
.skip-link:focus { left: 0; }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .hero h1 { letter-spacing: -0.015em; }
  .player__controls { gap: 0.45rem; }
  .pbtn { width: 40px; height: 40px; }
  .pbtn--play { width: 50px; height: 50px; }
  .pl-progress { max-width: none; }
  blockquote { font-size: 1.18rem; }
  .canon-group__head .tag { font-size: 1.9rem; }
}

/* ---------- reduced motion: everything settles, nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .blur-in { animation: none; }
  .sorites { animation: none; }
  .player.is-playing .player__disc { animation: none; }
  .paper-grain { animation: none; }
  .penumbra-cursor { display: none; }
  .hero__parallax .pen-layer { transform: none !important; }
  .pl-eq i { animation: none; transform: scaleY(0.7); }
  .btn::before { display: none; }
  *, *::before, *::after { scroll-behavior: auto !important; }
}
