/*
  Please Don’t Look at Me (But Also Please Do)
  Literary reading interface, static and portable.
*/

:root {
  --cover-red: #A4061A;
  --cover-red-bright: #C32128;
  --cover-yellow: #E2B11A;
  --cover-yellow-bright: #EDC11D;
  --cover-cream: #E7D5B5;
  --dark-ink: #21190A;
  --bg: #F4F0E7;
  --surface: #EEE7DA;
  --surface-raised: #F8F4EC;
  --text: #21190A;
  --text-secondary: #6B5E53;
  --border: rgba(33, 25, 10, 0.18);
  --accent-primary: #A4061A;
  --accent-primary-hover: #C32128;
  --accent-secondary: #E2B11A;
  --link-small: #A4061A;
  --link-small-hover: #C32128;
  --paper: var(--bg);
  --paper-raised: var(--surface-raised);
  --paper-wash: rgba(248, 244, 236, 0.76);
  --ink: var(--text);
  --ink-soft: var(--text-secondary);
  --muted: var(--text-secondary);
  --red: var(--accent-primary);
  --red-soft: var(--accent-primary-hover);
  --yellow: var(--accent-secondary);
  --rule: var(--border);
  --shadow: rgba(61, 28, 15, 0.18);
  --focus: var(--cover-red-bright);
  --bag-icon: #4B2D1B;
  --bag-body: #B98A49;
  --bag-fold: #6F3D20;
  --bag-eye: #1A090B;
  --bag-highlight: #F8F4EC;
  --display-font: Baskerville, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --body-font: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --ui-font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #181315;
  --surface: #211A1C;
  --surface-raised: #292123;
  --text: #F1E7D8;
  --text-secondary: #B9AA99;
  --border: rgba(241, 229, 210, 0.14);
  --accent-primary: #E2B11A;
  --accent-primary-hover: #EDC11D;
  --accent-secondary: #C32128;
  --link-small: #E9DCC8;
  --link-small-hover: #E2B11A;
  --paper: var(--bg);
  --paper-raised: var(--surface-raised);
  --paper-wash: rgba(33, 26, 28, 0.86);
  --ink: var(--text);
  --ink-soft: var(--text-secondary);
  --muted: var(--text-secondary);
  --red: var(--accent-secondary);
  --red-soft: var(--cover-red-bright);
  --yellow: var(--accent-primary);
  --rule: var(--border);
  --shadow: rgba(0, 0, 0, 0.48);
  --focus: var(--cover-yellow-bright);
  --bag-icon: var(--cover-cream);
  --bag-body: #D2AA67;
  --bag-fold: #805022;
  --bag-eye: #1A090B;
  --bag-highlight: #F1E5D2;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  margin: 0;
  position: relative;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body-font);
  line-height: 1.5;
  isolation: isolate;
}

body::before,
body::after {
  content: none;
  display: none;
}

img,
svg,
iframe { max-width: 100%; }
img { height: auto; }
a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--accent-primary) 72%, transparent);
  text-underline-offset: 0.22em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}
a:hover { text-decoration-color: var(--accent-primary-hover); }
.text-link,
.continue-reading,
.home-about__author,
.simple-page__links a,
.site-footer a,
.chapter-lock-link,
.spotify-open-link,
.soundtrack-entry__spotify,
.chapter-navigation__contents,
.prose-body a,
.chapter-content a {
  color: var(--link-small);
}
.text-link:hover,
.continue-reading:hover,
.home-about__author:hover,
.simple-page__links a:hover,
.site-footer a:hover,
.chapter-lock-link:hover,
.spotify-open-link:hover,
.soundtrack-entry__spotify:hover,
.chapter-navigation__contents:hover,
.prose-body a:hover,
.chapter-content a:hover {
  color: var(--link-small-hover);
}
button, select, summary { font: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }

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

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  transform: translateY(-150%);
  padding: 0.65rem 0.8rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--ui-font);
  font-size: 0.875rem;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 82%, transparent);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  transition: transform 180ms ease;
}
.site-header.is-hidden:not(:focus-within) { transform: translateY(-102%); }
.site-header__inner {
  width: min(94vw, 78rem);
  min-height: 4.15rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display-font);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.bag-mark { overflow: visible; }
.brand__mark { width: 1.82rem; height: 1.82rem; }
.bag-mark .bag-body { fill: var(--bag-body); }
.bag-mark .bag-shading { opacity: 0.22; }
.bag-mark .bag-shading ellipse { fill: var(--bag-fold); }
.bag-mark .bag-shading path {
  fill: none;
  stroke: var(--bag-fold);
  stroke-width: 1.15;
}
.bag-mark .bag-eye { fill: var(--bag-eye); }
.bag-mark .bag-pupil-highlight { fill: var(--bag-highlight); }
.brand__title { white-space: nowrap; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 2rem);
  font-family: var(--ui-font);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.primary-nav > a {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  padding: 0.35rem 0;
}
.primary-nav > a:hover,
.primary-nav > a[aria-current="page"] { color: var(--accent-primary); }
.primary-nav > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent-primary);
  transition: right 150ms ease;
}
.primary-nav > a:hover::after,
.primary-nav > a[aria-current="page"]::after { right: 0; }

.reading-settings { position: relative; }
.reading-settings > summary {
  list-style: none;
  cursor: pointer;
  min-width: 2.45rem;
  min-height: 2.45rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper-raised) 90%, transparent);
  letter-spacing: 0;
  text-transform: none;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}
