/* ── fonts: self-hosted latin subsets ─────────────────────────── */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500 700; font-display: swap; src: url('/fonts/CormorantGaramond.woff2') format('woff2'); }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/AlegreyaSans-400.woff2') format('woff2'); }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/AlegreyaSans-500.woff2') format('woff2'); }

:root {
  --font-serif: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-sans: 'Alegreya Sans', 'Gill Sans', 'Segoe UI', system-ui, sans-serif;
  --carve-hi: rgba(255, 252, 244, .75);
  --carve-lo: rgba(60, 45, 25, .38);
  --carve-ink: #4a3f33;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --carve-hi: rgba(255, 245, 225, .10); --carve-lo: rgba(0, 0, 0, .8); --carve-ink: #d9cfbd; }
}
:root[data-theme="dark"] { --carve-hi: rgba(255, 245, 225, .10); --carve-lo: rgba(0, 0, 0, .8); --carve-ink: #d9cfbd; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--trav-ink);
  font: 400 1.125rem/1.5 var(--font-sans);
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100svh;
}
/* the warm light falls from the upper left across the whole slab */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(120% 90% at 8% 0%, rgba(255, 250, 235, .55), rgba(255, 250, 235, 0) 60%),
    radial-gradient(90% 70% at 100% 100%, rgba(60, 45, 25, .18), rgba(60, 45, 25, 0) 60%);
}
:root[data-theme="dark"] body::before { background: radial-gradient(120% 90% at 8% 0%, rgba(255, 240, 210, .07), transparent 60%), radial-gradient(90% 70% at 100% 100%, rgba(0,0,0,.5), transparent 60%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body::before { background: radial-gradient(120% 90% at 8% 0%, rgba(255, 240, 210, .07), transparent 60%), radial-gradient(90% 70% at 100% 100%, rgba(0,0,0,.5), transparent 60%); }
}

main {
  position: relative; z-index: 1;
  width: 100%; max-width: 600px;
  margin: auto;
  padding: 36px 16px 20px;
}

/* ── the name, carved into the surface ──────────────────────── */
h1 {
  margin: 0 0 .35rem;
  font: 600 clamp(3rem, 11vw, 5.25rem)/1 var(--font-serif);
  letter-spacing: -.012em;
  color: var(--carve-ink);
  text-shadow:
    0 1px 0 var(--carve-hi),
    0 -1px 0 var(--carve-lo),
    0 -2px 2px rgba(60, 45, 25, .12);
}
.bio {
  margin: 0 0 1.4rem;
  font-size: 1.2rem;
  color: var(--trav-ink-soft);
  text-shadow: 0 1px 0 var(--carve-hi);
}
.bio em { font-style: normal; color: var(--trav-ink); }

/* ── the stones ─────────────────────────────────────────────── */
.stones { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.stones.doors { grid-template-columns: 1fr 1fr; }
.stones .mount { width: 100%; }
.mount > .slab { display: block; }
.stones .stone {
  min-height: 66px;
  padding: 0 1.3rem 0 1.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.05;
  justify-content: space-between;
}
html, body { overflow-x: clip; }
.stone .label { flex: 1 1 auto; text-align: left; }
.stone .arrow { margin-left: 1rem; flex: none; }

/* ── footer ─────────────────────────────────────────────────── */
footer {
  margin-top: 2.25rem;
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .95rem; color: var(--trav-ink-soft);
  text-shadow: 0 1px 0 var(--carve-hi);
}
.pebble .ico { display: block; }
.pebble .ico-sun { display: none; }
:root[data-theme="dark"] .pebble .ico-moon { display: none; }
:root[data-theme="dark"] .pebble .ico-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pebble .ico-moon { display: none; }
  :root:not([data-theme="light"]) .pebble .ico-sun { display: block; }
}

/* ── mobile ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  main { padding: 40px 16px 20px; margin-top: 0; }
  h1 { margin-bottom: .3rem; }
  .bio { font-size: 1.1rem; margin-bottom: 1.75rem; }
  .stones { gap: 14px; }
  .stones.doors { grid-template-columns: 1fr; }
  .stones .stone { min-height: 60px; font-size: 1.4rem; padding: 0 1.2rem 0 1.15rem; }
  .stone .arrow { margin-left: .6rem; }
  footer { margin-top: 2.25rem; }
}
@media (max-width: 380px) {
  .stones .stone { font-size: 1.3rem; }
}

/* ── the hero stone: writing, above the bio ─────────────────── */
.hero { margin: 0 0 1.6rem; }
.hero .stone {
  min-height: 108px;
  padding: 0 2rem 0 1.9rem;
  font-size: 2.6rem;
  font-weight: 700;
  color: #f3ecdc;
  justify-content: space-between;
  border-radius: 14px 18px 13px 17px / 17px 13px 18px 14px;
}
.hero .label { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; line-height: 1; }
.hero .sub {
  font: 500 .95rem/1 var(--font-sans);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--label-inset);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .8);
}
.hero .stone:hover .sub, .hero .stone:focus-visible .sub { color: var(--label); }
.hero .arrow { font-size: 1.1em; }
@media (max-width: 640px) {
  .hero { margin: 0 0 1.6rem; }
  .hero .stone { min-height: 88px; font-size: 2.1rem; padding: 0 1.4rem 0 1.3rem; }
  .hero .sub { font-size: .8rem; }
}

