:root {
  --paper: #f2eee3;
  --paper-deep: #e8e0d1;
  --paper-light: #faf8f1;
  --ink: #1c1b18;
  --ink-soft: #403d36;
  --muted: #777064;
  --line: #d0c6b6;
  --red: #a33a2d;
  --red-dark: #74271f;
  --green: #263733;
  --green-soft: #4d615b;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "Noto Sans SC", "PingFang SC", sans-serif;
  --display: "Cormorant Garamond", Georgia, serif;
  --max: 1240px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 13% 12%, rgba(255, 255, 255, .75), transparent 29rem),
    linear-gradient(135deg, var(--paper-light), var(--paper) 42%, var(--paper-deep));
  font-family: var(--serif);
  min-height: 100vh;
}

body.reader-mode {
  background: var(--reader-bg, #f7f2e7);
}

body.reader-mode .site-header,
body.reader-mode .site-footer {
  display: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-grain {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.site-header {
  position: relative;
  z-index: 30;
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  width: 29px;
  height: 37px;
  position: relative;
  display: block;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 35px;
  top: 1px;
  border: 1px solid var(--ink);
}

.brand-mark::before {
  left: 2px;
  transform: skewY(-11deg);
}

.brand-mark::after {
  right: 2px;
  transform: skewY(11deg);
}

.brand-mark i {
  position: absolute;
  z-index: 2;
  width: 1px;
  background: var(--red);
  left: 50%;
  transform: translateX(-50%);
}

.brand-mark i:first-child {
  height: 31px;
  top: 3px;
}

.brand-mark i:last-child {
  height: 5px;
  bottom: -2px;
  width: 5px;
  border-radius: 50%;
}

.brand strong {
  display: block;
  font-size: 18px;
  letter-spacing: .14em;
  font-weight: 700;
}

.brand small {
  display: block;
  margin-top: 1px;
  font-family: var(--display);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 38px;
  font-family: var(--sans);
  font-size: 14px;
}

.main-nav a {
  position: relative;
  padding: 34px 0 32px;
  color: var(--muted);
  transition: color .25s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -1px;
  height: 2px;
  background: var(--red);
  transition: right .35s var(--ease);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--ink);
}

.main-nav a.active::after,
.main-nav a:hover::after {
  right: 0;
}

.menu-button {
  display: none;
  border: 0;
  background: transparent;
  width: 44px;
  height: 44px;
  padding: 13px 8px;
}

.menu-button span {
  display: block;
  height: 1px;
  margin: 6px 0;
  background: var(--ink);
}

#app {
  min-height: calc(100vh - 190px);
}

.page-shell {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  color: var(--red);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
}

.hero {
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
  align-items: center;
  gap: clamp(50px, 8vw, 120px);
  padding: 72px 0 90px;
}

.hero-copy {
  align-self: center;
  animation: rise-in .9s var(--ease) both;
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(50px, 6.6vw, 94px);
  line-height: 1.08;
  letter-spacing: -.045em;
  font-weight: 900;
  text-wrap: balance;
}

.hero h1 .outline {
  color: transparent;
  -webkit-text-stroke: 1px var(--ink);
}

.hero-lead {
  max-width: 630px;
  margin: 34px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 2;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 42px;
}

.primary-link,
.secondary-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
}

.primary-link {
  padding: 0 26px;
  color: var(--paper-light);
  background: var(--ink);
  border: 1px solid var(--ink);
  transition: background .25s ease, transform .25s var(--ease);
}

.primary-link:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-2px);
}

.secondary-link {
  position: relative;
  color: var(--ink);
}

.secondary-link::after {
  content: "";
  position: absolute;
  height: 1px;
  left: 0;
  right: 0;
  bottom: 8px;
  background: var(--ink);
  transform-origin: right;
  transition: transform .3s var(--ease);
}

.secondary-link:hover::after {
  transform: scaleX(.35);
}

.hero-art {
  min-height: 560px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  animation: rise-in 1s .15s var(--ease) both;
}

.river-orbit {
  position: absolute;
  width: min(100%, 530px);
  aspect-ratio: 1;
  border: 1px solid rgba(28, 27, 24, .2);
  border-radius: 50%;
}

.river-orbit::before,
.river-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(28, 27, 24, .13);
}

.river-orbit::before {
  inset: 8%;
}

.river-orbit::after {
  inset: 18%;
}

.river-line {
  position: absolute;
  width: 140%;
  height: 150px;
  left: -20%;
  top: 48%;
  transform: rotate(-11deg);
  opacity: .55;
  background: repeating-radial-gradient(ellipse at center, transparent 0 11px, rgba(38, 55, 51, .25) 12px 13px, transparent 14px 24px);
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
  animation: drift 10s linear infinite;
}