.reading-settings > summary:hover,
.reading-settings[open] > summary {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}
.reading-settings > summary::-webkit-details-marker { display: none; }
.reading-settings__summary-icon { display: inline-grid; place-items: center; }
.appearance-icon {
  width: 1.08rem;
  height: 1.08rem;
  overflow: visible;
}
.appearance-icon__sun {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
}
.appearance-icon__moon {
  fill: var(--ink);
  opacity: 0.9;
}
.appearance-icon__rays path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
}
html[data-theme="dark"] .appearance-icon__sun,
html[data-theme="dark"] .appearance-icon__rays path {
  stroke: var(--cover-cream);
}
html[data-theme="dark"] .appearance-icon__moon {
  fill: var(--cover-cream);
}
.reading-settings__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.6rem);
  width: 12.5rem;
  padding: 1rem;
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper-raised) 96%, transparent);
  box-shadow: 0 14px 34px var(--shadow);
  text-transform: none;
  letter-spacing: normal;
}
.reading-settings__title {
  margin: 0 0 0.65rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: normal;
}
.theme-toggle {
  width: 100%;
  min-height: 2.5rem;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

main {
  width: 100%;
  min-width: 0;
}

.site-header__inner > *,
.primary-nav,
.home-hero > *,
.home-about > *,
.home-excerpt__inner,
.home-available__entry,
.home-available__front-links,
.toc-copy,
.front-matter-entry__title,
.front-matter-entry__subtitle,
.chapter-navigation > *,
.chapter-navigation a,
.soundtrack-entry > *,
.soundtrack-entry__chapter-copy,
.playlist-feature > *,
.site-footer__inner > *,
.access-card > * {
  min-width: 0;
}

.brand__title,
.primary-nav a,
.page-heading h1,
.chapter-header h1,
.chapter-subtitle,
.toc-title,
.toc-subtitle,
.front-matter-entry__title,
.front-matter-entry__subtitle,
.home-available__title,
.home-available__front-links,
.soundtrack-entry__chapter-title,
.site-footer__brand,
.chapter-navigation strong,
.access-card h1 {
  overflow-wrap: break-word;
}

.chapter-content,
.prose-body,
.home-excerpt__passage,
.soundtrack-entry__blurb,
.contact-intro {
  overflow-wrap: anywhere;
}

.eyebrow,
.chapter-kicker,
.chapter-meta,
.error-code,
.chapter-series,
.toc-kind {
  margin: 0;
  color: var(--red);
  font-family: var(--ui-font);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Home */
.home-hero {
  width: min(91vw, 78rem);
  min-height: calc(100vh - 4.2rem - 4rem);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
  position: relative;
}
.home-hero__copy { animation: quiet-reveal 620ms ease both; }
.home-hero--no-cover { grid-template-columns: minmax(0, 52rem); justify-content: center; }
.home-hero--no-cover .home-hero__copy { max-width: 52rem; }
.home-hero h1 {
  margin: 1.15rem 0 0;
  font-family: var(--display-font);
  font-size: clamp(3.75rem, 7.5vw, 7.2rem);
  font-weight: 400;
  line-height: 0.93;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.home-hero h1 span { display: block; }
.home-subtitle {
  margin: 1.35rem 0 0;
  color: var(--cover-red);
  font-family: var(--display-font);
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-style: italic;
  line-height: 1;
}
.home-byline {
  margin: 2rem 0 0;
  font-family: var(--ui-font);
  font-size: 0.82rem;
  letter-spacing: 0.28em;
}
.home-tagline {
  max-width: 32rem;
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.75rem;
  color: var(--ink-soft);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.55;
}
.home-tagline span { height: 2px; margin-top: 0.72rem; background: var(--yellow); }
.home-actions { margin-top: 2.5rem; display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  min-height: 3.2rem;
  padding: 0.7rem 1.35rem;
  font-family: var(--ui-font);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-decoration: none;
  text-transform: uppercase;
}
.button--outline {
  border: 1px solid var(--cover-red);
  color: var(--cover-red);
  transition: background-color 170ms ease, border-color 170ms ease, color 170ms ease, transform 170ms ease;
}
.button--outline:hover {
  border-color: var(--cover-red-bright);
  background: var(--cover-red-bright);
  color: var(--surface-raised);
  transform: translateY(-1px);
}
.text-link {
  font-family: var(--ui-font);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.continue-reading {
  width: fit-content;
  margin-top: 1.35rem;
  display: block;
  color: var(--link-small);
  font-size: 0.96rem;
  font-style: italic;
}
.home-cover {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(100%, 24rem);
  animation: cover-reveal 760ms 100ms ease both;
}
.home-cover::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 8.8rem;
  aspect-ratio: 1;
  right: -4.7rem;
  top: 52%;
  border: 2px solid color-mix(in srgb, var(--cover-red) 42%, transparent);
  border-radius: 50%;
  transform: translateY(-50%) rotate(-9deg) scaleY(0.93);
}
.home-cover::after {
  content: "";
  position: absolute;
  inset: -1.6rem -1.2rem auto auto;
  width: 5.4rem;
  height: 1.4rem;
  background: linear-gradient(100deg, rgba(231, 213, 181, 0.48), rgba(231, 213, 181, 0.18));
  transform: rotate(7deg);
  opacity: 0.32;
}
.home-cover img {
  display: block;
  width: 100%;
  box-shadow: 0 22px 50px rgba(61, 28, 15, 0.18);
}
.home-about {
  width: min(88vw, 52rem);
  margin: 0 auto clamp(3.5rem, 7vw, 5.5rem);
  padding: clamp(2.2rem, 5vw, 3.6rem);
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper-raised) 86%, transparent);
  position: relative;
}
.home-about::before {
  content: "";
  position: absolute;
  top: -1px;
  left: clamp(2.2rem, 5vw, 3.6rem);
  width: 3.2rem;
  height: 2px;
  background: var(--yellow);
}
.home-about h2 {
  max-width: 100%;
  margin: 0.8rem 0 1.35rem;
  font-family: var(--display-font);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.05;
}
.home-about__title > span {
  display: block;
  text-wrap: balance;
}
.home-about__title > span:last-child {
  color: var(--cover-red);
  font-style: italic;
}
.home-about__title .no-orphan {
  white-space: nowrap;
}
.home-about__copy {
  max-width: 43rem;
}
.home-about__copy p {
  margin: 0 0 0.8rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.7;
}
.home-about__copy p:last-child { margin-bottom: 0; }
.home-about__copy .home-about__final-thought {
  margin-top: 2rem;
  color: color-mix(in srgb, var(--ink-soft) 84%, transparent);
  font-size: 0.98rem;
}
.home-about__author {
  width: fit-content;
  margin-top: 2rem;
  padding-top: 1rem;
  display: block;
  border-top: 2px solid var(--yellow);
  font-family: var(--ui-font);
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.home-excerpt {
  width: 100%;
  max-width: 100%;
  margin: 0 0 clamp(3.8rem, 8vw, 6.5rem);
  padding: clamp(4rem, 9vw, 7rem) max(6vw, 1.5rem);
  background: color-mix(in srgb, var(--surface) 88%, var(--cover-cream));
}
html[data-theme="dark"] .home-excerpt {
  background: var(--surface);
}
.home-excerpt__inner {
  width: min(100%, 76rem);
  margin: 0 auto;
}
.home-excerpt .eyebrow { margin-bottom: clamp(1.6rem, 3.5vw, 2.6rem); }
.home-excerpt__passage {
  width: 100%;
  max-width: 68ch;
  font-family: var(--display-font);
  font-size: clamp(1.85rem, 2.9vw, 2.5rem);
  line-height: 1.43;
}
.home-excerpt__passage p { margin: 0 0 0.9em; }
.home-excerpt__passage p:last-child { margin-bottom: 0; }
.home-excerpt__attribution {
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.8vw, 1.28rem);
  font-style: italic;
}
.home-excerpt__attribution::before {
  content: "";
  width: 3.2rem;
  height: 2px;
  margin-bottom: 1rem;
  display: block;
  background: var(--red);
}
.home-available {
  width: min(84vw, 68rem);
  margin: 0 auto clamp(4.5rem, 8vw, 6.5rem);
}
.home-available > .eyebrow { margin-bottom: 1.2rem; }
.home-available__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 5vw, 4.4rem);
}
.home-available__entry {
  min-width: 0;
  min-height: 4.35rem;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.25rem;
  border-top: 1px solid var(--rule);
  text-decoration: none;
}
.home-available__title,
.home-available__front-links {
  color: var(--ink);
  font-family: var(--display-font);
  font-size: clamp(1.16rem, 2vw, 1.42rem);
  line-height: 1.25;
}
.home-available__subtitle {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-style: italic;
}
.home-available__entry[href] .home-available__title,
.home-available__front-links a {
  transition: color 150ms ease;
}
.home-available__entry[href]:hover .home-available__title,
.home-available__entry[href]:focus-visible .home-available__title,
.home-available__front-links a:hover,
.home-available__front-links a:focus-visible {
  color: var(--red);
}
.home-available__entry--front {
  color: var(--ink-soft);
}
.home-available__front-links,
.home-available__front-links a {
  color: var(--ink-soft);
}
.home-available__front-links a { text-decoration-thickness: 1px; }
.home-closing {
  width: min(91vw, 78rem);
  margin: 0 auto 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  text-align: center;
  font-style: italic;
}

html[data-theme="dark"] .home-subtitle {
  color: var(--text);
}
html[data-theme="dark"] .home-about__title > span:last-child {
  color: var(--text);
}
html[data-theme="dark"] .chapter-subtitle,
html[data-theme="dark"] .prose-body blockquote,
html[data-theme="dark"] .playlist-feature__copy h2 span,
html[data-theme="dark"] .soundtrack-entry__track span {
  color: var(--text-secondary);
}
html[data-theme="dark"] .button--outline {
  border-color: var(--cover-yellow);
  background: transparent;
  color: var(--cover-yellow);
}
html[data-theme="dark"] .button--outline:hover,
html[data-theme="dark"] .button--outline:focus-visible {
  border-color: var(--cover-yellow);
  background: var(--cover-yellow);
  color: var(--dark-ink);
  transform: translateY(-1px);
}
html[data-theme="dark"] .button--outline:focus-visible {
  outline-color: var(--cover-cream);
}
html[data-theme="dark"] .home-cover img {
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.48);
}
html[data-theme="dark"] .home-available__entry[href]:hover .home-available__title,
html[data-theme="dark"] .home-available__entry[href]:focus-visible .home-available__title,
html[data-theme="dark"] .home-available__front-links a:hover,
html[data-theme="dark"] .home-available__front-links a:focus-visible {
  color: var(--cover-yellow);
}