/* ── inner pages ────────────────────────────────────────────── */
.page h1 { font-size: clamp(2.6rem, 9vw, 4.25rem); }
.page .lede { font-size: 1.2rem; color: var(--trav-ink-soft); margin: 0 0 2rem; max-width: 36ch; text-shadow: 0 1px 0 var(--carve-hi); }

/* ══════════════════════════════════════════════════════════════
   THE LIBRARY — everything behind a door. Stones are for going
   places; the rooms use the rest of the vocabulary: a dark rail,
   carved cards, parchment plates, chips, a search slot.
   ══════════════════════════════════════════════════════════════ */
:root {
  --rail-w: 232px;
  --plate: #e9e1cf;
  --plate-ink: #2e261c;
  --rule: rgba(60, 45, 25, .22);
}
:root[data-theme="dark"] { --plate: #d9cfbb; --rule: rgba(255, 245, 225, .14); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --plate: #d9cfbb; --rule: rgba(255, 245, 225, .14); } }

body.library { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; min-height: 100svh; }
body.library::before { z-index: 0; }

/* ── the rail: a standing slab of basalt ────────────────────── */
.rail {
  position: sticky; top: 0; align-self: start; height: 100vh; height: 100svh;
  z-index: 2;
  display: flex; flex-direction: column; gap: 1.4rem;
  padding: 28px 18px 20px 22px;
  color: var(--label);
  background-color: #1f1c19;
  background-image:
    linear-gradient(90deg, rgba(255, 240, 215, .05), rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .35)),
    url("/tex/basalt.webp");
  background-size: 100% 100%, 640px 640px;
  box-shadow: inset -1px 0 0 rgba(255, 238, 210, .10), 6px 0 18px -6px rgba(20, 14, 8, .55);
}
.rail::after { /* the fractured right edge */
  content: ""; position: absolute; top: 0; bottom: 0; right: -7px; width: 7px;
  background: url("/tex/edge.webp") 0 0 / auto 100%;
  transform: scaleX(-1); opacity: .9;
}
.rail-name { font: 600 1.55rem/1 var(--font-serif); color: #f3ecdc; text-decoration: none; letter-spacing: -.01em; text-shadow: 0 1px 1px rgba(0, 0, 0, .9); }
.rail-nav { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: 8px; }
.rail-nav a {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem .9rem; border-radius: 10px 12px 9px 11px / 11px 9px 12px 10px;
  font: 600 1.2rem/1 var(--font-serif); color: var(--label); text-decoration: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .9);
  box-shadow: inset 0 0 0 1px rgba(255, 238, 210, 0);
  transition: background-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}
