:root {
  --paper: #ffffff;
  --paper-2: #f4f4f4;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --faint: #a3a3a3;
  --rule: #e6e6e6;
  --plank: #d6d6d6;
  --accent: #8a3b2e;
  --mark: #f1d88a;
  --shadow: 0 1px 0 rgba(0,0,0,.04), 0 8px 24px -12px rgba(0,0,0,.22);
  --sans: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  color-scheme: light;
}
/* Dark: follows the system unless the toggle has pinned a theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16140f;
    --paper-2: #1f1c16;
    --text: #ece6d8;
    --muted: #9c9586;
    --faint: #6c665a;
    --rule: #332f27;
    --plank: #3b362c;
    --accent: #e0927f;
    --mark: #6b5718;
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 10px 28px -12px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #16140f;
  --paper-2: #1f1c16;
  --text: #ece6d8;
  --muted: #9c9586;
  --faint: #6c665a;
  --rule: #332f27;
  --plank: #3b362c;
  --accent: #e0927f;
  --mark: #6b5718;
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 10px 28px -12px rgba(0,0,0,.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eyebrow { font: 400 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---------- header / footer ---------- */
.site-head { display: flex; align-items: baseline; justify-content: space-between; padding-top: 28px; padding-bottom: 28px; }
.brand { font: 500 13px var(--mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.site-head nav { display: flex; gap: 22px; }
.site-head nav a { font: 400 13px var(--mono); text-decoration: none; color: var(--muted); padding: 4px 0; border-bottom: 1px solid transparent; }
.site-head nav a:hover { color: var(--text); }
.site-head nav a[aria-current] { color: var(--text); border-bottom-color: currentColor; }
.site-head nav { align-items: center; }
.theme-toggle { display: inline-grid; place-items: center; width: 30px; height: 30px; margin: -6px -6px -6px 0; padding: 0; background: none; border: 0; border-radius: 99px; color: var(--muted); cursor: pointer; transition: color .2s, background .2s; }
.theme-toggle:hover { color: var(--text); background: var(--paper-2); }
.theme-toggle svg { width: 16px; height: 16px; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle svg { transform: rotate(-20deg); }
.site-foot { display: flex; justify-content: space-between; gap: 16px; padding-top: 48px; padding-bottom: 40px; margin-top: 96px; border-top: 1px solid var(--rule); font: 400 12px var(--mono); color: var(--muted); }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--text); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; background: var(--text); color: var(--paper); text-decoration: none; font: 500 13px var(--mono); letter-spacing: .02em; border-radius: 2px; transition: transform .2s, background .2s; }
.btn:hover { transform: translateX(2px); }
.btn-ghost { background: none; border: 0; padding: 6px 0; font: 400 13px var(--mono); color: var(--muted); cursor: pointer; border-bottom: 1px solid var(--rule); }
.btn-ghost:hover { color: var(--text); border-color: var(--text); }
.btn-ghost:disabled, .arrange button:disabled { opacity: .4; cursor: default; pointer-events: none; }

/* ---------- home ---------- */
.intro { padding-top: clamp(24px, 6vw, 72px); padding-bottom: clamp(32px, 5vw, 56px); }
.intro h1 { font-weight: 300; font-size: clamp(34px, 5.4vw, 64px); line-height: 1.04; letter-spacing: -.035em; margin: 18px 0 0; max-width: 16ch; }

.shelf-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 18px; min-height: 44px; }
.shelf-caption { margin: 0; font-size: 17px; color: var(--muted); font-style: italic; min-height: 1.6em; }
.shelf-caption strong { font-style: normal; font-weight: 500; color: var(--text); }
.shelf-caption .cap-meta { font: 400 12px var(--mono); font-style: normal; color: var(--muted); margin-left: 8px; }
.arrange { display: flex; align-items: center; gap: 4px; font: 400 12px var(--mono); color: var(--faint); }
.arrange span { margin-right: 6px; }
.arrange button, .chips button { background: none; border: 1px solid transparent; border-radius: 99px; padding: 5px 11px; font: 400 12px var(--mono); color: var(--muted); cursor: pointer; }
.arrange button:hover, .chips button:hover { color: var(--text); }
.arrange button[aria-pressed="true"], .chips button[aria-pressed="true"] { color: var(--text); border-color: var(--rule); background: var(--paper-2); }

