/* Alzabo, direction A (the library): one face, neutral paper, one ink-blue for links, and
   stacked panes on a horizontal shelf. Tokens on :root, dark twice (OS preference unless the reader
   chose light, and the reader's choice). No inline styles anywhere (the CSP allows none): the
   client sets per-pane custom properties through the CSSOM.

   Over 400 lines because it is one stylesheet for one page: tokens, shelf, panes, masthead, note,
   catalogue, hover card, phone. */

@font-face { font-family: 'Literata'; font-style: normal; font-weight: 200 900; font-display: swap; src: url('fonts/literata-latin-opsz-normal.woff2') format('woff2-variations'), url('fonts/literata-latin-opsz-normal.woff2') format('woff2'); }
@font-face { font-family: 'Literata'; font-style: italic; font-weight: 200 900; font-display: swap; src: url('fonts/literata-latin-opsz-italic.woff2') format('woff2-variations'), url('fonts/literata-latin-opsz-italic.woff2') format('woff2'); }

/* ---------- Tokens: neutral paper and ink, one accent for links ---------- */
:root {
  color-scheme: light;
  --ground: #F0F0EF;        /* the floor behind the panes */
  --paper: #FFFFFF;         /* a pane */
  --stock: #F6F6F5;         /* code, the search field */
  --ink: #1B1B1B;
  --ink-hi: #1B1B1B;        /* titles */
  --ink-2: #404040;
  --ink-3: #666666;
  --rule: #E4E4E3;
  --rule-2: #CBCBCA;
  --link: #2D4A9A;
  --link-line: rgba(45, 74, 154, .38);
  --link-wash: rgba(45, 74, 154, .07);
  --open-tint: rgba(45, 74, 154, .11);       /* a link to a note that is already open */
  --hint: rgba(45, 74, 154, .5);
  --mark: rgba(45, 74, 154, .13);           /* a followed backlink's sentence */
  --amber: #B4690E;                          /* the current pane's ribbon */
  --find: rgba(232, 168, 56, .38);           /* a search match */
  --spine: #E9E9E8;
  --spine-hover: #DFDFDE;
  --spine-ink: #3A3A3A;
  --spine-rule: #D5D5D4;
  --shade: rgba(0, 0, 0, .07);
  --shade-hover: rgba(45, 74, 154, .14);
  --edge: -1px 0 0 var(--rule), -16px 0 26px -16px rgba(0, 0, 0, .22);
  --lift: 0 1px 0 rgba(0, 0, 0, .04), 0 12px 32px -14px rgba(0, 0, 0, .28);

  --text: "Literata", Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --pane-w: 600px;
  --spine-w: 40px;
  --pad-x: 34px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0D0D0E;
    --paper: #171718;
    --stock: #1E1E20;
    --ink: #D8D8D8;
    --ink-hi: #E8E8E8;
    --ink-2: #C4C4C4;
    --ink-3: #9C9C9C;
    --rule: #2A2A2C;
    --rule-2: #3D3D40;
    --link: #A3B4F5;
    --link-line: rgba(163, 180, 245, .40);
    --link-wash: rgba(163, 180, 245, .08);
    --open-tint: rgba(163, 180, 245, .15);
    --hint: rgba(163, 180, 245, .5);
    --mark: rgba(163, 180, 245, .16);
    --amber: #E0A04A;
    --find: rgba(224, 160, 74, .32);
    --spine: #222224;
    --spine-hover: #2B2B2E;
    --spine-ink: #CFCFCF;
    --spine-rule: #303033;
    --shade: rgba(0, 0, 0, .25);
    --shade-hover: rgba(163, 180, 245, .16);
    --edge: -1px 0 0 #262628, -18px 0 30px -14px rgba(0, 0, 0, .65);
    --lift: 0 0 0 1px #2E2E31, 0 16px 36px -12px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0D0D0E;
  --paper: #171718;
  --stock: #1E1E20;
  --ink: #D8D8D8;
  --ink-hi: #E8E8E8;
  --ink-2: #C4C4C4;
  --ink-3: #9C9C9C;
  --rule: #2A2A2C;
  --rule-2: #3D3D40;
  --link: #A3B4F5;
  --link-line: rgba(163, 180, 245, .40);
  --link-wash: rgba(163, 180, 245, .08);
  --open-tint: rgba(163, 180, 245, .15);
  --hint: rgba(163, 180, 245, .5);
  --mark: rgba(163, 180, 245, .16);
  --amber: #E0A04A;
  --find: rgba(224, 160, 74, .32);
  --spine: #222224;
  --spine-hover: #2B2B2E;
  --spine-ink: #CFCFCF;
  --spine-rule: #303033;
  --shade: rgba(0, 0, 0, .25);
  --shade-hover: rgba(163, 180, 245, .16);
  --edge: -1px 0 0 #262628, -18px 0 30px -14px rgba(0, 0, 0, .65);
  --lift: 0 0 0 1px #2E2E31, 0 16px 36px -12px rgba(0, 0, 0, .7);
}
@media (max-width: 1040px) { :root { --pane-w: 560px; --pad-x: 34px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  font-variant-numeric: lining-nums proportional-nums;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.only-narrow { display: none; }
html:not(.js) .js-only { display: none; }
.label { font-size: 12.5px; font-weight: 600; line-height: 1.4; color: var(--ink-3); letter-spacing: .01em; }

/* ---------- The shelf: one horizontal scroller ---------- */
.shelf {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--rule-2) transparent;
}
.shelf.no-snap { scroll-snap-type: none; }
.track { position: relative; display: flex; height: 100%; width: max-content; min-width: 100%; }

/* Spines: their own layer, stuck to the scroller's left edge, above every pane.
   A pane that isn't whole is shown as its spine, set against the edge it is stacking on,
   with plain floor over whatever else of it would show. */
.spines { position: sticky; left: 0; z-index: 40; flex: none; width: 0; height: 100%; }
.spine {
  position: absolute; top: 0; left: var(--x, 0px); width: var(--w, var(--spine-w)); height: 100%;
  display: flex; overflow: hidden; background: var(--spine);
  visibility: hidden; pointer-events: none;
}
.spine.is-on { visibility: visible; pointer-events: auto; }
/* A partly shown pane's spine fades in over its last stretch, so the title is there before the text goes. */
.spine.is-veil { visibility: visible; opacity: var(--o, 0); }
.spine.is-veil .spine-face { flex-grow: 0; }
.spine.face-right { justify-content: flex-end; }
.spine-face {
  display: flex; flex-direction: column; justify-content: space-between; align-items: center; flex: 1 0 var(--spine-w); height: 100%; padding: 20px 0;
  background: var(--spine); color: var(--spine-ink);
  box-shadow: inset 1px 0 0 var(--spine-rule), inset -1px 0 0 var(--spine-rule);
}
.spine:hover .spine-face { background: var(--spine-hover); color: var(--ink); }
.spine.is-hinted .spine-face { box-shadow: inset 0 0 0 2px var(--hint); }
.spine:focus-visible { outline: none; }
.spine:focus-visible .spine-face { box-shadow: inset 0 0 0 2px var(--link); }
.spine-t {
  writing-mode: vertical-rl;
  font-size: 13.5px; font-weight: 500; line-height: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-height: calc(100% - 120px);
}
/* The first note holds the search field, so its spine says so. */
.spine-k { writing-mode: vertical-rl; font-size: 12.5px; line-height: 1; color: var(--ink-3); white-space: nowrap; }
.spine:hover .spine-k { color: var(--link); }

/* Panes stick l spines in from the left and r spines in from the right (set per pane by measure()),
   so they stack as spines on both edges, with room for a whole pane between the two stacks. */
.pi-0 { --i: 0; } .pi-1 { --i: 1; } .pi-2 { --i: 2; } .pi-3 { --i: 3; } .pi-4 { --i: 4; } .pi-5 { --i: 5; }
.pi-6 { --i: 6; } .pi-7 { --i: 7; } .pi-8 { --i: 8; } .pi-9 { --i: 9; } .pi-10 { --i: 10; } .pi-11 { --i: 11; }
.pane {
  position: sticky; left: calc(var(--l, var(--i)) * var(--spine-w)); right: calc(var(--r, 1) * var(--spine-w) - var(--pane-w));
  flex: 0 0 var(--pane-w); width: var(--pane-w); height: 100%;
  background: var(--paper);
  box-shadow: var(--edge);
}
.pane:first-of-type { box-shadow: none; }
.pane-scroll {
  height: 100%; overflow-y: auto; overscroll-behavior-y: contain;
  padding: 36px var(--pad-x) 104px 38px;
  scrollbar-width: thin; scrollbar-color: var(--rule-2) transparent;
}
.pane-scroll:focus, .pane-scroll:focus-visible { outline: none; }
/* A pane stacked down to its spine shows only the spine. Contents and scroll position stay put
   for when it comes back. A partly shown pane keeps its text, sliding under the next pane, with a
   soft shade where it goes under so it reads as continuing; one click anywhere brings it in whole. */
.pane.is-folded .pane-scroll { visibility: hidden; }
.pane-shade {
  display: none; position: absolute; top: 0; bottom: 0; z-index: 3; pointer-events: none;
  left: calc(var(--cov, 0px) - 84px); width: 84px;
  background: linear-gradient(to right, transparent, var(--shade));
}
.pane.is-partial .pane-shade { display: block; }
.pane.is-partial .pane-scroll { cursor: pointer; }
.pane.is-partial .pane-scroll a, .pane.is-partial .pane-scroll button, .pane.is-partial .pane-scroll input { pointer-events: none; }
/* Pointed at or focused, a partly shown pane gets the same outline an open-note link gives its pane,
   and says what a click does. Outlines on a partly shown pane fit the part that shows. */
.pane.is-partial::after { right: auto; width: var(--cov, 100%); }
.pane.is-partial:hover::after, .pane.is-partial:focus-within::after { content: ""; position: absolute; inset: 0 auto 0 0; z-index: 4; pointer-events: none; box-shadow: inset 0 0 0 2px var(--hint); }
.pane-show {
  display: none; position: absolute; top: 12px; left: max(8px, calc(var(--cov, 0px) - 104px)); z-index: 5; pointer-events: none;
  padding: 2px 8px; border: 1px solid var(--rule-2); border-radius: 3px; background: var(--paper);
  font-size: 12.5px; line-height: 1.5; color: var(--ink-2); white-space: nowrap;
}
.pane.is-partial:hover .pane-show, .pane.is-partial:focus-within .pane-show { display: block; }
/* The first note's search field, cut by the next pane, would read as broken: it fades instead. */
.pane.is-partial .search { opacity: .45; }
.pane.is-partial .search kbd { visibility: hidden; }
/* The current pane's mark: a plain bar in its margin, level with the title (on the first note,
   with the first line under the masthead, --rib, so it never reads as part of the wordmark). */
.pane.is-current:not(.is-folded):not(.is-partial)::before {
  content: ""; position: absolute; top: var(--rib, 41px); left: 16px; width: 4px; height: 20px; z-index: 2;
  background: var(--amber); border-radius: 1px;
}
.pane.is-hinted::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 2px var(--hint);
}
.pane.is-entering { animation: enter .26s cubic-bezier(.2, .7, .2, 1); }
@keyframes enter { from { opacity: 0; transform: translateX(20px); } }