/* Page headings */
.page-heading { max-width: 46rem; margin: 0 auto 3rem; }
.page-heading h1 {
  margin: 0.55rem 0 0;
  font-family: var(--display-font);
  font-size: clamp(3.4rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 0.98;
}

/* Contents */
.contents-page { width: min(91vw, 69rem); margin: 0 auto; padding: clamp(4rem, 8vw, 7rem) 0 6rem; }
.front-matter-entry {
  max-width: 58rem;
  margin: 0 auto 4.5rem;
  padding: 1.4rem 0;
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) auto 2.25rem;
  column-gap: 1.25rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.front-matter-entry__label { grid-column: 1; grid-row: 1; color: var(--red); font-family: var(--ui-font); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }
.front-matter-entry__title { grid-column: 2; grid-row: 1; font-size: 1.28rem; }
.front-matter-entry__subtitle { grid-column: 2; grid-row: 2; color: var(--ink-soft); font-style: italic; }
.front-matter-entry .toc-reading-time { grid-column: 3; grid-row: 1; }
.front-matter-entry .toc-status { grid-column: 4; grid-row: 1 / span 2; }
.act-section { margin-top: 5.5rem; }
.act-heading {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  column-gap: 1.25rem;
  align-items: baseline;
  margin-bottom: 1.5rem;
}
.act-heading > p:first-child { margin: 0; color: var(--red); font-family: var(--ui-font); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }
.act-heading h2 { margin: 0; font-family: var(--display-font); font-size: clamp(2rem, 3.2vw, 3rem); font-weight: 400; line-height: 1; }
.act-tagline { grid-column: 2; margin: 0.45rem 0 0; color: var(--ink-soft); font-style: italic; }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-entry {
  padding: 1.45rem 0;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto 2.25rem;
  gap: 1rem;
  align-items: start;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  transition: padding-left 150ms ease, background-color 150ms ease;
}
.toc-entry:hover { padding-left: 0.55rem; background: color-mix(in srgb, var(--paper-raised) 55%, transparent); }
.toc-number {
  color: var(--red);
  font-family: var(--display-font);
  font-size: 1.6rem;
  line-height: 1;
  white-space: nowrap;
}
.toc-copy { display: flex; flex-direction: column; gap: 0.18rem; }
.toc-kind { color: var(--ink-soft); margin-bottom: 0.15rem; font-size: 0.62rem; }
.toc-title { font-family: var(--display-font); font-size: 1.45rem; line-height: 1.15; }
.toc-subtitle { color: var(--ink-soft); font-style: italic; }
.toc-description { max-width: 42rem; margin-top: 0.45rem; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.45; }
.toc-reading-time { color: var(--ink-soft); font-family: var(--ui-font); font-size: 0.72rem; white-space: nowrap; }
.toc-status {
  width: 2.25rem;
  min-height: 2.25rem;
  display: grid;
  place-items: start center;
  align-self: start;
  color: var(--ink-soft);
}
.toc-lock {
  width: 1.35rem;
  height: 1.35rem;
  margin-top: -0.15rem;
  display: block;
  overflow: visible;
  opacity: 0.62;
}
.toc-lock path,
.toc-lock rect {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.toc-lock circle {
  fill: currentColor;
  stroke: none;
}
.toc-lock__shackle {
  transform-box: fill-box;
  transform-origin: center bottom;
  transition: transform 150ms ease;
}
.toc-public-arrow {
  color: var(--red);
  font-family: var(--ui-font);
  font-size: 1rem;
  line-height: 1;
  opacity: 0.35;
  transform: translateX(-0.2rem);
  transition: opacity 150ms ease, transform 150ms ease;
}
.toc-entry:hover .toc-public-arrow,
.toc-entry:focus-visible .toc-public-arrow,
.front-matter-entry:hover .toc-public-arrow,
.front-matter-entry:focus-visible .toc-public-arrow {
  opacity: 0.78;
  transform: translateX(0);
}
.toc-entry.is-protected:hover .toc-lock__shackle,
.toc-entry.is-protected:focus-visible .toc-lock__shackle,
.front-matter-entry.is-protected:hover .toc-lock__shackle,
.front-matter-entry.is-protected:focus-visible .toc-lock__shackle {
  transform: translateY(-1px);
}
.toc-entry--field-note .toc-number { font-size: 1.05rem; letter-spacing: 0.08em; }
.toc-entry--field-note .toc-title { font-size: 1.34rem; }
.toc-entry--cold-open .toc-number {
  font-family: var(--ui-font);
  font-size: 1rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}
.toc-entry--cold-open .toc-title { font-size: 1.34rem; }

/* Chapters */
.reading-progress { position: fixed; inset: 0 0 auto; z-index: 220; height: 2px; pointer-events: none; }
.reading-progress span { display: block; height: 100%; background: var(--accent-primary); transform: scaleX(0); transform-origin: left center; }
.chapter-page {
  width: min(90vw, 46rem);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7.5rem) 0 5rem;
  position: relative;
}
.chapter-header { margin-bottom: clamp(3.25rem, 7vw, 5.75rem); text-align: center; }
.chapter-series { margin-bottom: 0.9rem; color: var(--ink-soft); }
.chapter-header h1 {
  max-width: 44rem;
  margin: 0.75rem auto 0;
  font-family: var(--display-font);
  font-size: clamp(3.2rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.chapter-subtitle { max-width: 37rem; margin: 1rem auto 0; color: var(--red); font-size: clamp(1.35rem, 3vw, 2rem); font-style: italic; line-height: 1.25; }
.chapter-coda-note {
  max-width: 44rem;
  margin: 0.75rem auto 1.2rem;
  color: var(--muted);
  font-family: var(--body-font);
  font-size: clamp(1rem, 2vw, 1.22rem);
  font-style: italic;
  line-height: 1.45;
}
.chapter-header--coda .chapter-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.chapter-header--coda .chapter-kicker::before,
.chapter-header--coda .chapter-kicker::after {
  content: "";
  width: clamp(2.2rem, 7vw, 5.5rem);
  height: 1px;
  background: var(--red);
}
.chapter-page--coda .chapter-content::before {
  content: "B-SIDE / ENCORE / WHATEVER";
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 2.6rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--red) 70%, var(--rule));
  color: var(--red);
  font-family: var(--ui-font);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transform: rotate(-1deg);
}
.toc-entry--coda .toc-number {
  color: var(--red);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chapter-note {
  max-width: 34rem;
  margin: 1rem auto 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-style: italic;
}
.chapter-meta { margin-top: 1.35rem; color: var(--ink-soft); letter-spacing: 0.12em; }
.resume-prompt { margin: -2.1rem 0 2.2rem; text-align: center; }
.resume-prompt button { border: 0; border-bottom: 1px solid var(--accent-primary); padding: 0 0 0.15rem; background: transparent; color: var(--link-small); cursor: pointer; font-style: italic; }

.speech-reader { margin: 0 0 3rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.speech-reader > summary { cursor: pointer; padding: 0.95rem 0; color: var(--ink-soft); font-family: var(--ui-font); font-size: 0.77rem; letter-spacing: 0.08em; text-transform: uppercase; }
.speech-reader__panel { padding: 0 0 1.15rem; }
.speech-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.speech-buttons button,
.speech-options select {
  min-height: 2.35rem;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  color: var(--ink);
}
.speech-buttons button { padding: 0.4rem 0.8rem; cursor: pointer; }
.speech-buttons button:disabled { cursor: not-allowed; opacity: 0.45; }
.speech-options { margin-top: 0.8rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.speech-options label { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--ink-soft); font-family: var(--ui-font); font-size: 0.78rem; }
.speech-options select { max-width: 17rem; padding: 0.3rem 1.7rem 0.3rem 0.45rem; }
.speech-note { margin: 0.65rem 0 0; color: var(--ink-soft); font-size: 0.82rem; font-style: italic; }

.chapter-content {
  font-size: clamp(1.08rem, 2.5vw, 1.28rem);
  line-height: 1.72;
  hanging-punctuation: first last;
}
.chapter-content p { margin: 0 0 1.22em; }
.chapter-content p.opening-line { font-size: 1.08em; }
.chapter-content p.standalone { margin-top: 1.65em; margin-bottom: 1.65em; }
.chapter-content em { color: color-mix(in srgb, var(--ink) 88%, var(--red)); }
.chapter-content blockquote {
  margin: 2.4em 0;
  padding: 0.1em 0 0.1em 1.35em;
  border-left: 2px solid var(--red);
  color: var(--ink-soft);
  font-style: italic;
}
.chapter-content blockquote.pull-quote {
  padding: 0;
  border: 0;
  color: var(--red);
  font-family: var(--display-font);
  font-size: 1.55em;
  line-height: 1.25;
  text-align: center;
}
.chapter-content hr {
  width: 4.2rem;
  height: 1px;
  margin: 3.6rem auto;
  overflow: visible;
  border: 0;
  background: var(--red);
}
.chapter-content hr::after {
  content: "";
  display: block;
  width: 0.36rem;
  height: 0.36rem;
  margin: -0.17rem auto 0;
  border-radius: 50%;
  background: var(--yellow);
}
.chapter-content .footnotes { margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: 0.83em; }
.chapter-content sup { line-height: 0; }

.chapter-page--field-note {
  width: min(92vw, 50rem);
  padding-inline: clamp(1rem, 3vw, 1.8rem);
}
.chapter-page--field-note::before,
.chapter-page--field-note::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.chapter-page--field-note::before {
  inset: 1.8rem 0 1rem;
  z-index: -1;
  border: 1px solid color-mix(in srgb, var(--rule) 90%, transparent);
  background:
    linear-gradient(to right, transparent 0, transparent 4.3rem, color-mix(in srgb, var(--red) 22%, transparent) 4.3rem, color-mix(in srgb, var(--red) 22%, transparent) 4.42rem, transparent 4.42rem),
    repeating-linear-gradient(to bottom, color-mix(in srgb, var(--red) 0%, transparent) 0 2rem, color-mix(in srgb, var(--rule) 78%, transparent) 2rem 2.08rem),
    color-mix(in srgb, var(--paper-raised) 98%, transparent);
  box-shadow: 0 1.4rem 2.8rem var(--shadow);
  clip-path: polygon(0 0, 98% 0, 100% 2%, 100% 97%, 96% 100%, 0 100%);
}
.chapter-page--field-note::after {
  top: 1rem;
  right: 1.4rem;
  width: 5.4rem;
  height: 1.3rem;
  background: linear-gradient(104deg, color-mix(in srgb, var(--cover-cream) 52%, transparent), color-mix(in srgb, var(--cover-cream) 22%, transparent));
  transform: rotate(7deg);
  opacity: 0.75;
}
.chapter-page--field-note .chapter-header,
.chapter-page--field-note .resume-prompt,
.chapter-page--field-note .speech-reader,
.chapter-page--field-note .chapter-content,
.chapter-page--field-note .chapter-navigation {
  position: relative;
  z-index: 1;
}
.chapter-page--field-note .chapter-header,
.chapter-page--field-note .resume-prompt,
.chapter-page--field-note .speech-reader,
.chapter-page--field-note .chapter-content,
.chapter-page--field-note .chapter-navigation {
  padding-left: clamp(2rem, 4vw, 4.8rem);
  padding-right: clamp(1rem, 2vw, 1.5rem);
}
.chapter-page--field-note .chapter-header { margin-bottom: 3.6rem; }
.chapter-page--field-note .chapter-header h1 { font-size: clamp(2.7rem, 6vw, 4.3rem); }
.chapter-page--field-note .chapter-content { line-height: 1.9; }
html[data-theme="dark"] .chapter-page--field-note::before {
  background:
    linear-gradient(to right, transparent 0, transparent 4.3rem, color-mix(in srgb, var(--red) 36%, transparent) 4.3rem, color-mix(in srgb, var(--red) 36%, transparent) 4.42rem, transparent 4.42rem),
    repeating-linear-gradient(to bottom, transparent 0 2rem, color-mix(in srgb, var(--rule) 90%, transparent) 2rem 2.08rem),
    color-mix(in srgb, var(--paper-raised) 98%, transparent);
}
html[data-theme="dark"] .chapter-page--field-note::after { opacity: 0.3; }

.chapter-navigation {
  margin-top: clamp(4rem, 10vw, 7rem);
  padding-top: 1.4rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: start;
  border-top: 1px solid var(--rule);
  font-family: var(--ui-font);
}
.chapter-navigation a { text-decoration: none; }
.chapter-navigation__previous a,
.chapter-navigation__next a { display: flex; flex-direction: column; gap: 0.25rem; }
.chapter-navigation__next { text-align: right; }
.chapter-navigation span { color: var(--accent-primary); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; }
.chapter-navigation strong { font-family: var(--body-font); font-size: 0.95rem; font-weight: 400; }
.chapter-navigation__contents { align-self: center; color: var(--ink-soft); font-size: 0.72rem; letter-spacing: 0.08em; text-align: center; text-transform: uppercase; }

/* Simple pages */
.simple-page { width: min(89vw, 44rem); margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) 0 6rem; }
.prose-body { font-size: 1.16rem; line-height: 1.7; }
.prose-body p { margin: 0 0 1.3em; }
.prose-body blockquote { margin: 0 0 3rem; padding-left: 1.3rem; border-left: 2px solid var(--red); color: var(--red); font-family: var(--display-font); font-size: 1.75rem; font-style: italic; line-height: 1.35; }
.prose-body h2 { margin: 3.5rem 0 1.25rem; font-family: var(--display-font); font-size: 2rem; font-weight: 400; }
.simple-page__links { margin-top: 3.5rem; display: flex; gap: 2rem; font-family: var(--ui-font); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.author-portrait {
  width: min(92vw, 48rem);
  margin: 1.25rem 0 2.7rem 50%;
  transform: translateX(-50%) rotate(-0.25deg);
}
.author-portrait img {
  display: block;
  width: 100%;
  padding: clamp(0.35rem, 1vw, 0.6rem);
  border: 1px solid color-mix(in srgb, var(--rule) 88%, transparent);
  background: var(--surface);
  box-shadow: 0 1.8rem 3.7rem color-mix(in srgb, var(--shadow) 92%, transparent);
}
.author-portrait figcaption {
  margin-top: 0.9rem;
  color: var(--ink-soft);
  font-family: var(--ui-font);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
}
html[data-theme="dark"] .author-portrait img {
  border-color: color-mix(in srgb, var(--rule) 94%, transparent);
  background: var(--surface-raised);
  box-shadow: 0 1.9rem 4rem rgba(0, 0, 0, 0.48);
}
.error-page { width: min(88vw, 44rem); min-height: calc(100vh - 4.2rem); margin: 0 auto; display: grid; align-content: center; justify-items: start; padding: 4rem 0; }
.error-page h1 { margin: 0.4rem 0 0; font-family: var(--display-font); font-size: clamp(3rem, 8vw, 6rem); font-weight: 400; line-height: 1; }
.error-page p:not(.error-code) { margin: 1rem 0 2rem; color: var(--ink-soft); font-size: 1.3rem; font-style: italic; }

@keyframes quiet-reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cover-reveal { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }


/* Final visual polish */
body,
.site-header,
.reading-settings__panel,
.speech-buttons button,
.speech-options select {
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease;
}

.home-page .site-header {
  background: color-mix(in srgb, var(--paper) 82%, transparent);
}

.home-hero::before {
  content: "";
  position: absolute;
  left: -8vw;
  right: 54%;
  bottom: 7%;
  height: 1px;
  background: color-mix(in srgb, var(--red) 32%, transparent);
  transform: rotate(-1deg);
  opacity: 0.42;
}

.home-hero__copy {
  animation: none;
}

.home-hero__copy > * {
  opacity: 0;
  animation: line-settle 640ms ease-out forwards;
}
.home-hero__copy > :nth-child(1) { animation-delay: 40ms; }
.home-hero__copy > :nth-child(2) { animation-delay: 100ms; }
.home-hero__copy > :nth-child(3) { animation-delay: 180ms; }
.home-hero__copy > :nth-child(4) { animation-delay: 250ms; }
.home-hero__copy > :nth-child(5) { animation-delay: 320ms; }
.home-hero__copy > :nth-child(6) { animation-delay: 390ms; }
.home-hero__copy > :nth-child(7) { animation-delay: 450ms; }

.home-hero h1 {
  text-shadow: 0.025em 0.025em 0 color-mix(in srgb, var(--ink) 8%, transparent);
}

.home-hero h1 span:last-child {
  position: relative;
}
.home-hero h1 span:last-child::after {
  content: "";
  position: absolute;
  left: 0.04em;
  bottom: -0.13em;
  width: 0.72em;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  animation: underline-write 520ms 700ms ease-out forwards;
}

.home-cover {
  transform: rotate(-0.55deg);
  animation: cover-settle 820ms 130ms cubic-bezier(.2,.8,.2,1) both;
  transition: transform 260ms ease;
}
.home-cover:hover {
  transform: translateY(-4px) rotate(0deg);
}
.home-cover::after {
  top: -1.05rem;
  right: 37%;
  width: 6.3rem;
  height: 1.45rem;
  background: rgba(231, 213, 181, 0.44);
  border-left: 1px solid rgba(75, 45, 27, 0.1);
  border-right: 1px solid rgba(75, 45, 27, 0.1);
  transform: rotate(-3deg);
  opacity: 0.82;
  box-shadow: inset 0 0 0 1px rgba(248, 244, 236, 0.12);
}
html[data-theme="dark"] .home-cover::after {
  opacity: 0.34;
}

.home-cover img {
  border: 1px solid color-mix(in srgb, var(--rule) 72%, transparent);
  box-shadow: 0 22px 50px rgba(61, 28, 15, 0.18);
}
html[data-theme="dark"] .home-cover img {
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.48);
}

.home-closing {
  position: relative;
  max-width: 78rem;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.home-closing__mark {
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  transform: rotate(-2deg);
}
.home-closing::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  width: 2.2rem;
  height: 2px;
  margin: 0;
  background: var(--yellow);
  transform: translate(-50%, -1px);
}

.chapter-page--field-note {
  padding-top: clamp(4.8rem, 10vw, 8rem);
}
.chapter-page--field-note::before {
  inset: 2.2rem -0.35rem 1rem;
  background: url("/images/field-note-paper.svg") top center / 100% auto repeat-y;
  box-shadow: 0 1.7rem 3.8rem var(--shadow), 0 0 0 1px rgba(102, 82, 59, 0.08);
  clip-path: polygon(
    0.4% 0.8%, 4% 0.1%, 9% 0.65%, 14% 0.1%, 21% 0.55%, 29% 0.05%,
    38% 0.58%, 47% 0.1%, 57% 0.65%, 66% 0.05%, 76% 0.55%, 86% 0.08%,
    96% 0.7%, 99.6% 1.4%, 100% 97.5%, 96% 99.4%, 90% 98.9%, 83% 99.7%,
    74% 99%, 65% 99.8%, 55% 99.1%, 46% 99.75%, 36% 99%, 27% 99.6%,
    18% 99%, 9% 99.7%, 0 98.8%
  );
  transform: rotate(-0.16deg);
  animation: note-settle 680ms 80ms cubic-bezier(.2,.8,.2,1) both;
}
.chapter-page--field-note::after {
  top: 1.35rem;
  right: 10%;
  width: 7.1rem;
  height: 1.5rem;
  background: color-mix(in srgb, var(--cover-cream) 62%, transparent);
  transform: rotate(5.5deg);
  opacity: 0.86;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dark-ink) 7%, transparent);
}
html[data-theme="dark"] .chapter-page--field-note::before {
  background: url("/images/field-note-paper-dark.svg") top center / 100% auto repeat-y;
  box-shadow: 0 1.8rem 4rem rgba(0,0,0,0.42), 0 0 0 1px rgba(238, 221, 188, 0.05);
}
html[data-theme="dark"] .chapter-page--field-note::after {
  background: color-mix(in srgb, var(--cover-cream) 22%, transparent);
  opacity: 0.75;
}