.rail-nav a:hover, .rail-nav a:focus-visible { color: var(--label-bright); background: rgba(255, 238, 210, .06); outline: none; }
.rail-nav a[aria-current="page"] {
  /* the selected slab: carved in, lit rim, like ref-3 "Selected" */
  color: var(--label-bright);
  background: rgba(0, 0, 0, .35);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 238, 210, .18), 0 1px 0 rgba(255, 238, 210, .10);
}
.rail-ico { width: 1.2em; text-align: center; font-family: var(--font-sans); font-size: .85em; opacity: .85; }
.rail-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rail-home { font: 500 .95rem/1 var(--font-sans); color: var(--label-inset); text-decoration: none; letter-spacing: .02em; }
.rail-home:hover, .rail-home:focus-visible { color: var(--label-bright); }
.rail .pebble { width: 38px; height: 38px; box-shadow: inset 1.5px 1.5px 1px rgba(255, 238, 210, .3), inset -2px -2px 3px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 238, 210, .08); }

/* ── the room ───────────────────────────────────────────────── */
main.room { position: relative; z-index: 1; width: 100%; max-width: 820px; margin: 0; padding: 44px 40px 32px 48px; }
.room-head h1 { font-size: clamp(2.8rem, 6vw, 4.5rem); margin-bottom: .35rem; }
.room-head .lede { max-width: 48ch; margin-bottom: 1.6rem; }
.room footer { margin-top: 3rem; }

/* ── tools: the search slot and the chips ───────────────────── */
.tools { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin: 0 0 1.4rem; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search input {
  width: 100%; box-sizing: border-box;
  padding: .7rem 1rem .7rem 2.6rem;
  font: 400 1.05rem/1.2 var(--font-sans); color: var(--trav-ink);
  background: var(--recess);
  background-image: url("/tex/limestone.webp"); background-size: 640px 640px; background-blend-mode: multiply;
  border: 0; border-radius: 999px;
  box-shadow: inset 0 3px 7px rgba(60, 45, 25, .38), inset 2px 2px 3px rgba(60, 45, 25, .28), inset -1px -1px 0 rgba(255, 252, 244, .65), 0 1px 0 rgba(255, 252, 244, .55);
}
.search input::placeholder { color: var(--trav-ink-soft); }
.search input:focus { outline: 2px solid var(--trav-ink); outline-offset: 3px; }
.search .glass { position: absolute; left: 1rem; top: 50%; width: 13px; height: 13px; margin-top: -9px; border: 2px solid var(--trav-ink-soft); border-radius: 50%; }
.search .glass::after { content: ""; position: absolute; width: 2px; height: 7px; background: var(--trav-ink-soft); right: -5px; bottom: -6px; transform: rotate(-45deg); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: 500 .95rem/1 var(--font-serif); color: var(--plate-ink);
  padding: .55rem .95rem; border: 0; cursor: pointer;
  border-radius: 9px 11px 8px 10px / 10px 8px 11px 9px;
  background-color: #d8cdb6;
  background-image: linear-gradient(135deg, rgba(255, 255, 245, .35), rgba(0, 0, 0, 0) 55%, rgba(60, 45, 25, .18)), url("/tex/limestone.webp");
  background-size: 100% 100%, 640px 640px;
  box-shadow: inset 1px 1px 0 rgba(255, 252, 244, .8), inset -2px -2px 2px rgba(60, 45, 25, .3), 0 1px 0 rgba(12, 10, 7, .5), 2px 3px 5px -2px rgba(30, 20, 10, .45);
}
.chip[aria-pressed="true"] {
  color: var(--label-bright);
  background-color: #1f1c19;
  background-image: linear-gradient(135deg, rgba(255, 240, 215, .14), rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .4)), url("/tex/basalt.webp");
  box-shadow: inset 1.5px 1.5px 1px rgba(255, 238, 210, .25), inset -2px -2px 3px rgba(0, 0, 0, .6), 0 1px 0 rgba(12, 10, 7, .9), 2px 3px 5px -2px rgba(30, 20, 10, .5);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .9);
}
.chip:focus-visible { outline: 2px solid var(--trav-ink); outline-offset: 3px; }