.book-cover {
  width: min(68%, 320px);
  aspect-ratio: .68;
  position: relative;
  z-index: 2;
  padding: 38px 32px;
  color: #eee8da;
  background:
    linear-gradient(104deg, transparent 0 43%, rgba(255, 255, 255, .05) 43.2% 44%, transparent 44.2%),
    linear-gradient(156deg, #21312d, #15201e 68%, #101714);
  box-shadow: 24px 28px 0 rgba(163, 58, 45, .16), 0 34px 70px rgba(26, 24, 20, .28);
  transform: rotate(2deg);
  transition: transform .55s var(--ease), box-shadow .55s var(--ease);
}

.book-cover:hover {
  transform: rotate(0) translateY(-8px);
  box-shadow: 17px 23px 0 rgba(163, 58, 45, .24), 0 42px 80px rgba(26, 24, 20, .32);
}

.book-cover::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(242, 238, 227, .26);
}

.book-cover::after {
  content: "";
  position: absolute;
  width: 54%;
  height: 1px;
  right: -8%;
  top: 53%;
  background: var(--red);
  transform: rotate(-38deg);
  box-shadow: 0 7px 0 rgba(163, 58, 45, .38), 0 -7px 0 rgba(163, 58, 45, .38);
}

.cover-index {
  position: absolute;
  left: 31px;
  bottom: 29px;
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: .13em;
  opacity: .65;
}

.cover-title {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 1.2em;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: .15em;
}

.cover-note {
  position: absolute;
  z-index: 2;
  right: 27px;
  top: 34px;
  writing-mode: vertical-rl;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .24em;
  color: rgba(238, 232, 218, .62);
}

.section {
  padding: 104px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .55fr);
  gap: 60px;
  align-items: end;
  margin-bottom: 56px;
}

.section-heading h2,
.page-heading h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 70px);
  line-height: 1.15;
  letter-spacing: -.04em;
  font-weight: 800;
}

.section-heading p,
.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.featured-work {
  display: grid;
  grid-template-columns: 140px minmax(0, .8fr) minmax(300px, 1.2fr) 90px;
  gap: 34px;
  align-items: center;
  padding: 38px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  transition: padding .35s var(--ease), background .35s ease;
}

.featured-work:hover {
  padding-left: 20px;
  padding-right: 20px;
  background: rgba(255, 255, 255, .34);
}

.work-number {
  font-family: var(--display);
  font-size: 62px;
  line-height: 1;
  color: var(--red);
}

.work-title h3 {
  margin: 0;
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 700;
}

.work-title p {
  margin: 8px 0 0;
  font-family: var(--sans);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .1em;
}

.work-summary {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.9;
}

.work-arrow {
  justify-self: end;
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: 20px;
  transition: color .25s ease, background .25s ease, transform .35s var(--ease);
}

.featured-work:hover .work-arrow {
  color: var(--paper);
  background: var(--red);
  border-color: var(--red);
  transform: rotate(-20deg);
}