.snaps { display: contents; }
.snap { position: absolute; top: 0; left: var(--s); width: 1px; height: 1px; pointer-events: none; scroll-snap-align: start; }
.snap-end { left: auto; right: 0; scroll-snap-align: end; }

/* The floor past the last pane. Its width lets the shelf come to rest with no pane cut;
   when there's room it carries a quiet colophon at the bottom. */
.shelf-end { position: relative; flex: 1 0 0; color: var(--ink-3); }
.colophon { position: absolute; left: 56px; bottom: 40px; width: 360px; display: none; }
.shelf-end.has-room .colophon { display: block; }
.se-lede { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.keys { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; font-size: 13.5px; line-height: 1.45; }
.keys dt { color: var(--ink-2); font-weight: 600; }
.keys dd { margin: 0; color: var(--ink-3); }

/* ---------- Masthead (first pane only) ---------- */
.masthead { margin: 0 0 22px; }
.mh-row { display: flex; align-items: baseline; gap: 4px 14px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.mh-name { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
.wordmark { margin: 0; font-size: 21px; font-weight: 600; line-height: 1.15; letter-spacing: .01em; color: var(--ink-hi); font-variation-settings: "opsz" 48; }
.kept, .home { margin: 0; font-size: 14px; line-height: 1.3; color: var(--ink-3); }
.home { flex: none; text-decoration: none; }
.home:hover { color: var(--link); text-decoration: underline; }

.search { position: relative; margin-top: 14px; }
.search input {
  width: 100%; margin: 0; padding: 7px 34px 7px 10px; border: 1px solid var(--rule-2); border-radius: 4px;
  background: var(--paper); color: var(--ink);
  font: 15px/1.4 var(--text); -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--ink-3); opacity: 1; }
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 1px var(--link); }
.search kbd {
  position: absolute; right: 8px; top: 8px; padding: 0 6px; border: 1px solid var(--rule-2); border-radius: 3px;
  font: 12.5px/1.45 var(--text); color: var(--ink-3);
}
.results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5;
  margin: 0; padding: 4px 0; list-style: none; max-height: min(420px, 60vh); overflow: auto;
  background: var(--paper); border: 1px solid var(--rule-2); border-radius: 4px; box-shadow: var(--lift);
}
.results[hidden] { display: none; }
.results li { padding: 7px 12px 8px; cursor: pointer; }
.results li[aria-selected="true"] { background: var(--link-wash); }
.r-t { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--link); }
.r-s { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.r-s mark { background: var(--find); color: inherit; border-radius: 2px; }
.results .r-none { cursor: default; color: var(--ink-3); font-size: 14px; }

.mh-controls { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 16px; margin-top: 8px; font-size: 13.5px; line-height: 1.4; color: var(--ink-3); }
.mh-controls p { margin: 0; }
/* A counted page's line (views/counting.ts): quiet, under the reader's line. */
.mh-counting { margin: 6px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-3); }
.mh-counting a { color: inherit; text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: .18em; }
.mh-counting a:hover { text-decoration-color: var(--ink-3); }
.switch-f { display: inline; margin: 0; }
button.switch { font: inherit; cursor: pointer; }
.switch { display: inline-block; padding: 6px 2px; margin: -6px -2px; color: var(--link); text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: .18em; }
.switch:hover { text-decoration-color: var(--link); }
.theme { display: flex; gap: 2px; }
.theme button { padding: 6px 6px; font-size: 13.5px; color: var(--ink-3); }
.theme button span { border-bottom: 1px solid transparent; }
.theme button[aria-pressed="true"] { color: var(--ink); }
.theme button[aria-pressed="true"] span { border-bottom-color: var(--ink-3); }
.theme button:hover { color: var(--ink); }