/* ── the shelf: carved cards ────────────────────────────────── */
.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.shelf li.featured-slot, .shelf li:first-child { grid-column: 1 / -1; }
.card {
  position: relative; display: flex; flex-direction: column; gap: .45rem;
  padding: 1.3rem 1.4rem 1.2rem;
  color: var(--plate-ink); text-decoration: none;
  border-radius: 12px 15px 11px 14px / 14px 11px 15px 12px;
  background-color: var(--plate);
  background-image: linear-gradient(135deg, rgba(255, 255, 245, .45), rgba(0, 0, 0, 0) 50%, rgba(60, 45, 25, .12)), url("/tex/limestone.webp");
  background-size: 100% 100%, 640px 640px;
  box-shadow:
    inset 0 0 0 1px rgba(60, 45, 25, .25),
    inset 2px 2px 0 rgba(255, 252, 244, .8),
    inset -3px -3px 3px rgba(60, 45, 25, .22),
    0 1px 0 rgba(12, 10, 7, .55),
    3px 6px 10px -4px rgba(30, 20, 10, .45);
  transition: transform 160ms var(--ease-heavy), box-shadow 160ms var(--ease-heavy);
}
.card::before { /* the carved inner frame */
  content: ""; position: absolute; inset: 8px; pointer-events: none;
  border-radius: 8px 10px 7px 9px / 9px 7px 10px 8px;
  box-shadow: inset 0 1px 0 rgba(60, 45, 25, .25), inset 0 -1px 0 rgba(255, 252, 244, .7), inset 1px 0 0 rgba(60, 45, 25, .12), inset -1px 0 0 rgba(255, 252, 244, .5);
}
.card:hover, .card:focus-visible { transform: translateY(-2px); outline: none;
  box-shadow: inset 0 0 0 1px rgba(60, 45, 25, .25), inset 2px 2px 0 rgba(255, 252, 244, .8), inset -3px -3px 3px rgba(60, 45, 25, .22), 0 2px 0 rgba(12, 10, 7, .5), 5px 10px 16px -4px rgba(30, 20, 10, .45); }