.future-work {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 34px;
  align-items: center;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.future-work .work-number {
  color: var(--line);
}

.future-work h3 {
  margin: 0 0 6px;
  color: var(--ink-soft);
  font-size: 22px;
}

.future-work p {
  margin: 0;
  font-size: 14px;
}

.future-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.quote-band {
  position: relative;
  overflow: hidden;
  color: var(--paper-light);
  background: var(--green);
  padding: 110px 0 118px;
}

.quote-band::before {
  content: "RIVER / CHOICE / MEMORY";
  position: absolute;
  white-space: nowrap;
  left: -2vw;
  bottom: -30px;
  font-family: var(--display);
  font-size: clamp(90px, 15vw, 220px);
  letter-spacing: -.03em;
  color: rgba(255, 255, 255, .035);
}

.quote-band blockquote {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0;
  font-size: clamp(30px, 4vw, 55px);
  line-height: 1.55;
  font-weight: 500;
  text-wrap: balance;
}

.quote-band cite {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 34px;
  color: #b8c5be;
  font-family: var(--sans);
  font-size: 12px;
  font-style: normal;
  letter-spacing: .2em;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.principle {
  min-height: 300px;
  padding: 36px;
  background: rgba(250, 248, 241, .72);
}

.principle span {
  display: block;
  font-family: var(--display);
  color: var(--red);
  font-size: 34px;
}

.principle h3 {
  margin: 54px 0 18px;
  font-size: 24px;
}

.principle p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.page-heading {
  padding: 96px 0 68px;
  display: grid;
  grid-template-columns: 1fr minmax(280px, .6fr);
  align-items: end;
  gap: 70px;
}

.library-list {
  padding-bottom: 110px;
}

.library-card {
  display: grid;
  grid-template-columns: 88px minmax(240px, .65fr) minmax(300px, 1fr) auto;
  gap: 36px;
  align-items: center;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.library-card:last-child {
  border-bottom: 1px solid var(--line);
}

.library-card .status {
  justify-self: start;
  padding: 6px 9px;
  color: var(--red-dark);
  border: 1px solid rgba(163, 58, 45, .4);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .12em;
}

.library-card h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
}

.library-card .serial-title {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.library-card .summary {
  color: var(--ink-soft);
  line-height: 1.9;
}

.library-card .meta {
  text-align: right;
  font-family: var(--sans);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.book-hero {
  display: grid;
  grid-template-columns: minmax(290px, .52fr) minmax(0, 1fr);
  gap: clamp(55px, 8vw, 120px);
  align-items: center;
  padding: 90px 0 100px;
}

.book-mini-cover {
  width: min(100%, 380px);
  justify-self: center;
  aspect-ratio: .7;
  padding: 48px 40px;
  position: relative;
  color: var(--paper-light);
  background: linear-gradient(150deg, #2d403b, #17221f 72%);
  box-shadow: 25px 26px 0 rgba(163, 58, 45, .18), 0 40px 70px rgba(28, 27, 24, .22);
}

.book-mini-cover::before {
  content: "";
  position: absolute;
  inset: 17px;
  border: 1px solid rgba(255, 255, 255, .22);
}

.book-mini-cover strong {
  position: relative;
  z-index: 2;
  display: block;
  width: 1.2em;
  font-size: clamp(38px, 5vw, 55px);
  line-height: 1.12;
  letter-spacing: .12em;
}

.book-mini-cover small {
  position: absolute;
  z-index: 2;
  right: 31px;
  bottom: 35px;
  writing-mode: vertical-rl;
  font-family: var(--sans);
  letter-spacing: .15em;
  opacity: .65;
}

.book-info .book-kicker {
  color: var(--red);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .2em;
}

.book-info h1 {
  margin: 18px 0 8px;
  font-size: clamp(46px, 6vw, 84px);
  line-height: 1.12;
  letter-spacing: -.045em;
}

.book-info .serial-title {
  color: var(--muted);
  font-size: 15px;
}

.book-info .description {
  max-width: 720px;
  margin: 36px 0 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 2;
}

.book-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 42px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.book-metrics div {
  min-width: 140px;
  padding: 18px 28px 18px 0;
  margin-right: 28px;
}

.book-metrics strong {
  display: block;
  font-family: var(--display);
  font-size: 31px;
  font-weight: 600;
}

.book-metrics span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .12em;
}

.chapters-section {
  padding: 92px 0 120px;
  border-top: 1px solid var(--line);
}

.volume {
  display: grid;
  grid-template-columns: minmax(190px, .35fr) 1fr;
  gap: 60px;
  padding: 46px 0;
  border-bottom: 1px solid var(--line);
}

.volume-label {
  position: sticky;
  top: 32px;
  align-self: start;
}

.volume-label span {
  display: block;
  color: var(--red);
  font-family: var(--display);
  font-size: 18px;
}

.volume-label h2 {
  margin: 10px 0 0;
  font-size: 27px;
  line-height: 1.4;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
}

.chapter-link {
  min-height: 65px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid rgba(208, 198, 182, .7);
  transition: color .2s ease, padding .3s var(--ease);
}

.chapter-link:hover {
  color: var(--red-dark);
  padding-left: 8px;
}

.chapter-link span {
  width: 27px;
  flex: 0 0 auto;
  font-family: var(--display);
  color: var(--muted);
  font-size: 15px;
}

.chapter-link strong {
  font-size: 15px;
  font-weight: 500;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, .65fr) minmax(420px, 1fr);
  gap: 100px;
  padding: 100px 0 130px;
}

.about-layout .statement {
  position: sticky;
  top: 50px;
  align-self: start;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -.04em;
}

.about-copy {
  font-size: 18px;
  line-height: 2.15;
}

.about-copy p {
  margin: 0 0 32px;
}

.about-copy .red-line {
  width: 70px;
  height: 3px;
  margin: 58px 0;
  background: var(--red);
}

.reader-page {
  --reader-bg: #f7f2e7;
  --reader-ink: #25221d;
  min-height: 100vh;
  color: var(--reader-ink);
  background: var(--reader-bg);
  transition: color .25s ease, background .25s ease;
}

.reader-page.theme-night {
  --reader-bg: #1b211f;
  --reader-ink: #d9d3c5;
}

.reader-progress {
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: rgba(163, 58, 45, .16);
}

.reader-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--red);
}

.reader-topbar {
  position: sticky;
  z-index: 40;
  top: 3px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 70px;
  padding: 0 34px;
  color: var(--reader-ink);
  background: color-mix(in srgb, var(--reader-bg) 90%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--reader-ink) 14%, transparent);
}