.chapter-page--field-note .chapter-header {
  position: relative;
}
.chapter-page--field-note .chapter-header::before {
  content: "";
  position: absolute;
  left: clamp(-3.75rem, -7vw, -2.8rem);
  top: 1.65rem;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--paper);
  box-shadow:
    0 4.65rem 0 var(--paper),
    0 9.3rem 0 var(--paper),
    inset 0 0 0 1px color-mix(in srgb, var(--ink-soft) 34%, transparent),
    0 0 0 1px color-mix(in srgb, var(--ink-soft) 18%, transparent);
  opacity: 0.76;
}
.chapter-page--field-note .chapter-header::after {
  content: "";
  position: absolute;
  left: 7%;
  top: -3.7rem;
  width: 5rem;
  height: 1.15rem;
  background: color-mix(in srgb, var(--cover-cream) 46%, transparent);
  transform: rotate(-7deg);
  opacity: 0.66;
}
html[data-theme="dark"] .chapter-page--field-note .chapter-header::after {
  opacity: 0.24;
}

.chapter-page--field-note .chapter-series,
.chapter-page--field-note .chapter-kicker {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.14em;
}
.chapter-page--field-note .chapter-series {
  color: var(--ink-soft);
  transform: rotate(-0.35deg);
}
.chapter-page--field-note .chapter-note {
  font-family: "Bradley Hand", "Segoe Print", "Noteworthy", cursive;
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  line-height: 1.5;
  transform: rotate(-0.45deg);
}
.chapter-page--field-note .chapter-content {
  line-height: 1.82;
}
.chapter-page--field-note .chapter-content p.standalone {
  color: color-mix(in srgb, var(--ink) 88%, var(--red));
}