/* ---------- A note ---------- */
.gate { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; }
.gate svg { width: 14px; height: 14px; flex: none; }
.title { margin: 0 0 10px; font-size: 24px; font-weight: 600; line-height: 1.25; letter-spacing: -.005em; color: var(--ink-hi); text-wrap: balance; }

/* The catalogue card: a plain metadata block, one row per kind of fact, each led by its label. */
.card { position: relative; margin: 0 0 22px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.c-row { margin: 0; }
.c-l { color: var(--ink-3); }
.c-links { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 16px; }
.c-mark { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.card a { color: var(--link); text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: .18em; }
.card a:hover { text-decoration-color: var(--link); }

.prose { overflow-wrap: anywhere; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table { margin: 0 0 .85em; }
.prose p { text-wrap: pretty; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { margin: 1.3em 0 .45em; font-weight: 600; line-height: 1.3; color: var(--ink-hi); }
.prose h1, .prose h2 { font-size: 20px; } .prose h3 { font-size: 18px; } .prose h4, .prose h5, .prose h6 { font-size: 17px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .15em 0; }
.prose blockquote { margin-left: 0; padding-left: 14px; border-left: 2px solid var(--rule-2); color: var(--ink-2); }
.prose pre { padding: 10px 12px; border-radius: 4px; background: var(--stock); overflow-x: auto; }
.prose pre code { padding: 0; background: none; font-size: 13.5px; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 4px 10px; border: 1px solid var(--rule); text-align: left; }
.prose .align-center { text-align: center; } .prose .align-right { text-align: right; }
.prose hr { margin: 1.4em 0; border: 0; border-top: 1px solid var(--rule); }
.prose a:not(.wl) { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--link-line); text-underline-offset: .2em; }
.prose a:not(.wl):hover { text-decoration-color: var(--link); }
.prose em { font-style: italic; }
.prose code { font-family: var(--mono); font-size: .8em; padding: .05em .3em; border-radius: 3px; background: var(--stock); color: var(--ink-2); }
.wl {
  color: var(--link); text-decoration: underline; text-decoration-thickness: 1px;
  text-decoration-color: var(--link-line); text-underline-offset: .2em;
}
.wl:hover { text-decoration-color: var(--link); }
/* A link to a note already open is tinted, as on the reference, so it's clear that following it
   slides to that note and closes nothing. */
.wl.is-open { background: var(--open-tint); border-radius: 2px; padding: 0 .12em; margin: 0 -.12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.bl.is-open .bl-t { background: var(--open-tint); border-radius: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.is-marked { border-radius: 2px; animation: mark 2.8s ease-out; }
@keyframes mark {
  0%, 40% { background: var(--mark); box-shadow: 0 0 0 3px var(--mark); }
  100% { background: transparent; box-shadow: 0 0 0 3px transparent; }
}

/* The About note's portrait. */
.portrait { display: flex; align-items: flex-end; gap: 14px; margin: 4px 0 1.1em; }
.portrait img { display: block; flex: none; width: 112px; height: 150px; object-fit: cover; border-radius: 3px; }
.portrait figcaption { font-size: 13px; line-height: 1.4; color: var(--ink-3); }
.prose .keys { margin: 4px 0 0; }

/* Links to this note */
.backlinks { margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--rule); }
.backlinks h2 { margin: 0 0 6px; font-size: 14px; color: var(--ink-2); }
.backlinks ul { list-style: none; margin: 0; padding: 0; }
.bl { display: block; margin: 0 -10px; padding: 8px 10px 9px; border-radius: 4px; text-decoration: none; }
.bl:hover { background: var(--link-wash); }
.bl-t { display: inline; font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--link); }
.bl-s { display: block; margin-top: 2px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.bl-s .self { color: var(--ink); }
.bl-none { margin: 0; font-size: 14.5px; color: var(--ink-3); }

/* The front note: a short lede, then the catalogue */
.front-lede p { margin-bottom: .45em; }
.front-hint { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-3); }
.catalogue { margin-top: 26px; }
.cat-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; margin-bottom: 6px; }
.cat-h { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--ink-hi); }
.cat-sub { margin: 0; font-size: 13px; color: var(--ink-3); }
.cat-group { margin: 22px 0 4px; }
.toc { list-style: none; margin: 0; padding: 0; }
.toc li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 4px 0; font-size: 16px; line-height: 1.4; border-bottom: 1px solid var(--rule); }
.toc li:last-child { border-bottom: 0; }
.toc a { margin-right: auto; color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--link); text-decoration: underline; text-underline-offset: .2em; }
.toc a.is-open { background: none; padding: 0; margin: 0 auto 0 0; color: var(--link); text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: .2em; }
.toc time { flex: none; font-size: 13px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* "open": a note already on the shelf, in the catalogue and in search results. */
.ow { display: none; flex: none; font-size: 12.5px; font-weight: 400; color: var(--ink-3); white-space: nowrap; }
.toc a.is-open + .ow, .r-t .ow { display: inline; }
.r-t .ow { margin-left: 8px; }
.cat-note { margin: 20px 0 0; font-size: 14px; color: var(--ink-3); }

/* ---------- Hover card ---------- */
.hovercard {
  position: fixed; z-index: 100; width: 340px; max-width: calc(100vw - 24px);
  padding: 12px 16px 11px; background: var(--paper); border: 1px solid var(--rule-2); border-radius: 4px;
  box-shadow: var(--lift); pointer-events: none;
  animation: hc .12s ease-out;
}
.hovercard[hidden] { display: none; }
@keyframes hc { from { opacity: 0; transform: translateY(3px); } }
.hc { margin: 0; }
.hc-gate { margin: 0 0 3px; }
.hc-title { margin: 0 0 5px; font-size: 16px; font-weight: 600; line-height: 1.3; }
.hc-text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.hc-meta { margin: 8px 0 0; padding-top: 6px; border-top: 1px solid var(--rule); font-size: 12.5px; color: var(--ink-3); }

/* ---------- Phone trail ---------- */
.crumbs { display: none; }

/* ---------- Phone: one pane at a time ---------- */
@media (max-width: 720px) {
  body { overflow: auto; background: var(--paper); font-size: 16.5px; }
  .pane-shade { display: none !important; }
  .only-wide { display: none; }
  .only-narrow { display: inline; }
  .shelf { height: auto; overflow: visible; scroll-snap-type: none; }
  .track { display: block; width: auto; min-width: 0; height: auto; }
  .spines, .snaps, .shelf-end { display: none; }
  .pane { position: relative; left: 0; right: auto; width: auto; height: auto; box-shadow: none; display: none; }
  .pane.is-current, html:not(.js) .pane:last-of-type { display: block; }
  .pane.is-current::before { display: none; }
  .pane-scroll { height: auto; overflow: visible; padding: 18px 20px 80px; }
  .masthead { margin-bottom: 18px; }
  .mh-row { padding-bottom: 10px; }
  .wordmark { font-size: 19.5px; }
  .search { margin-top: 12px; }
  .search kbd { display: none; }
  /* While a query is live, the results stand in the page under the field, in place of the rest of it. */
  .results { position: static; max-height: none; margin-top: 8px; border: 0; border-top: 1px solid var(--rule); border-radius: 0; box-shadow: none; padding: 0; }
  .results li { padding: 10px 0 11px; border-bottom: 1px solid var(--rule); }
  .results li[aria-selected="true"] { background: none; }
  .is-searching .pane-scroll > :not(.masthead), .is-searching .mh-controls, .is-searching .mh-counting { display: none; }
  .mh-controls { font-size: 13px; column-gap: 8px; margin-top: 10px; }
  .switch { padding: 11px 2px; margin: -11px -2px; }
  .theme { gap: 0; }
  .theme button { padding: 11px 4px; margin: -11px 0; font-size: 13px; }
  .search input { padding-right: 10px; }
  .title { font-size: 22px; }
  .card { font-size: 13.5px; }
  .catalogue { margin-top: 20px; }
  /* Dates in a column on the right, level with a title's first line; the whole row is the link. */
  .toc li { position: relative; gap: 12px; min-height: 40px; font-size: 15.5px; padding: 8px 0; }
  .toc a::after { content: ""; position: absolute; inset: 0; }
  .toc time, .toc .ow { font-size: 12.5px; }
  .crumbs:not([hidden]) {
    display: block; position: sticky; top: 0; z-index: 30;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    font-size: 14.5px; line-height: 1.3;
  }
  .cr-row { display: flex; align-items: center; min-height: 48px; padding: 0 8px 0 4px; }
  .cr-back { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 10px; padding: 12px 8px; text-align: left; }
  .cr-back b { flex: none; font-weight: 600; color: var(--link); }
  .cr-parent { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
  .cr-more { flex: none; margin-left: auto; padding: 12px 6px 12px 8px; color: var(--link); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .cr-back + .cr-more { margin-left: 0; }
  .cr-search { flex: none; padding: 12px 10px 12px 8px; color: var(--link); }
  /* The trail opens over the note, so the note under it keeps its place. */
  .trail {
    position: absolute; top: 100%; left: 0; right: 0; max-height: 70vh; overflow-y: auto;
    list-style: none; margin: 0; padding: 4px 0 8px;
    background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule-2); box-shadow: var(--lift);
  }
  .trail[hidden] { display: none; }
  .trail button { display: flex; gap: 12px; width: 100%; padding: 9px 18px; text-align: left; font-size: 15px; line-height: 1.35; color: var(--link); }
  .trail .n { flex: none; min-width: 1.1em; color: var(--ink-3); }
  .trail [aria-current="true"] { color: var(--ink); background: var(--link-wash); }
}

@media (prefers-reduced-motion: reduce) {
  .pane.is-entering, .hovercard { animation: none; }
  .is-marked { animation: none; background: var(--mark); box-shadow: 0 0 0 3px var(--mark); }
}

/* A held page (client/count-gate.ts) counts nothing, so it doesn't say it does. */
[data-analytics-held] .mh-counting { display: none; }