.reader-topbar a,
.reader-topbar button {
  color: inherit;
}

.reader-back {
  justify-self: start;
  font-family: var(--sans);
  font-size: 13px;
}

.reader-book-title {
  font-size: 13px;
  letter-spacing: .08em;
}

.reader-menu-toggle {
  justify-self: end;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.reader-menu-toggle::before,
.reader-menu-toggle::after {
  content: "";
  display: block;
  width: 20px;
  height: 1px;
  margin: 6px auto;
  background: currentColor;
}

.reader-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 760px) minmax(110px, 180px);
  justify-content: center;
  gap: clamp(30px, 5vw, 76px);
  width: min(calc(100% - 48px), 1480px);
  margin: 0 auto;
}

.reader-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 36px 10px 50px 0;
  scrollbar-width: thin;
}

.reader-toc h2 {
  margin: 0 0 20px;
  font-size: 15px;
}

.reader-toc a {
  display: block;
  padding: 9px 0;
  color: color-mix(in srgb, var(--reader-ink) 62%, transparent);
  font-size: 12px;
  line-height: 1.55;
}

.reader-toc a.active,
.reader-toc a:hover {
  color: var(--red);
}

.reader-article {
  padding: 88px 0 130px;
  min-width: 0;
}

.reader-article header {
  margin-bottom: 66px;
  text-align: center;
}

.reader-article header span {
  display: block;
  color: var(--red);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .2em;
}

.reader-article h1 {
  margin: 20px 0 14px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.35;
  font-weight: 700;
}

.reader-article .chapter-count {
  color: color-mix(in srgb, var(--reader-ink) 50%, transparent);
  font-family: var(--sans);
  font-size: 11px;
}

.chapter-body {
  font-size: var(--reader-font-size, 19px);
  line-height: 2.05;
  letter-spacing: .02em;
}

.chapter-body p {
  margin: 0 0 1.18em;
  text-indent: 2em;
  text-align: justify;
  text-wrap: pretty;
}

.chapter-body .scene-break {
  margin: 3.2em 0;
  text-indent: 0;
  text-align: center;
  letter-spacing: .55em;
  color: var(--red);
}

.reader-chapter-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 90px;
  padding-top: 34px;
  border-top: 1px solid color-mix(in srgb, var(--reader-ink) 16%, transparent);
}

.reader-chapter-nav a {
  min-height: 92px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--reader-ink) 16%, transparent);
  transition: border-color .25s ease, transform .3s var(--ease);
}

.reader-chapter-nav a:hover {
  border-color: var(--red);
  transform: translateY(-3px);
}

.reader-chapter-nav a:last-child {
  text-align: right;
}

.reader-chapter-nav small {
  display: block;
  margin-bottom: 8px;
  color: color-mix(in srgb, var(--reader-ink) 50%, transparent);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .12em;
}

.reader-chapter-nav strong {
  font-size: 14px;
  font-weight: 500;
}

.reader-tools {
  position: sticky;
  top: 105px;
  align-self: start;
  padding-top: 28px;
}

.reader-tool {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  color: var(--reader-ink);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--reader-ink) 18%, transparent);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.reader-tool:hover {
  color: var(--reader-bg);
  background: var(--reader-ink);
  border-color: var(--reader-ink);
}

.reader-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 58;
  display: none;
  background: rgba(0, 0, 0, .35);
}

.reader-drawer-backdrop.open {
  display: block;
}

.reader-drawer {
  position: fixed;
  z-index: 60;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(88vw, 390px);
  padding: 80px 30px 40px;
  color: var(--reader-ink);
  background: var(--reader-bg);
  box-shadow: -20px 0 60px rgba(0, 0, 0, .18);
  transform: translateX(102%);
  transition: transform .4s var(--ease);
  overflow: auto;
}

.reader-drawer.open {
  transform: translateX(0);
}

.reader-drawer a {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--reader-ink) 12%, transparent);
  font-size: 14px;
}