@keyframes line-settle {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes underline-write {
  to { transform: scaleX(1); }
}
@keyframes cover-settle {
  from { opacity: 0; transform: translateY(20px) rotate(-1.8deg) scale(0.985); }
  to { opacity: 1; transform: translateY(0) rotate(-0.55deg) scale(1); }
}
@keyframes note-settle {
  from { opacity: 0; transform: translateY(15px) rotate(-0.45deg); }
  to { opacity: 1; transform: translateY(0) rotate(-0.16deg); }
}

@media (max-width: 820px) {
  .brand__title { display: none; }
  .site-header__inner { width: min(92vw, 46rem); }
  .home-hero { min-height: auto; grid-template-columns: 1fr; padding-top: 4.3rem; }
  .home-cover { width: min(78vw, 22rem); grid-row: 2; }
  .home-cover::before { right: -2.1rem; }
  .front-matter-entry { grid-template-columns: minmax(0, 1fr) auto 2.25rem; }
  .front-matter-entry__label { grid-column: 1 / -1; grid-row: 1; margin-bottom: 0.35rem; }
  .front-matter-entry__title { grid-column: 1; grid-row: 2; }
  .front-matter-entry__subtitle { grid-column: 1; grid-row: 3; }
  .front-matter-entry .toc-reading-time { grid-column: 2; grid-row: 2; }
  .front-matter-entry .toc-status { grid-column: 3; grid-row: 2 / span 2; }
  .act-heading { grid-template-columns: 1fr; }
  .act-tagline { grid-column: 1; }
  .toc-entry { grid-template-columns: 3.2rem minmax(0, 1fr) 2.25rem; }
  .toc-reading-time { grid-column: 2; }
  .toc-entry .toc-status { grid-column: 3; grid-row: 1 / span 2; }
  .chapter-navigation { grid-template-columns: 1fr 1fr; }
  .chapter-navigation__contents { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 560px) {
  .home-hero::before { display: none; }
  .home-cover:hover { transform: rotate(-0.55deg); }
  .site-header__inner { min-height: 3.7rem; }
  .primary-nav { gap: 0.85rem; font-size: 0.68rem; }
  .reading-settings > summary { min-width: 2.15rem; min-height: 2.15rem; }
  .reading-settings__panel { position: fixed; top: 4.1rem; right: 4vw; width: min(92vw, 14rem); }
  .home-hero { width: min(88vw, 34rem); gap: 3rem; }
  .home-hero h1 { font-size: clamp(3.25rem, 15.7vw, 5rem); }
  .home-subtitle { font-size: clamp(1.8rem, 8vw, 2.7rem); }
  .home-actions { align-items: flex-start; flex-direction: column; gap: 1.15rem; }
  .home-about { width: min(88vw, 34rem); padding: 2rem 1.5rem; }
  .home-excerpt {
    margin-bottom: 3.8rem;
    padding: 3.8rem max(6vw, 1.35rem);
  }
  .home-excerpt__passage {
    max-width: 34rem;
    font-size: clamp(1.55rem, 7vw, 2rem);
    line-height: 1.42;
  }
  .home-available { width: min(88vw, 34rem); }
  .home-available__grid { grid-template-columns: 1fr; }
  .home-available__entry { min-height: 0; padding: 1rem 0 1.05rem; }
  .home-closing { width: min(88vw, 34rem); }
  .contents-page { width: min(88vw, 40rem); }
  .page-heading { margin-bottom: 2.4rem; }
  .act-section { margin-top: 4rem; }
  .toc-entry { grid-template-columns: 2.9rem minmax(0, 1fr) 2.25rem; gap: 0.75rem; padding: 1.25rem 0; }
  .toc-number { font-size: 1.2rem; }
  .toc-entry--field-note .toc-number { font-size: 0.88rem; }
  .toc-title { font-size: 1.25rem; }
  .toc-description { font-size: 0.9rem; }
  .chapter-page { width: min(87vw, 42rem); padding-top: 4.2rem; }
  .chapter-header h1 { font-size: clamp(2.85rem, 13vw, 4.2rem); }
  .chapter-content { line-height: 1.67; }
  .speech-options { flex-direction: column; align-items: flex-start; }
  .speech-options label { width: 100%; justify-content: space-between; }
  .speech-options select { width: 70%; }
  .chapter-navigation { display: flex; flex-direction: column; gap: 1.4rem; }
  .chapter-navigation__previous,
  .chapter-navigation__next { width: 100%; }
  .chapter-navigation__next { align-self: flex-end; margin-left: auto; }
  .chapter-navigation__contents { order: 3; align-self: center; }
  .simple-page__links { flex-direction: column; gap: 1rem; }
  .simple-page__links a { width: 100%; }
  .primary-nav { padding-inline: 0.05rem; }
  .author-portrait { width: 92vw; transform: translateX(-50%) rotate(-0.12deg); }
  .author-portrait figcaption { font-size: 0.64rem; }
  .chapter-page--field-note {
    width: min(92vw, 44rem);
    padding-inline: 0.45rem;
  }
  .chapter-page--field-note::before { inset: 1rem 0 0.7rem; }
  .chapter-page--field-note .chapter-header::before { display: none; }
  .chapter-page--field-note .chapter-header::after { left: 3%; top: -3.35rem; }
  .chapter-page--field-note .chapter-header,
  .chapter-page--field-note .resume-prompt,
  .chapter-page--field-note .speech-reader,
  .chapter-page--field-note .chapter-content,
  .chapter-page--field-note .chapter-navigation {
    padding-left: 1.45rem;
    padding-right: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media print {
  :root, html[data-theme="dark"] {
    --paper: #ffffff;
    --paper-raised: #ffffff;
    --ink: #111111;
    --ink-soft: #333333;
    --red: #111111;
    --rule: #b7b7b7;
  }
  @page { margin: 0.8in 0.85in; }
  body::before,
  body::after,
  .site-header,
  .reading-progress,
  .resume-prompt,
  .speech-reader,
  .chapter-navigation { display: none !important; }
  .chapter-page,
  .chapter-page--field-note { width: auto; margin: 0; padding: 0; }
  .chapter-page--field-note::before,
  .chapter-page--field-note::after { display: none !important; }
  .chapter-page--field-note .chapter-header,
  .chapter-page--field-note .chapter-content { padding: 0; }
  .chapter-header { margin-bottom: 0.45in; }
  .chapter-header h1 { font-size: 28pt; }
  .chapter-subtitle { font-size: 16pt; }
  .chapter-content { font-size: 11.5pt; line-height: 1.55; }
  .chapter-content p { orphans: 3; widows: 3; }
  .chapter-content blockquote { break-inside: avoid; }
  .author-portrait { width: 100%; margin: 0.2in 0 0.35in; transform: none; break-inside: avoid; }
  .author-portrait img { padding: 0; border: 1px solid #999; box-shadow: none; }
  a { color: inherit; text-decoration: none; }
}

/* Scam Romance screenshot chapter */
.scam-gallery {
  width: min(94vw, 66rem);
  margin: 2.1rem 0 0;
  margin-left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.8vw, 1.35rem);
  align-items: start;
}

.scam-shot {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rule) 86%, transparent);
  border-radius: 0.7rem;
  background: var(--paper-raised);
  box-shadow: 0 1.25rem 2.5rem color-mix(in srgb, var(--shadow) 82%, transparent);
  opacity: 0;
  transform: translateY(14px) rotate(-0.35deg);
  transition: opacity 420ms ease, transform 520ms cubic-bezier(.2,.7,.2,1), box-shadow 180ms ease;
}

.scam-shot:nth-child(2) { transform: translateY(14px) rotate(0.45deg); }
.scam-shot:nth-child(3) { transform: translateY(14px) rotate(-0.2deg); }
.scam-shot.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(-0.35deg);
}
.scam-shot:nth-child(2).is-visible { transform: translateY(0) rotate(0.45deg); }
.scam-shot:nth-child(3).is-visible { transform: translateY(0) rotate(-0.2deg); }
.scam-shot:hover {
  z-index: 2;
  box-shadow: 0 1.7rem 3.3rem color-mix(in srgb, var(--shadow) 96%, transparent);
}
.scam-shot img {
  display: block;
  width: 100%;
  height: auto;
}
.scam-gallery-note {
  margin: 0.75rem 0 3.2rem !important;
  color: var(--ink-soft);
  font-family: var(--ui-font);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}
html[data-theme="dark"] .scam-shot {
  border-color: color-mix(in srgb, var(--rule) 92%, transparent);
  background: var(--surface);
}

@media (max-width: 760px) {
  .scam-gallery {
    width: min(92vw, 31rem);
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }
  .scam-shot,
  .scam-shot:nth-child(2),
  .scam-shot:nth-child(3),
  .scam-shot.is-visible,
  .scam-shot:nth-child(2).is-visible,
  .scam-shot:nth-child(3).is-visible {
    transform: none;
  }
  .scam-gallery-note { margin-bottom: 3.8rem !important; }
}

@media (prefers-reduced-motion: reduce) {
  .scam-shot,
  .scam-shot:nth-child(2),
  .scam-shot:nth-child(3) {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .scam-gallery {
    width: 100%;
    margin: 0.25in 0 0;
    transform: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.12in;
    break-inside: avoid;
  }
  .scam-shot,
  .scam-shot:nth-child(2),
  .scam-shot:nth-child(3) {
    opacity: 1;
    transform: none;
    border: 1px solid #bbb;
    box-shadow: none;
  }
  .scam-gallery-note { display: none; }
}

/* Edition 17 structure */
.front-matter-list {
  max-width: 58rem;
  margin: 0 auto 4.5rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.front-matter-list .front-matter-entry {
  max-width: none;
  margin: 0;
  border: 0;
}
.front-matter-list .front-matter-entry + .front-matter-entry {
  border-top: 1px solid var(--rule);
}
.act-heading .act-number { grid-column: 1; }
.act-subtitle,
.act-stage,
.act-tagline { grid-column: 2; }
.act-subtitle {
  margin: 0.55rem 0 0;
  color: var(--red);
  font-family: var(--display-font);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-style: italic;
}
.act-stage {
  margin: 0.75rem 0 0;
  color: var(--ink);
  font-family: var(--ui-font);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.act-heading .act-tagline { margin-top: 0.35rem; }

@media (max-width: 820px) {
  .act-heading .act-number,
  .act-subtitle,
  .act-stage,
  .act-tagline { grid-column: 1; }
}


/* Social sharing, contact, and footer */
.chapter-share {
  margin-top: 1.15rem;
  padding: 0.3rem 0;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--accent-primary) 70%, transparent);
  background: transparent;
  color: var(--link-small);
  cursor: pointer;
  font-family: var(--ui-font);
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.chapter-share:hover { border-bottom-color: var(--accent-primary); color: var(--link-small-hover); }

.site-footer {
  border-top: 1px solid color-mix(in srgb, var(--rule) 88%, transparent);
  background: color-mix(in srgb, var(--paper-raised) 48%, transparent);
}
.site-footer__inner {
  width: min(92vw, 78rem);
  min-height: 5.7rem;
  margin: 0 auto;
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: var(--ink-soft);
  font-family: var(--ui-font);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.site-footer__inner p { margin: 0; }
.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  line-height: 1.5;
}
.footer-brand__mark {
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
  transform: rotate(1.5deg);
}
.site-footer__inner a { color: var(--link-small); text-decoration: none; }
.site-footer__inner a:hover { text-decoration: underline; }

.contact-heading { margin-bottom: 2.5rem; }
.contact-heading h1 { max-width: 11ch; }
.contact-intro {
  max-width: 36rem;
  margin: 1.35rem 0 0;
  color: var(--ink-soft);
  font-size: 1.12rem;
  line-height: 1.65;
}
.contact-form {
  padding: clamp(1.4rem, 4vw, 2.35rem);
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper-raised) 88%, transparent);
  box-shadow: 0 1.4rem 3.2rem color-mix(in srgb, var(--shadow) 78%, transparent);
}
.contact-form__row { margin-bottom: 1.3rem; }
.contact-form label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--ink-soft);
  font-family: var(--ui-font);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 1.05rem;
}
.contact-form input { min-height: 3.15rem; padding: 0.65rem 0.8rem; }
.contact-form textarea { min-height: 12rem; padding: 0.8rem; resize: vertical; line-height: 1.55; }
.contact-form input::placeholder { color: color-mix(in srgb, var(--ink-soft) 70%, transparent); }
.button--solid {
  border: 1px solid var(--cover-red);
  background: var(--cover-red);
  color: var(--surface-raised);
  cursor: pointer;
  transition: background-color 170ms ease, border-color 170ms ease, color 170ms ease, transform 170ms ease;
}
.button--solid:hover {
  border-color: var(--cover-red-bright);
  background: var(--cover-red-bright);
  transform: translateY(-1px);
}
html[data-theme="dark"] .button--solid {
  border-color: var(--cover-yellow);
  background: var(--cover-yellow);
  color: var(--dark-ink);
}
html[data-theme="dark"] .button--solid:hover,
html[data-theme="dark"] .button--solid:focus-visible {
  border-color: var(--cover-yellow-bright);
  background: var(--cover-yellow-bright);
  color: var(--dark-ink);
}
.contact-form__note {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-style: italic;
}
.thank-you-page { min-height: 65vh; }
.thank-you-page .page-heading h1 { max-width: 13ch; }
.thank-you-copy { max-width: 34rem; color: var(--ink-soft); font-size: 1.18rem; line-height: 1.7; }