.shelf {
  --row: 300px;
  display: flex; flex-wrap: wrap; align-items: flex-end;
  column-gap: 3px;
  padding: 0 10px;
  background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--row) - 10px), var(--plank) calc(var(--row) - 10px) calc(var(--row) - 2px), transparent calc(var(--row) - 2px) var(--row));
}
.spine {
  --lift: 0px;
  position: relative;
  flex: 0 0 var(--w);
  height: var(--h);
  margin-top: calc(var(--row) - 10px - var(--h));
  margin-bottom: 10px;
  background: var(--c);
  color: var(--ink);
  text-decoration: none;
  border-radius: 2px 2px 1px 1px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 14px 0 12px;
  overflow: hidden;
  box-shadow: inset 2px 0 0 rgba(255,255,255,.12), inset -3px 0 0 rgba(0,0,0,.14), 0 1px 0 rgba(0,0,0,.1);
  transform: translateY(var(--lift));
  transition: transform .35s cubic-bezier(.2,.8,.2,1), flex-basis .7s cubic-bezier(.2,.8,.2,1), opacity .3s, filter .3s;
}
.spine.is-loading { opacity: .55; }
.spine::before { /* paper-ish grain */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.08), transparent 18%, transparent 78%, rgba(0,0,0,.12));
}
.spine.deco-bands::after { content: ''; position: absolute; left: 0; right: 0; top: 28px; height: 10px; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; opacity: .35; }
.spine.deco-block::after { content: ''; position: absolute; left: 0; right: 0; bottom: 38px; height: 18px; background: currentColor; opacity: .14; }
.spine.deco-rule::after { content: ''; position: absolute; left: 22%; right: 22%; top: 16px; height: 1.5px; background: currentColor; opacity: .45; }
.spine-title {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font: 500 13px/1.1 var(--sans); letter-spacing: 0;
  max-height: calc(var(--h) - 72px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 26px;
}
.spine.wide .spine-title { white-space: normal; text-overflow: clip; line-height: 1.15; text-wrap: balance; }
.spine-author { font: 500 8.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; writing-mode: vertical-rl; transform: rotate(180deg); opacity: .72; max-height: 64px; overflow: hidden; white-space: nowrap; }
.spine:hover, .spine:focus-visible { --lift: -14px; }
.shelf.has-filter .spine:not(.on) { opacity: .16; filter: saturate(.3); }
.shelf:hover .spine:not(:hover) { filter: saturate(.8); }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 18px 0 0; }
.legend button { background: none; border: 0; padding: 4px 0; cursor: pointer; font: 400 12px var(--mono); color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.legend button::before { content: ''; width: 9px; height: 14px; background: var(--c); border-radius: 1px; }
.legend button:hover, .legend button[aria-pressed="true"] { color: var(--text); }
.legend button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 4px; }

.margin { padding-top: clamp(64px, 10vw, 128px); }
.margin-quote { margin: 20px 0 22px; }
.margin-quote blockquote { margin: 0; font-weight: 300; font-style: italic; font-size: clamp(24px, 3.2vw, 36px); line-height: 1.28; letter-spacing: -.01em; text-wrap: pretty; transition: opacity .35s; max-width: 30ch; }
.margin-quote blockquote::before { content: '“'; } .margin-quote blockquote::after { content: '”'; }
.margin-quote figcaption { margin-top: 18px; font: 400 13px var(--mono); color: var(--muted); }
.margin-quote figcaption a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--rule); display: inline-flex; align-items: center; gap: 8px; }
.margin-quote figcaption a:hover { border-color: var(--text); }
.mq-dot { width: 8px; height: 12px; background: var(--c, var(--accent)); display: inline-block; border-radius: 1px; }
.fading { opacity: 0; }