.card:focus-visible { outline: 2px solid var(--trav-ink); outline-offset: 4px; }
.card h2 { margin: 0; font: 600 1.55rem/1.1 var(--font-serif); color: var(--plate-ink); text-shadow: 0 1px 0 rgba(255, 252, 244, .6); }
.card .sum { margin: 0; font-size: 1rem; line-height: 1.45; color: #5a4d3e; }
.card .read { margin-top: .3rem; font: 500 .9rem/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: #4a3f33; }
.meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: 0; font: 500 .8rem/1 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: #6a5f50; }
.tag { padding: .25em .55em; border-radius: 4px; background: rgba(60, 45, 25, .12); color: #4a3f33; letter-spacing: .08em; }

/* the featured card is a dark slab with a parchment plate */
.card.featured {
  color: var(--label);
  background-color: #1f1c19;
  background-image: linear-gradient(135deg, rgba(255, 240, 215, .12), rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .38)), url("/tex/basalt.webp");
  box-shadow: inset 2px 2px 1px rgba(255, 238, 210, .22), inset 0 0 0 1px rgba(0, 0, 0, .5), inset -3px -3px 3px rgba(0, 0, 0, .65), 0 2px 0 rgba(12, 10, 7, .95), 4px 7px 10px -4px rgba(30, 20, 10, .55);
  padding: 1.5rem 1.6rem 1.4rem;
}
.card.featured::before { box-shadow: inset 0 1px 0 rgba(255, 238, 210, .12), inset 0 -1px 0 rgba(0, 0, 0, .6); }
.card.featured .meta { color: var(--label-inset); }
.card.featured .tag { background: rgba(255, 238, 210, .14); color: var(--label); }
.card.featured h2 { color: var(--label-bright); font-size: 2rem; text-shadow: 0 1px 1px rgba(0, 0, 0, .9); }
.card.featured .sum { color: var(--plate-ink); background: var(--plate); padding: .7rem .9rem; border-radius: 6px; margin-top: .4rem;
  box-shadow: inset 0 1px 0 rgba(255, 252, 244, .9), inset 0 -1px 0 rgba(60, 45, 25, .25), 0 1px 2px rgba(0, 0, 0, .5); }
.card.featured .read { color: var(--label); }
.empty { color: var(--trav-ink-soft); }
.shelf-title { font: 600 1.5rem/1.1 var(--font-serif); color: var(--carve-ink); margin: 2rem 0 .9rem; display: flex; align-items: center; gap: .6rem; text-shadow: 0 1px 0 var(--carve-hi); }

/* ── a piece ────────────────────────────────────────────────── */
.piece { max-width: 66ch; }
.piece h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin: .4rem 0 1.4rem; line-height: 1.02; }
.piece .meta { margin-bottom: .2rem; }
.prose { font-size: 1.15rem; line-height: 1.62; color: var(--trav-ink); }
.prose p { margin: 0 0 1.1em; }
.prose h2 { font: 600 1.7rem/1.15 var(--font-serif); margin: 1.8em 0 .5em; color: var(--carve-ink); text-shadow: 0 1px 0 var(--carve-hi); }
.prose blockquote { margin: 1.4em 0; padding: .2em 0 .2em 1.1em; border-left: 3px solid var(--rule); font: 500 1.35rem/1.35 var(--font-serif); color: var(--carve-ink); }
.prose blockquote p { margin: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: .25em 0; }
.prose a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: .18em; }
.kind-poem .prose { font: 500 1.45rem/1.5 var(--font-serif); }
.kind-poem .prose .verse { margin: 0 0 1.4em; }
.after { margin-top: 3rem; max-width: 66ch; }
.after .stones.doors { grid-template-columns: 1fr 1fr; }