@media (max-width: 560px) {
  .primary-nav { gap: 0.68rem; }
  .site-footer__inner { align-items: flex-start; flex-direction: column; gap: 0.65rem; }
  .contact-form { padding: 1.2rem; }
}

@media print {
  .chapter-share,
  .site-footer { display: none !important; }
}

/* Edition 17 embedded manuscript artifacts */
.scam-gallery--pair {
  width: min(94vw, 47rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.2vw, 1.6rem);
  margin-top: 2.4rem;
}

.chapter-table-wrap {
  width: min(94vw, 47rem);
  margin: 2.4rem 0 3rem 50%;
  overflow-x: auto;
  transform: translateX(-50%);
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper-raised) 94%, transparent);
  box-shadow: 0 1.15rem 2.5rem color-mix(in srgb, var(--shadow) 68%, transparent);
}
.chapter-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-family: var(--ui-font);
  font-size: 0.84rem;
  line-height: 1.45;
}
.chapter-table th,
.chapter-table td {
  padding: 0.85rem 1rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.chapter-table th:last-child,
.chapter-table td:last-child { border-right: 0; }
.chapter-table tbody tr:last-child td { border-bottom: 0; }
.chapter-table th {
  background: color-mix(in srgb, var(--red) 10%, var(--paper-raised));
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.chapter-table td:first-child {
  color: var(--red);
  font-weight: 700;
}

.letter-artifact {
  width: min(94vw, 58rem);
  margin: 3rem 0 1.1rem 50%;
  transform: translateX(-50%);
}
.letter-artifact__image {
  display: block;
  padding: clamp(0.55rem, 1.5vw, 0.9rem);
  border: 1px solid color-mix(in srgb, var(--rule) 88%, transparent);
  background: var(--cover-cream);
  box-shadow: 0 1.8rem 3.8rem color-mix(in srgb, var(--shadow) 90%, transparent);
  transform: rotate(-0.35deg);
  transition: transform 190ms ease, box-shadow 190ms ease;
}
.letter-artifact__image:hover,
.letter-artifact__image:focus-visible {
  transform: translateY(-2px) rotate(0deg);
  box-shadow: 0 2.1rem 4.4rem color-mix(in srgb, var(--shadow) 100%, transparent);
}
.letter-artifact__image img {
  display: block;
  width: 100%;
  height: auto;
}
.letter-artifact__hint,
.letter-artifact__caption {
  color: var(--ink-soft);
  font-family: var(--ui-font);
  font-size: 0.72rem;
  letter-spacing: 0.055em;
  text-align: center;
  text-transform: uppercase;
}
.letter-artifact__hint { margin-top: 0.85rem; }
.letter-artifact__caption {
  margin: 0.4rem 0 2.1rem !important;
  font-family: var(--body-font);
  font-size: 0.93rem;
  letter-spacing: normal;
  line-height: 1.55;
  text-transform: none;
}
.letter-transcription {
  position: relative;
  margin: 0 0 3.2rem;
  padding: clamp(1.35rem, 3vw, 2rem) clamp(1.35rem, 4vw, 2.35rem);
  border: 0;
  border-left: 3px solid var(--red);
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--yellow) 9%, transparent), transparent 72%),
    color-mix(in srgb, var(--paper-raised) 94%, transparent);
  box-shadow: 0 1.15rem 2.5rem color-mix(in srgb, var(--shadow) 58%, transparent);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 1.04rem;
  font-style: italic;
  line-height: 1.78;
}
.letter-transcription::before {
  content: "THE LETTER";
  display: block;
  margin-bottom: 0.75rem;
  color: var(--red);
  font-family: var(--ui-font);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.13em;
}
.letter-transcription u {
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.17em;
}
html[data-theme="dark"] .letter-artifact__image {
  border-color: color-mix(in srgb, var(--rule) 90%, transparent);
  background: var(--surface-raised);
}
html[data-theme="dark"] .letter-transcription {
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--yellow) 7%, transparent), transparent 72%),
    color-mix(in srgb, var(--paper-raised) 98%, transparent);
}