.reader-drawer a.active {
  color: var(--red);
}

.reader-drawer-close {
  position: absolute;
  right: 24px;
  top: 22px;
  width: 44px;
  height: 44px;
  color: inherit;
  background: transparent;
  border: 0;
  font-size: 24px;
}

.empty-state,
.loading-state {
  min-height: 70vh;
  display: grid;
  place-content: center;
  text-align: center;
}

.loading-state p,
.empty-state p {
  color: var(--muted);
}

.loading-line {
  width: 80px;
  height: 1px;
  margin: 0 auto 20px;
  overflow: hidden;
  position: relative;
  background: var(--line);
}

.loading-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red);
  animation: loading 1.2s ease-in-out infinite;
}

.site-footer {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  padding: 36px 0 48px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes drift {
  from { background-position: 0 0; }
  to { background-position: 120px 0; }
}

@keyframes loading {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr .8fr;
    gap: 50px;
  }

  .hero h1 {
    font-size: clamp(50px, 7vw, 74px);
  }

  .featured-work,
  .library-card {
    grid-template-columns: 80px minmax(220px, .8fr) 1fr;
  }

  .work-arrow,
  .library-card .meta {
    display: none;
  }

  .reader-layout {
    grid-template-columns: minmax(0, 760px) 84px;
  }

  .reader-toc {
    display: none;
  }
}

@media (max-width: 780px) {
  .site-header {
    min-height: 72px;
  }

  .menu-button {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 71px;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 12px 0 20px;
    background: color-mix(in srgb, var(--paper-light) 96%, transparent);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity .25s ease, transform .3s var(--ease);
  }

  .main-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .main-nav a {
    padding: 14px 2px;
  }

  .main-nav a::after {
    display: none;
  }

  .page-shell,
  .site-header,
  .site-footer {
    width: min(calc(100% - 32px), var(--max));
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 64px 0 72px;
  }

  .hero-art {
    min-height: 490px;
    order: -1;
  }

  .book-cover {
    width: 230px;
  }

  .hero h1 {
    font-size: clamp(45px, 14vw, 70px);
  }

  .hero-lead {
    font-size: 16px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .secondary-link {
    min-height: 44px;
    justify-content: flex-start;
    width: max-content;
  }

  .section {
    padding: 75px 0;
  }

  .section-heading,
  .page-heading {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .featured-work,
  .library-card {
    grid-template-columns: 55px 1fr;
    gap: 20px;
  }

  .work-summary,
  .library-card .summary {
    grid-column: 2;
  }

  .work-number {
    font-size: 42px;
  }

  .future-work {
    grid-template-columns: 55px 1fr;
    gap: 20px;
  }

  .future-label {
    display: none;
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }

  .principle {
    min-height: 230px;
  }

  .principle h3 {
    margin-top: 36px;
  }

  .quote-band {
    padding: 80px 0;
  }

  .page-heading {
    padding: 72px 0 50px;
  }

  .book-hero {
    grid-template-columns: 1fr;
    padding: 70px 0 80px;
  }

  .book-mini-cover {
    max-width: 280px;
  }

  .book-info h1 {
    font-size: 48px;
  }

  .volume {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .volume-label {
    position: static;
  }

  .chapter-grid {
    grid-template-columns: 1fr;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 50px;
    padding: 72px 0 90px;
  }

  .about-layout .statement {
    position: static;
  }

  .reader-topbar {
    grid-template-columns: 1fr auto;
    padding: 0 14px;
  }

  .reader-book-title {
    display: none;
  }

  .reader-layout {
    display: block;
    width: min(calc(100% - 36px), 720px);
  }

  .reader-tools {
    position: fixed;
    z-index: 45;
    left: 50%;
    bottom: 16px;
    top: auto;
    display: flex;
    gap: 8px;
    padding: 7px;
    border: 1px solid color-mix(in srgb, var(--reader-ink) 15%, transparent);
    background: color-mix(in srgb, var(--reader-bg) 92%, transparent);
    backdrop-filter: blur(16px);
    transform: translateX(-50%);
  }

  .reader-tool {
    width: 42px;
    height: 42px;
    margin: 0;
  }

  .reader-article {
    padding: 68px 0 130px;
  }

  .chapter-body {
    font-size: var(--reader-font-size, 18px);
    line-height: 2;
  }

  .reader-chapter-nav {
    grid-template-columns: 1fr;
  }

  .reader-chapter-nav a:last-child {
    text-align: left;
  }

  .site-footer {
    gap: 20px;
    flex-direction: column;
  }
}

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