/* ---------- list ---------- */
.page-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: clamp(16px, 4vw, 48px); }
.page-title h1 { font-weight: 300; font-size: clamp(40px, 6vw, 72px); letter-spacing: -.035em; line-height: 1; margin: 0; }
.controls { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin: 32px 0 20px; }
.search { display: block; width: min(320px, 100%); }
.search input {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  padding: 8px 0; font: 400 16px var(--sans); color: var(--text); border-radius: 0;
}
.search input::placeholder { color: var(--faint); font-style: italic; }
.search input:focus { outline: none; border-bottom-color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 2px; }

.thead, .row a {
  display: grid;
  grid-template-columns: 14px minmax(0, 2.6fr) minmax(0, 1.3fr) minmax(0, 1fr) 90px 80px;
  gap: 20px; align-items: baseline;
}
.thead { padding: 10px 0; border-bottom: 1px solid var(--text); font: 400 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.thead button { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.thead button:hover, .thead .is-sorted { color: var(--text); }
.thead .is-sorted::after { content: ' ↓'; }
.thead .is-sorted[aria-sort="ascending"]::after { content: ' ↑'; }
.thead .num, .row-num, .row-date { text-align: right; }
.rows { list-style: none; margin: 0; padding: 0; }
.row a { text-decoration: none; padding: 16px 0; border-bottom: 1px solid var(--rule); transition: background .2s, padding .25s; }
.row a:hover { background: var(--paper-2); padding-left: 8px; padding-right: 8px; margin: 0 -8px; }
.row-swatch { width: 10px; height: 26px; background: var(--c); border-radius: 1px; align-self: center; }
.row-title { font-size: 20px; line-height: 1.25; display: block; }
.row-sub { display: block; font-size: 14px; color: var(--muted); font-style: italic; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-author { font-size: 15px; color: var(--muted); }
.row-cat, .row-num, .row-date { font: 400 12px var(--mono); color: var(--muted); }
.row-num { color: var(--text); }
.empty { color: var(--muted); font-style: italic; padding: 32px 0; }

/* ---------- covers ---------- */
.cover {
  position: relative; background: var(--c); color: var(--ink);
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 2px 4px 4px 2px;
  box-shadow: var(--shadow);
}
.cover::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 14px; background: linear-gradient(90deg, rgba(0,0,0,.18), rgba(255,255,255,.06) 60%, transparent); }
.cover-lg { width: 100%; aspect-ratio: 2 / 3; padding: 28px 26px 26px 36px; }
.cover-cat { font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.cover-title { font: 400 clamp(26px, 3vw, 34px)/1.05 var(--sans); letter-spacing: -.01em; margin-top: auto; text-wrap: balance; }
.cover-rule { display: block; width: 36px; height: 1.5px; background: currentColor; opacity: .6; margin: 18px 0 12px; }
.cover-author { font: 400 12px var(--mono); letter-spacing: .04em; opacity: .85; }
.cover-sm { width: 40px; height: 58px; padding: 0; flex: none; border-radius: 1px 2px 2px 1px; }
.cover-sm > * { display: none; }
.cover-sm::before { width: 5px; }

/* ---------- details ---------- */
.crumbs { display: flex; gap: 10px; font: 400 12px var(--mono); color: var(--muted); padding-top: 8px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.book-head { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: clamp(32px, 6vw, 88px); align-items: end; margin-top: 32px; }
.book-info h1 { font-weight: 300; font-size: clamp(38px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -.035em; margin: 0; text-wrap: balance; }
.subtitle { font-style: italic; font-size: 21px; color: var(--muted); margin: 14px 0 0; max-width: 36ch; line-height: 1.35; }
.byline { font: 400 14px var(--mono); margin: 20px 0 0; }
.stats { display: flex; gap: clamp(24px, 4vw, 56px); margin: 40px 0 0; padding: 22px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stats dt, .facts dt { font: 400 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 4px 0 0; font-weight: 300; font-size: 40px; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.stats dd small { font-size: 16px; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 20px 0 32px; }
.facts dd { margin: 4px 0 0; font-size: 16px; }
.facts a { text-decoration-color: var(--rule); text-underline-offset: 3px; }
.facts a:hover { text-decoration-color: currentColor; }

.block { margin-top: clamp(64px, 9vw, 112px); display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: clamp(32px, 6vw, 88px); }
.block-title { font: 400 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 6px 0 0; }
.ideas { margin: 0; padding: 0; list-style: none; columns: 2 300px; column-gap: 48px; }
.ideas li { break-inside: avoid; padding: 10px 0 12px; border-top: 1px solid var(--rule); font-size: 17px; line-height: 1.4; display: grid; grid-template-columns: 32px 1fr; }
.ideas li::before { content: attr(data-n); font: 400 11px/2.1 var(--mono); color: var(--faint); }
.more summary { font: 400 12px var(--mono); color: var(--muted); cursor: pointer; padding: 14px 0; list-style: none; border-top: 1px solid var(--rule); }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: ' +'; }
.more[open] summary { display: none; }
.more summary:hover { color: var(--text); }
.featured { display: grid; gap: 40px; }
.featured figure { margin: 0; }
.featured blockquote { margin: 0; font-size: clamp(21px, 2.2vw, 26px); line-height: 1.38; font-weight: 300; text-wrap: pretty; max-width: 40ch; }
.featured figcaption { margin-top: 10px; font: 400 12px var(--mono); color: var(--muted); }
.featured figcaption a { text-decoration: none; }
.featured figcaption a:hover { color: var(--text); }
.contents { list-style: none; margin: 0; padding: 0; }
.contents li.part { font: 400 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 22px 0 8px; }
.contents a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(40px, 160px) 36px; gap: 18px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); text-decoration: none; font-size: 17px; line-height: 1.3; }
.contents a:hover .ct { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.cbar { height: 3px; background: var(--paper-2); border-radius: 2px; overflow: hidden; }
.cbar i { display: block; height: 100%; background: var(--muted); }
.contents a:hover .cbar i { background: var(--text); }
.cn { font: 400 12px var(--mono); color: var(--muted); text-align: right; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: clamp(64px, 9vw, 112px); border-top: 1px solid var(--rule); }
.pager a { display: flex; flex-direction: column; gap: 6px; padding: 22px 0; text-decoration: none; }
.pager a.next { text-align: right; align-items: flex-end; }
.pager small { font: 400 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pager span { font-size: 20px; }
.pager a:hover span { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* ---------- notes ---------- */
.notes-head { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 28px; border-bottom: 1px solid var(--rule); }
.notes-book { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.notes-title { display: block; font-size: 26px; line-height: 1.15; letter-spacing: -.01em; }
.notes-author { display: block; font: 400 12px var(--mono); color: var(--muted); margin-top: 4px; }
.notes-book:hover .notes-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

.notes-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding-top: 40px; }
.notes-body.no-toc { grid-template-columns: minmax(0, 1fr); }
.toc { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow: auto; scrollbar-width: thin; padding-bottom: 24px; }
.toc summary { font: 400 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); cursor: pointer; list-style: none; margin-bottom: 12px; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; text-decoration: none; font-size: 14.5px; line-height: 1.3; color: var(--muted); padding: 5px 0 5px 12px; border-left: 1px solid var(--rule); transition: color .2s, border-color .2s; }
.toc .toc-1 a { padding-left: 24px; font-size: 13.5px; }
.toc .toc-part a { font: 400 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding-top: 16px; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--text); border-left-color: var(--text); }

.prose { max-width: 680px; }
.notes-count { margin-bottom: 8px; }
.prose .nh { scroll-margin-top: 24px; }
.prose .nh-part { font: 400 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 72px 0 0; padding-top: 18px; border-top: 1px solid var(--text); }
.prose .nh-0 { font-weight: 400; font-size: clamp(28px, 3.4vw, 36px); line-height: 1.12; letter-spacing: -.015em; margin: 72px 0 20px; text-wrap: balance; }
.prose .nh-0::before { content: ''; display: block; width: 28px; height: 3px; background: var(--c); margin-bottom: 18px; }
.prose .nh-part + .nh-0 { margin-top: 24px; }
.prose .nh-1 { font-weight: 500; font-size: 21px; line-height: 1.25; margin: 44px 0 12px; }
.prose .nh-2, .prose .nh-3 { font: 500 12px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 32px 0 10px; }
.prose > .nh:first-of-type { margin-top: 28px; }
.prose ul, .prose ol { margin: 0; padding: 0; }
.prose .hls { list-style: none; }
.prose li.hl, .prose p.hl, .prose blockquote.hl {
  position: relative; margin: 0; padding: 12px 0 12px 22px; font-size: 17.5px; line-height: 1.65; text-wrap: pretty;
}
.prose li.hl::before, .prose p.hl::before {
  content: ''; position: absolute; left: 0; top: 23px; width: 8px; height: 1.5px; background: var(--faint);
}
.prose li.hl:hover::before, .prose p.hl:hover::before { background: var(--c); width: 12px; }
.prose blockquote.hl { border-left: 2px solid var(--c); padding-left: 20px; font-style: italic; margin: 8px 0; }
.prose li.hl ul, .prose li.hl ol { margin: 6px 0 0 2px; padding-left: 18px; font-size: 17px; color: color-mix(in srgb, var(--text) 82%, var(--paper)); }
.prose li.hl ul { list-style: '–  '; }
.prose li.hl li { padding: 3px 0; line-height: 1.5; }
.prose strong { font-weight: 600; }
.prose mark { background: color-mix(in srgb, var(--mark) 70%, transparent); color: inherit; padding: 0 2px; }
.prose code { font: 400 .85em var(--mono); background: var(--paper-2); padding: 1px 4px; border-radius: 2px; }
.prose a { text-decoration-color: var(--rule); text-underline-offset: 3px; }
.prose .concept { border-bottom: 1px dotted var(--faint); }
.prose .hit mark.q, .prose mark.q { background: var(--mark); }
.prose .hidden, .prose .nh.hidden { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .thead, .row a { grid-template-columns: 10px minmax(0, 1fr) 70px; gap: 6px 14px; }
  .thead button[data-sort="author"], .thead .th-cat, .thead button[data-sort="date"] { display: none; }
  .row-author { grid-column: 2; grid-row: 2; font-size: 14px; }
  .row-cat, .row-date { display: none; }
  .row-num { grid-column: 3; grid-row: 1; }
  .row-swatch { grid-row: 1 / span 2; height: 100%; min-height: 26px; }
  .row-sub { white-space: normal; }
  .notes-body { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .toc { position: static; max-height: none; border-bottom: 1px solid var(--rule); padding-bottom: 12px; }
  .toc details:not([open]) summary { margin-bottom: 0; }
  .toc summary::after { content: ' +'; }
  .toc details[open] summary::after { content: ' –'; }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .shelf { --row: 236px; padding: 0 4px; column-gap: 2px; }
  .spine { height: calc(var(--h) * .78); margin-top: calc(var(--row) - 10px - var(--h) * .78); flex-basis: calc(var(--w) * .8); }
  .spine-title { font-size: 12.5px; max-height: calc(var(--h) * .78 - 60px); margin-top: 18px; }
  .spine-author { display: none; }
  .arrange span { display: none; }
  .book-head, .block { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .book-head .cover-lg { max-width: 170px; padding: 18px 16px 18px 24px; }
  .book-head .cover-title { font-size: 22px; }
  .stats dd { font-size: 32px; }
  .block { margin-top: 64px; }
  .contents a { grid-template-columns: minmax(0, 1fr) 36px; }
  .cbar { display: none; }
  .pager span { font-size: 17px; }
  .prose li.hl, .prose p.hl { font-size: 16.5px; }
  .site-foot { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- loading & problems ---------- */
.is-loading { color: var(--faint); animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }
.notice { padding-top: clamp(24px, 6vw, 72px); min-height: 40vh; }
.notice h1 { font-weight: 300; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.03em; line-height: 1.1; margin: 0 0 16px; }
.notice p { color: var(--muted); max-width: 60ch; }
.notice a { color: var(--text); text-underline-offset: 3px; }