/* ── rooms for the catalog: talks, films, book ──────────────── */
.jump-row { margin: 0 0 1.6rem; max-width: 420px; }
.reel { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.reel .card { padding: 0; gap: 0; overflow: hidden; }
.reel .thumb { aspect-ratio: 16 / 9; display: grid; place-items: center; color: var(--label); font: 500 .85rem/1 var(--font-sans); letter-spacing: .12em; text-transform: uppercase;
  background: linear-gradient(135deg, #3a332c, #1f1c19 60%, #15120e); box-shadow: inset 0 -1px 0 rgba(255, 238, 210, .12); }
.reel .plate { padding: .9rem 1rem 1rem; display: grid; gap: .3rem; }
.reel h2 { font-size: 1.2rem; }
.reel .meta { font-size: .72rem; }
.reel .card::before { display: none; }
.book { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; align-items: start; margin-bottom: 2rem; }
.cover { aspect-ratio: 2 / 3; display: grid; place-items: center; text-align: center; padding: 1rem;
  color: var(--label-bright); font: 600 1.3rem/1.15 var(--font-serif);
  background: linear-gradient(135deg, #3a332c, #1f1c19 60%, #15120e); border-radius: 4px 8px 8px 4px;
  box-shadow: inset 6px 0 8px -6px rgba(255, 238, 210, .3), inset -2px 0 0 rgba(0, 0, 0, .6), 4px 8px 14px -4px rgba(30, 20, 10, .6); }
.book .prose { font-size: 1.1rem; }

/* ── doors with a gem set in: the stone goes inside, the gem goes straight out ── */
.stones.doors li { display: block; }
.stones.doors .stone.door { font-size: 1.4rem; padding: 0 1.15rem 0 1.15rem; }
.mount.has-gem .stone.door { padding-right: 3.6rem; }
.mount.has-gem .stone.door .arrow { display: none; }
.gem { /* a small dish carved into the stone's face, the arrow engraved in it */
  position: absolute; z-index: 4; top: 50%; right: 13px; width: 32px; height: 32px; margin-top: -16px;
  border-radius: 46% 54% 50% 50% / 52% 48% 52% 48%;
  text-decoration: none; display: grid; place-items: center;
  color: #3a3024;
  background: rgba(60, 45, 25, .07);
  box-shadow:
    inset 0 2px 4px rgba(60, 45, 25, .42),
    inset 1px 1px 2px rgba(60, 45, 25, .25),
    inset 0 -1px 0 rgba(255, 252, 244, .75),
    0 1px 0 rgba(255, 252, 244, .6);
  transition: box-shadow 120ms var(--ease-heavy), background-color 120ms ease, color 120ms ease;
}
.gem::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; }
.gem-arrow { font: 600 1rem/1 var(--font-sans); transform: rotate(-45deg) translate(0, .02em); text-shadow: 0 1px 0 rgba(255, 252, 244, .8), 0 -1px 0 rgba(60, 45, 25, .18); }
.gem:hover, .gem:focus-visible { color: #1f1811; background: rgba(60, 45, 25, .11); outline: none; }
.gem:focus-visible { box-shadow: inset 0 2px 4px rgba(60, 45, 25, .42), inset 0 -1px 0 rgba(255, 252, 244, .75), 0 0 0 2px var(--trav-ink); }
.gem:active, .gem.is-pressed { background: rgba(60, 45, 25, .16); color: #6a5c48;
  box-shadow: inset 0 3px 6px rgba(60, 45, 25, .55), inset 1px 1px 2px rgba(60, 45, 25, .35), inset 0 -1px 0 rgba(255, 252, 244, .4); }
.hint { margin: .9rem 0 0; font: 400 .9rem/1.4 var(--font-sans); color: var(--trav-ink-soft); text-shadow: 0 1px 0 var(--carve-hi); opacity: .85; }

/* ── mobile: the rail becomes a stone bar across the top ────── */
@media (max-width: 760px) {
  body.library { grid-template-columns: minmax(0, 1fr); }
  .rail { position: sticky; top: 0; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 16px; }
  .rail::after { top: auto; right: 0; left: 0; bottom: -6px; width: auto; height: 6px; background-size: auto 100%; transform: scaleY(-1); }
  .rail-name { font-size: 1.25rem; margin-right: auto; }
  .rail-nav { order: 3; width: 100%; margin: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .rail-nav a { padding: .5rem .4rem; justify-content: center; font-size: 1rem; gap: .35rem; }
  .rail-ico { display: none; }
  .rail-foot { margin: 0; }
  .rail-home { display: none; }
  main.room { padding: 28px 16px 24px; }
  .shelf { grid-template-columns: 1fr; gap: 14px; }
  .reel { grid-template-columns: 1fr 1fr; gap: 12px; }
  .book { grid-template-columns: 1fr; }
  .cover { max-width: 180px; }
  .after .stones.doors { grid-template-columns: 1fr; }
  .stones.doors .stone.door { font-size: 1.35rem; }
  .gem { right: 12px; }
}

/* ══════════════════════════════════════════════════════════════
   THREE ROOMS, THREE FLAVORS
   Writing is a stream (Seth). Talks is a show (Stacked). Films is a gallery.
   ══════════════════════════════════════════════════════════════ */

/* ── the stream ─────────────────────────────────────────────── */
.stream { list-style: none; margin: 0; padding: 0; max-width: 66ch; }
.entry { padding: 1.6rem 0 1.9rem; border-top: 1px solid var(--rule); }
.entry:first-child { border-top: 0; padding-top: .4rem; }
.entry .meta { margin-bottom: .55rem; }
.entry h2 { margin: 0 0 .7rem; font: 600 2rem/1.08 var(--font-serif); }
.entry h2 a { color: var(--carve-ink); text-decoration: none; text-shadow: 0 1px 0 var(--carve-hi); }
.entry h2 a:hover, .entry h2 a:focus-visible { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: .15em; }
.entry .prose { font-size: 1.1rem; }
.entry.kind-poem .prose { font-size: 1.35rem; }
.entry .more { margin: 0; }
.entry .more a { font: 500 .9rem/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--carve-ink); text-decoration: none; }
.entry .more a:hover, .entry .more a:focus-visible { text-decoration: underline; text-underline-offset: .2em; }
.tools + .stream { margin-top: .4rem; }

/* ── the show ───────────────────────────────────────────────── */
.show-head { max-width: 760px; margin-bottom: 2rem; }
.show-head h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); line-height: 1.02; letter-spacing: -.015em; margin: 0 0 1rem; }
.show-head .lede { max-width: 60ch; margin-bottom: 1.1rem; }
.platforms { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.platforms a { font: 500 1rem/1 var(--font-sans); color: var(--trav-ink); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--rule); text-underline-offset: .22em; }
.platforms a:hover, .platforms a:focus-visible { text-decoration-color: var(--trav-ink); }
.latest { margin-bottom: 2.4rem; }
.latest > .meta { margin-bottom: .6rem; }
.ep-card {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 0;
  color: var(--label); text-decoration: none; overflow: hidden;
  border-radius: 12px 15px 11px 14px / 14px 11px 15px 12px;
  background-color: #1f1c19;
  background-image: linear-gradient(135deg, rgba(255, 240, 215, .12), rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .38)), url("/tex/basalt.webp");
  background-size: 100% 100%, 640px 640px;
  box-shadow: inset 2px 2px 1px rgba(255, 238, 210, .22), inset 0 0 0 1px rgba(0, 0, 0, .5), inset -3px -3px 3px rgba(0, 0, 0, .65), 0 2px 0 rgba(12, 10, 7, .95), 4px 7px 10px -4px rgba(30, 20, 10, .55);
  transition: transform 160ms var(--ease-heavy);
}
.ep-card:hover, .ep-card:focus-visible { transform: translateY(-2px); outline: none; }
.ep-card:focus-visible { outline: 2px solid var(--trav-ink); outline-offset: 4px; }
.ep-card .thumb { aspect-ratio: auto; min-height: 100%; display: grid; place-items: center; color: var(--label); font: 500 .9rem/1 var(--font-sans); letter-spacing: .12em;
  background: linear-gradient(135deg, #3a332c, #1f1c19 60%, #15120e); box-shadow: inset -1px 0 0 rgba(255, 238, 210, .12); }
.ep-card .plate { padding: 1.1rem 1.3rem 1.2rem; display: grid; gap: .45rem; align-content: start; }
.ep-card .meta { color: var(--label-inset); }
.ep-card h2 { margin: 0; font: 600 1.6rem/1.12 var(--font-serif); color: var(--label-bright); text-shadow: 0 1px 1px rgba(0, 0, 0, .9); }
.ep-card .sum { margin: 0; color: var(--plate-ink); background: var(--plate); padding: .6rem .8rem; border-radius: 6px; font-size: .98rem; line-height: 1.45;
  box-shadow: inset 0 1px 0 rgba(255, 252, 244, .9), inset 0 -1px 0 rgba(60, 45, 25, .25), 0 1px 2px rgba(0, 0, 0, .5); }
.ep-card .links { margin: .2rem 0 0; display: flex; gap: 1.2rem; font: 500 .9rem/1 var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--label); }
.ep-card .links span { text-decoration: underline; text-underline-offset: .2em; text-decoration-color: rgba(255, 238, 210, .35); }
.episodes .tools { margin-bottom: .4rem; }
.ep-list { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.ep-list li { border-top: 1px solid var(--rule); }
.ep-list li:last-child { border-bottom: 1px solid var(--rule); }
.ep-list a { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) auto; gap: .2rem 1rem; align-items: baseline; padding: .95rem 0; color: var(--trav-ink); text-decoration: none; }
.ep-list a:hover .ep-title, .ep-list a:focus-visible .ep-title { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: .15em; }
.ep-list .num { font: 600 1.1rem/1 var(--font-serif); color: var(--trav-ink-soft); }
.ep-list .ep-title { font: 600 1.25rem/1.2 var(--font-serif); color: var(--carve-ink); }
.ep-list .ep-meta { display: flex; gap: .9rem; font: 500 .78rem/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--trav-ink-soft); white-space: nowrap; }

@media (max-width: 760px) {
  .ep-card { grid-template-columns: 1fr; }
  .ep-card .thumb { aspect-ratio: 16 / 9; min-height: 0; }
  .ep-list a { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .ep-list .ep-meta { grid-column: 2; }
  .entry h2 { font-size: 1.7rem; }
}

/* dark surface: meta lines and tags keep their contrast */
:root[data-theme="dark"] .meta { color: var(--trav-ink-soft); }
:root[data-theme="dark"] .tag { background: rgba(255, 238, 210, .14); color: var(--trav-ink); }
:root[data-theme="dark"] .card:not(.featured) .meta, :root[data-theme="dark"] .card:not(.featured) .tag { color: #4a3f33; }
:root[data-theme="dark"] .card:not(.featured) .tag { background: rgba(60, 45, 25, .14); }
:root[data-theme="dark"] .ep-list .num, :root[data-theme="dark"] .ep-list .ep-meta { color: var(--trav-ink-soft); }
:root[data-theme="dark"] .ep-list a, :root[data-theme="dark"] .platforms a { color: var(--trav-ink); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .meta { color: var(--trav-ink-soft); }
  :root:not([data-theme="light"]) .tag { background: rgba(255, 238, 210, .14); color: var(--trav-ink); }
  :root:not([data-theme="light"]) .card:not(.featured) .meta, :root:not([data-theme="light"]) .card:not(.featured) .tag { color: #4a3f33; }
  :root:not([data-theme="light"]) .card:not(.featured) .tag { background: rgba(60, 45, 25, .14); }
  :root:not([data-theme="light"]) .ep-list .num, :root:not([data-theme="light"]) .ep-list .ep-meta { color: var(--trav-ink-soft); }
  :root:not([data-theme="light"]) .ep-list a, :root:not([data-theme="light"]) .platforms a { color: var(--trav-ink); }
}

/* ── tags and the related block: the hyperlinks nobody wants to hand-write ── */
.tags { list-style: none; margin: 1.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags a { display: inline-block; padding: .3rem .6rem; border-radius: 4px; font: 500 .8rem/1 var(--font-sans); letter-spacing: .06em; text-transform: uppercase;
  color: #4a3f33; background: rgba(60, 45, 25, .10); text-decoration: none; box-shadow: inset 0 1px 0 rgba(255, 252, 244, .6); }
.tags a:hover, .tags a:focus-visible { background: rgba(60, 45, 25, .18); }
.related { max-width: 66ch; margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.related h2 { font: 500 .8rem/1 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--trav-ink-soft); margin: 0 0 .7rem; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.related a { display: flex; align-items: baseline; gap: .7rem; color: var(--carve-ink); text-decoration: none; font: 600 1.15rem/1.25 var(--font-serif); }
.related a:hover, .related a:focus-visible { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: .15em; }
.related .rk { font: 500 .72rem/1 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--trav-ink-soft); min-width: 3.2rem; }
:root[data-theme="dark"] .tags a { color: var(--trav-ink); background: rgba(255, 238, 210, .12); box-shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tags a { color: var(--trav-ink); background: rgba(255, 238, 210, .12); box-shadow: none; } }