@media (max-width: 760px) {
  .scam-gallery--pair { width: min(92vw, 31rem); grid-template-columns: 1fr; }
  .chapter-table-wrap { width: min(92vw, 38rem); }
  .letter-artifact { width: min(94vw, 42rem); }
  .letter-transcription { margin-left: -0.25rem; margin-right: -0.25rem; padding: 1.25rem 1.1rem; }
}

@media print {
  .scam-gallery--pair { grid-template-columns: repeat(2, 1fr); }
  .chapter-table-wrap {
    width: 100%;
    margin: 0.2in 0 0.3in;
    overflow: visible;
    transform: none;
    box-shadow: none;
  }
  .chapter-table { min-width: 0; font-size: 8.5pt; }
  .letter-artifact {
    width: 100%;
    margin: 0.25in 0 0.15in;
    transform: none;
    break-inside: avoid;
  }
  .letter-artifact__image { padding: 0; border: 0; box-shadow: none; transform: none; }
  .letter-artifact__hint { display: none; }
  .letter-transcription { box-shadow: none; break-inside: avoid; }
}

/* Dedicated soundtrack controls */
.spotify-open-link,
.soundtrack-entry__spotify {
  color: var(--ink-soft);
  font-family: var(--ui-font);
  font-size: 0.65rem;
  letter-spacing: 0.07em;
  text-decoration-color: var(--accent-primary);
  text-transform: uppercase;
  white-space: nowrap;
}
.spotify-open-link:hover,
.soundtrack-entry__spotify:hover { color: var(--link-small-hover); }
.playlist-embed iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
  border-radius: 10px;
}

/* Dedicated soundtrack page */
.soundtrack-page {
  width: min(91vw, 69rem);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) 0 6rem;
}
.soundtrack-heading { max-width: 49rem; }
.soundtrack-intro {
  max-width: 42rem;
  margin: 1.35rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 2.3vw, 1.28rem);
  line-height: 1.65;
}
.playlist-feature {
  position: relative;
  margin: clamp(3rem, 7vw, 5.5rem) 0 clamp(5rem, 9vw, 7.5rem);
  padding: clamp(1.4rem, 4vw, 2.25rem);
  display: grid;
  grid-template-columns: minmax(14rem, 0.72fr) minmax(18rem, 1.28fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  border: 1px solid var(--rule);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--red) 7%, transparent), transparent 46%),
    color-mix(in srgb, var(--paper-raised) 92%, transparent);
  box-shadow: 0 1.65rem 3.6rem color-mix(in srgb, var(--shadow) 68%, transparent);
}
.playlist-feature::before {
  content: "";
  position: absolute;
  left: clamp(1.4rem, 4vw, 2.25rem);
  right: clamp(1.4rem, 4vw, 2.25rem);
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red) 0 70%, var(--yellow) 70% 78%, transparent 78%);
}
.playlist-feature__copy h2 {
  margin: 0.65rem 0 0;
  font-family: var(--display-font);
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  font-weight: 400;
  line-height: 1;
}
.playlist-feature__copy h2 span {
  display: block;
  margin-top: 0.3rem;
  color: var(--red);
  font-size: 0.62em;
  font-style: italic;
}
.playlist-feature__copy > p:not(.playlist-feature__eyebrow) {
  margin: 1rem 0 1.25rem;
  color: var(--ink-soft);
  font-style: italic;
}
.spotify-open-link--playlist { color: var(--link-small); }
.playlist-embed { min-width: 0; }

.soundtrack-section-heading {
  display: grid;
  grid-template-columns: 8.2rem 1fr;
  gap: 1.25rem;
  align-items: baseline;
  margin-bottom: 1.5rem;
}
.soundtrack-section-heading .eyebrow { margin: 0; }
.soundtrack-section-heading h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(2rem, 4vw, 3.15rem);
  font-weight: 400;
}
.soundtrack-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: soundtrack;
}
.soundtrack-list--bonus { margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.soundtrack-entry {
  padding: clamp(1.35rem, 3vw, 2rem) 0;
  display: grid;
  grid-template-columns: minmax(18rem, 0.85fr) minmax(20rem, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--rule);
}
.soundtrack-entry:last-child { border-bottom: 1px solid var(--rule); }
.soundtrack-entry__chapter {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  text-decoration: none;
}
.soundtrack-entry__number {
  color: var(--red);
  font-family: var(--display-font);
  font-size: 1.55rem;
  line-height: 1;
}
.soundtrack-entry__chapter-copy { display: flex; flex-direction: column; gap: 0.18rem; }
.soundtrack-entry__label {
  color: var(--ink-soft);
  font-family: var(--ui-font);
  font-size: 0.61rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.soundtrack-entry__chapter-title {
  font-family: var(--display-font);
  font-size: 1.35rem;
  line-height: 1.13;
}
.soundtrack-entry__chapter:hover .soundtrack-entry__chapter-title { color: var(--accent-primary); }
.soundtrack-entry__track {
  margin: 0;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 1.25rem;
  line-height: 1.2;
}
.soundtrack-entry__track span {
  color: var(--red);
  font-size: 0.8em;
  font-style: italic;
}
.soundtrack-entry__blurb {
  margin: 0.55rem 0 0.75rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
  font-style: italic;
  line-height: 1.55;
}

html[data-theme="dark"] .playlist-feature {
  background:
    linear-gradient(112deg, color-mix(in srgb, var(--yellow) 5%, transparent), transparent 52%),
    color-mix(in srgb, var(--paper-raised) 97%, transparent);
}

@media (max-width: 760px) {
  .playlist-feature { grid-template-columns: 1fr; }
  .soundtrack-section-heading { grid-template-columns: 1fr; gap: 0.35rem; }
  .soundtrack-entry { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 560px) {
  .primary-nav { gap: 0.64rem; font-size: 0.63rem; }
  .soundtrack-page { width: min(88vw, 40rem); }
  .playlist-feature { margin-top: 2.7rem; padding: 1.15rem; }
  .playlist-embed iframe { height: 352px; }
  .soundtrack-entry__chapter { grid-template-columns: 2.65rem minmax(0, 1fr); gap: 0.7rem; }
  .soundtrack-entry__number { font-size: 1.25rem; }
}

@media print {
  .playlist-embed { display: none !important; }
  .soundtrack-page { width: 100%; padding: 0; }
  .playlist-feature { box-shadow: none; }
  .soundtrack-entry { break-inside: avoid; }
}

@media (max-width: 560px) {
  .site-header__inner { gap: 0.45rem; }
  .primary-nav { gap: 0.45rem; font-size: 0.57rem; }
  .reading-settings > summary { min-width: 2rem; min-height: 2rem; }
}

@media (max-width: 350px) {
  .brand { display: none; }
  .site-header__inner { justify-content: center; }
}

/* Private manuscript preview */
.preview-notice {
  margin: 2rem 0 clamp(3rem, 7vw, 5rem);
  padding: clamp(1.1rem, 3vw, 1.55rem) clamp(1.1rem, 4vw, 1.7rem);
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--red);
  background: color-mix(in srgb, var(--paper-raised) 94%, transparent);
  box-shadow: 0 1rem 2.35rem color-mix(in srgb, var(--shadow) 42%, transparent);
}
.preview-notice p { margin: 0; color: var(--ink-soft); }
.preview-notice__title { margin-bottom: 0.22rem !important; color: var(--ink) !important; font-family: var(--display-font); font-size: clamp(1.2rem, 2.8vw, 1.55rem); }
.toc-entry.is-protected,
.front-matter-entry.is-protected { position: relative; }
.chapter-lock-link {
  display: inline-block;
  margin: -0.4rem 0 1.15rem;
  color: var(--ink-soft);
  font-family: var(--ui-font);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration-color: var(--accent-primary);
}
.chapter-lock-link:hover { color: var(--link-small-hover); }

.access-brand__icon { display: block; width: 2rem; height: 2rem; }
.access-theme-symbol { font-size: 1.15rem; line-height: 1; }
.access-page {
  width: min(90vw, 57rem);
  min-height: calc(100vh - 12rem);
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(5rem, 10vw, 8rem);
  display: grid;
  place-items: center;
}
.access-card {
  position: relative;
  width: min(100%, 46rem);
  padding: clamp(1.8rem, 5vw, 3.8rem);
  border: 1px solid var(--rule);
  background:
    linear-gradient(125deg, color-mix(in srgb, var(--red) 6%, transparent), transparent 54%),
    color-mix(in srgb, var(--paper-raised) 96%, transparent);
  box-shadow: 0 1.8rem 4.5rem color-mix(in srgb, var(--shadow) 70%, transparent);
}
.access-card::before {
  content: "";
  position: absolute;
  left: clamp(1.8rem, 5vw, 3.8rem);
  right: clamp(1.8rem, 5vw, 3.8rem);
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red) 0 69%, var(--yellow) 69% 77%, transparent 77%);
}
.access-card h1 {
  max-width: 11ch;
  margin: 0.55rem 0 0;
  font-family: var(--display-font);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.025em;
}
.access-card__chapter {
  margin: 0 0 1.2rem;
  color: var(--red);
  font-family: var(--ui-font);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.access-card__lead {
  margin: 1.4rem 0 2rem;
  color: var(--ink-soft);
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-style: italic;
}
.access-form { margin: 0 0 1.25rem; }
.access-form label {
  display: block;
  margin-bottom: 0.52rem;
  color: var(--ink-soft);
  font-family: var(--ui-font);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.access-form__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.7rem; }
.access-form input,
.admin-create input,
.admin-create select {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.72rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
.access-form input:focus,
.admin-create input:focus,
.admin-create select:focus { outline: 2px solid color-mix(in srgb, var(--accent-primary) 74%, transparent); outline-offset: 2px; }
.access-error,
.admin-notice {
  margin: 0 0 1.2rem;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--red);
  background: color-mix(in srgb, var(--red) 8%, transparent);
  color: var(--ink);
}
.access-card__aside { margin: 1rem 0 1.1rem; color: var(--ink-soft); font-style: italic; }
.access-privacy { max-width: 38rem; margin: 2.3rem 0 0; color: var(--ink-soft); font-family: var(--ui-font); font-size: 0.68rem; line-height: 1.55; }

.admin-page { width: min(94vw, 80rem); margin: 0 auto; padding: clamp(3.5rem, 7vw, 6rem) 0 7rem; }
.admin-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: flex-start; margin-bottom: 2rem; }
.admin-heading h1 { margin: 0.4rem 0 0.8rem; font-family: var(--display-font); font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 400; line-height: 0.95; }
.admin-heading p { max-width: 48rem; color: var(--ink-soft); }
.admin-heading__links { display: flex; gap: 1rem; flex-wrap: wrap; padding-top: 0.6rem; font-family: var(--ui-font); font-size: 0.67rem; letter-spacing: 0.08em; text-transform: uppercase; }
.admin-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 2rem 0; border: 1px solid var(--rule); background: var(--rule); }
.admin-summary > div { padding: 1.25rem; background: var(--paper-raised); }
.admin-summary strong { display: block; color: var(--red); font-family: var(--display-font); font-size: 2.35rem; font-weight: 400; }
.admin-summary span { color: var(--ink-soft); font-family: var(--ui-font); font-size: 0.65rem; letter-spacing: 0.06em; text-transform: uppercase; }
.admin-panel { margin-top: 2rem; padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid var(--rule); background: color-mix(in srgb, var(--paper-raised) 96%, transparent); box-shadow: 0 1rem 2.5rem color-mix(in srgb, var(--shadow) 35%, transparent); }
.admin-panel h2 { margin: 0 0 1.2rem; font-family: var(--display-font); font-size: 2rem; font-weight: 400; }
.admin-panel__heading { display: flex; justify-content: space-between; gap: 1.5rem; align-items: baseline; }
.admin-panel__heading p { max-width: 38rem; color: var(--ink-soft); font-size: 0.86rem; }
.admin-create { display: grid; grid-template-columns: minmax(14rem, 1.5fr) minmax(12rem, 1fr) auto; gap: 1rem; align-items: end; }
.admin-create label { color: var(--ink-soft); font-family: var(--ui-font); font-size: 0.65rem; letter-spacing: 0.07em; text-transform: uppercase; }
.admin-create label input,
.admin-create label select { margin-top: 0.45rem; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; min-width: 57rem; border-collapse: collapse; font-size: 0.86rem; }
.admin-table th,
.admin-table td { padding: 0.85rem 0.75rem; border-top: 1px solid var(--rule); text-align: left; vertical-align: top; }
.admin-table th { color: var(--ink-soft); font-family: var(--ui-font); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; }
.admin-muted { display: block; margin-top: 0.2rem; color: var(--ink-soft); font-size: 0.72rem; }
.admin-status { display: inline-block; padding: 0.22rem 0.48rem; font-family: var(--ui-font); font-size: 0.57rem; letter-spacing: 0.08em; text-transform: uppercase; }
.admin-status--on { background: color-mix(in srgb, #3d8a57 16%, transparent); color: #2f7448; }
.admin-status--off { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.admin-actions { display: flex; gap: 0.5rem; align-items: flex-start; }
.admin-actions form { margin: 0; }
.admin-actions button,
.admin-copy { padding: 0.45rem 0.65rem; border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer; font-family: var(--ui-font); font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase; }
.admin-actions button:hover,
.admin-copy:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

html[data-theme="dark"] .access-card,
html[data-theme="dark"] .admin-panel { background: color-mix(in srgb, var(--paper-raised) 98%, transparent); }
html[data-theme="dark"] .admin-status--on { color: #8bd1a1; }

@media (max-width: 760px) {
  .preview-notice { align-items: flex-start; flex-direction: column; }
  .toc-lock__shackle { transition: none; }
  .toc-entry.is-protected:hover .toc-lock__shackle,
  .toc-entry.is-protected:focus-visible .toc-lock__shackle,
  .front-matter-entry.is-protected:hover .toc-lock__shackle,
  .front-matter-entry.is-protected:focus-visible .toc-lock__shackle { transform: none; }
  .access-form__row { grid-template-columns: 1fr; }
  .access-form__row .button { width: 100%; }
  .admin-heading { flex-direction: column; }
  .admin-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-create { grid-template-columns: 1fr; }
  .admin-panel__heading { display: block; }
}

@media (hover: none) {
  .toc-lock__shackle { transition: none; }
  .toc-entry.is-protected:hover .toc-lock__shackle,
  .toc-entry.is-protected:focus-visible .toc-lock__shackle,
  .front-matter-entry.is-protected:hover .toc-lock__shackle,
  .front-matter-entry.is-protected:focus-visible .toc-lock__shackle { transform: none; }
}

@media (max-width: 520px) {
  .access-card { padding: 1.45rem; }
  .access-card::before { left: 1.45rem; right: 1.45rem; }
  .access-card h1 { font-size: clamp(2.8rem, 15vw, 4.2rem); }
  .admin-summary { grid-template-columns: 1fr 1fr; }
}

@media print {
  .preview-notice,
  .chapter-lock-link { display: none !important; }
}
