/* Bluewell Design reading site: catalogue and about pages (the reflowable profile, draft).
   Colours, fonts and sizes from tokens/bluewell.css; themes as in reader.css. */
@font-face { font-family: "IBM Plex Serif"; src: url("../fonts/IBMPlexSerif-Regular.otf"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Serif"; src: url("../fonts/IBMPlexSerif-Italic.otf"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Serif"; src: url("../fonts/IBMPlexSerif-Light.otf"); font-weight: 300; font-display: swap; }
@font-face { font-family: "IBM Plex Serif"; src: url("../fonts/IBMPlexSansHebrew-Regular.ttf"); font-weight: 300 400;
  font-display: swap; unicode-range: U+0590-05FF, U+FB1D-FB4F; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-Regular.otf"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-SemiBold.otf"); font-weight: 600; font-display: swap; }

:root { color-scheme: light; }
html[data-theme$="-dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bluewell-paper); color: var(--bluewell-ink);
  font-family: var(--bluewell-font-serif); font-size: 18px; line-height: var(--bluewell-layout-literary-line-height);
  font-variant-numeric: oldstyle-nums;          /* the classical voice (spec 12.2) */
}
a { color: var(--bluewell-primary); }
:focus-visible { outline: 2px solid var(--bluewell-primary); outline-offset: 3px; }

/* the page's frame: the running head, the content and the footer share one width and one left edge
   (spec 8.2); reading pages keep their own measure inside it */
.masthead, main, .foot { max-width: 76rem; margin: 0 auto; padding: 0 24px; }
/* The masthead is the classical running head (spec 12.3): the name in Serif Italic, the short
   9 mm Ink rule, then the sections in Sans SemiBold capitals; the current one, and hover, in Primary */
.masthead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 28px; padding-bottom: 8px; }
.site-name { display: inline-flex; align-items: center; gap: 10px; font-style: italic; font-size: 17px;
  color: var(--bluewell-ink); text-decoration: none; }
/* the lockup, BLUEWELL LIBRARY: the brand and the product both in spaced serif capitals (0.5 em
   apart; the space after the last letter taken back), the brand in Primary, the product in ink;
   only the colour tells them apart */
.wordmark, .product { font-style: normal; text-transform: uppercase; letter-spacing: 0.5em; margin-right: -0.5em;
  font-size: 0.82em; }
.wordmark { color: var(--bluewell-primary); }
.product { color: var(--bluewell-ink); margin-left: 0.5em; }
.site-name:hover .product, .foot-name:hover .product { color: var(--bluewell-primary); }
.site-name .lockup, .foot-name .lockup { white-space: nowrap; }
/* the mark (Bluewell Design's Spread): the verso in the text's colour, the recto in Primary */
.mark { flex: none; width: 22px; height: 22px; }
.mark .recto { fill: var(--bluewell-primary); }
.masthead-rule { flex: none; width: 9mm; height: 1.5pt; background: var(--bluewell-ink); }
.masthead nav { display: flex; gap: 20px; }
.masthead nav a { font-family: var(--bluewell-font-sans); font-size: 15px; color: var(--bluewell-ink);
  text-decoration: none; font-variant-numeric: lining-nums; }
.masthead nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1.5pt; text-underline-offset: 6px; }
.masthead nav a[aria-current="page"], .masthead nav a:hover, .site-name:hover { color: var(--bluewell-primary); }

/* Home: the library's sentence, centred and larger, its first words in spaced capitals (the raised
   initial belongs to text set left, so it goes). The masthead names the library, so the page opens on
   the sentence itself (its h1 is for screen readers). Two or three lines: longer centred text reads
   badly. */
.home-intro { max-width: 40rem; margin: 0 auto; padding: 72px 0 64px; text-align: center; }
.opening { margin: 0; font-weight: 300; font-size: 1.7rem; line-height: 1.4; text-wrap: balance; }
.lead-in { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8em; font-weight: 400; }
/* the home page's own lines (site.json intro): set as verse, a line each, never balanced across */
.opening.verse .line { display: block; }
/* Continue reading: one row between Mist rules, the book and the place, and the way back in */
.continue { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 24px; margin: 0 0 64px;
  padding: 14px 0; border-top: 0.5pt solid var(--bluewell-mist); border-bottom: 0.5pt solid var(--bluewell-mist); }
.continue[hidden] { display: none; }
.continue-h { grid-column: 1; margin: 0; font-family: var(--bluewell-font-sans); font-size: 14px; font-weight: 600;
  color: var(--bluewell-graphite); }
.continue-book { grid-column: 1; margin: 0; }
.continue-title { font-size: 1.2rem; }
.continue-where { display: block; font-family: var(--bluewell-font-sans); font-size: 14px; color: var(--bluewell-graphite);
  font-variant-numeric: lining-nums; }
.continue-btn { grid-column: 2; grid-row: 1 / span 2; margin-right: 16px; padding: 9px 22px; font-family: var(--bluewell-font-sans); font-size: 15px; font-weight: 600;
  color: var(--bluewell-on-primary); background: var(--bluewell-primary-fill); text-decoration: none; }
.continue-btn:hover { color: var(--bluewell-on-primary); text-decoration: underline; text-underline-offset: 3px; }
.more { margin: 32px 0 80px; }
/* a link that stands on its own line (All 29 books, All questions): no underline, an arrow after it
   (silent to screen readers); underlined on hover. Links inside sentences keep their underline. */
.more a { text-decoration: none; }
.more a::after { content: "\2192"; content: "\2192" / ""; display: inline-block; margin-left: 0.35em; }
.more a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* A section's heading: the serif, in sentence case, above a Mist hairline */
.section-h { font-weight: 400; font-size: 1.45rem; line-height: 1.25; margin: 0 0 20px; padding-bottom: 10px;
  border-bottom: 0.5pt solid var(--bluewell-mist); }

/* The books page: its title, the count, and the sort; the chosen order marked with the Primary
   square (the system's list mark) */
.page-head { padding: 64px 0 40px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 32px; }
.page-head h1 { flex-basis: 100%; font-weight: 300; font-size: clamp(2.4rem, 5.5vw, 3.6rem); line-height: 1.05; margin: 0 0 6px; }
.count { margin: 0; font-style: italic; color: var(--bluewell-graphite); }
.sort { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; margin-left: auto; font-family: var(--bluewell-font-sans); }
.sort-label { font-size: 14px; color: var(--bluewell-graphite); }
.sort button { font: inherit; font-size: 14px;
  color: var(--bluewell-ink); background: none; border: 0; padding: 4px 0; cursor: pointer; }
.sort button:hover, .sort button[aria-pressed="true"] { color: var(--bluewell-primary); }
.sort button[aria-pressed="true"]::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px;
  vertical-align: 0.12em; background: var(--bluewell-primary); }
.shelf { list-style: none; margin: 0 0 80px; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 32px 24px; }
/* 800 px and below: the masthead in two rows, the name (and the theme opposite) above the
   sections, so the narrow sky's band fits it exactly (it used to wrap wherever the links ran out) */
@media (max-width: 800px) {
  .masthead-rule { display: none; }
  .site-name { order: 1; }
  .theme-btn { order: 2; }
  .masthead nav { order: 3; flex-basis: 100%; padding-top: 6px; }
}
/* phones: two books to a row, and the running head on one line */
@media (max-width: 520px) {
  .shelf { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .card-title { font-size: 1.15rem; }
  .masthead, main, .foot { padding-left: 18px; padding-right: 18px; }
  .masthead { gap: 6px 10px; }
  .site-name { font-size: 15px; }
  /* the name, with the theme in the corner opposite; the sections on a line of their own below.
     The rule joins the name to the sections only when they share a line, so it goes here */
  .masthead { padding-top: 20px; }
  .masthead-rule { display: none; }
  .site-name { order: 1; }
  .theme-btn { order: 2; }
  .masthead nav { order: 3; flex-basis: 100%; gap: 18px; padding-top: 6px; }
  .theme-panel { right: 18px; }
  .home-intro { padding: 40px 0 44px; }
  .opening { font-size: 1.35rem; }
  /* the haiku's longest line (about 15.5 em) kept whole down to the narrowest phones, scrollbar or not */
  .opening.verse { font-size: min(1.35rem, calc((100vw - 36px) / 16.5)); }
}
.book-card a { display: block; text-decoration: none; color: var(--bluewell-ink); }
/* A cover is a pane of tinted glass: the theme's three art stops (the first, deepened, as the glass;
   the second pooling in the lower right, the third in the upper left), generated into
   web/covers.css from the tokens. It carries its own ground, so it is the same object on light and
   dark pages. The artwork sits on the pane in the lettering's colour (a mask, so one picture serves
   every theme); the title, a short rule and the author below. Site only: printed and reader covers
   keep their own design. */
.card-art { position: relative; aspect-ratio: 2 / 3; overflow: hidden; display: block;
  background: var(--cover-glass, var(--bluewell-art-ground)); color: var(--bluewell-on-art-fg); }
.cover-art { position: absolute; inset: 0; background: currentColor;
  -webkit-mask: var(--art) center / cover no-repeat; mask: var(--art) center / cover no-repeat; }
.cover-text { position: absolute; left: 10%; right: 12%; bottom: 9%; }
.cover-title { display: block; font-weight: 300; font-size: clamp(1.1rem, 2.4vw, 1.5rem); line-height: 1.05; }
.cover-rule { display: block; height: 0; width: 30%; border-top: 0.8pt solid currentColor; margin: 8px 0 5px; }
.cover-author { display: block; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; }
.card-title { margin: 12px 0 2px; font-weight: 300; font-size: 1.35rem; line-height: 1.15; }
.card-who { margin: 0; font-family: var(--bluewell-font-sans); font-size: 13px; line-height: 1.4; color: var(--bluewell-graphite);
  font-variant-numeric: lining-nums; }
.book-card a:hover .card-title, .book-card a:focus-visible .card-title { color: var(--bluewell-primary); }

.prose { max-width: 34em; padding: 64px 0 80px; }
.prose h1 { font-weight: 300; font-size: 2.6rem; line-height: 1.1; margin: 0 0 24px; }
.prose h2 { font-weight: 400; font-size: 1.3rem; line-height: 1.3; margin: 1.8em 0 0.4em; }
.prose p { margin: 0 0 0.9em; }

/* ── The footer: the library's name and its source, three groups of links, and the email list ── */
.foot { position: relative; margin-top: 24px; padding-top: 36px; padding-bottom: 48px;
  font-family: var(--bluewell-font-sans); font-size: 14px; line-height: 1.5; color: var(--bluewell-graphite);
  font-variant-numeric: lining-nums; }
.foot-main { display: grid; grid-template-columns: minmax(max-content, 1.3fr) minmax(0, 2.4fr) minmax(0, 1.4fr); gap: 32px 40px; }
.foot p { margin: 0; }
.foot-name { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 8px; font-family: var(--bluewell-font-serif); font-style: italic;
  font-size: 17px; color: var(--bluewell-ink); text-decoration: none; }
.foot-name:hover { color: var(--bluewell-primary); }
.foot-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.foot-h { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--bluewell-ink); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-group a { color: var(--bluewell-ink); text-decoration: none; }
.foot-group a:hover { color: var(--bluewell-primary); text-decoration: underline; text-underline-offset: 3px; }
.foot-news p { margin: 0 0 12px; }
.foot-btn { display: inline-block; padding: 7px 16px; border: 1px solid var(--bluewell-primary); color: var(--bluewell-primary);
  font-weight: 600; text-decoration: none; }
.foot-btn:hover { background: var(--bluewell-primary-fill); color: var(--bluewell-on-primary); }
@media (max-width: 860px) {
  .foot-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot-nav { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 520px) {
  .foot-main { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .foot-nav { grid-row: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* the pages' lists (Accessibility) */
.prose ul { margin: 0 0 0.9em; padding-left: 1.2em; }
.prose li { margin: 0 0 0.35em; }

/* ── The theme, at the right of the masthead: the reader's own setting and swatches ─────── */
.masthead { position: relative; }
.theme-btn { margin-left: auto; padding: 6px 4px; border: 0; background: none; cursor: pointer; color: var(--bluewell-ink);
  font-family: var(--bluewell-font-sans); font-size: 15px; }
.theme-btn:hover, .theme-btn[aria-expanded="true"] { color: var(--bluewell-primary); }
.theme-panel { position: absolute; z-index: 6; top: 100%; right: 24px; width: 280px; padding: 12px 16px;
  background: var(--bluewell-paper); border: 0.5pt solid var(--bluewell-mist); font-family: var(--bluewell-font-sans); }
.theme-panel fieldset { border: 0; padding: 0; margin: 0; }
.theme-panel legend { margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--bluewell-ink); }
.theme-note { margin: 10px 0 0; font-size: 12px; color: var(--bluewell-graphite); }
/* the swatches, as in the reader (reader.css): each is its theme's page, "Aa" in its ink, bordered in its primary */
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
label.swatch { display: flex; flex-direction: column; gap: 5px; padding: 2px; cursor: pointer; position: relative; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.chip { display: flex; align-items: center; justify-content: center; height: 46px;
  background: var(--bluewell-paper); color: var(--bluewell-ink); border: 2px solid var(--bluewell-primary);
  font-family: var(--bluewell-font-serif); font-size: 21px; line-height: 1; }
.chip-auto { display: grid; grid-template-columns: 1fr 1fr; }
.chip-auto > span { display: flex; align-items: center; height: 100%; background: var(--bluewell-paper); color: var(--bluewell-ink); }
.chip-auto > span:first-child { justify-content: flex-end; }
.swatch-name { font-size: 11px; line-height: 1.25; text-align: center; color: var(--bluewell-ink); }
.swatch input:checked + .chip { outline: 2px solid var(--bluewell-ink); outline-offset: 2px; }
.swatch input:checked ~ .swatch-name { font-weight: 600; }
.swatch input:focus-visible ~ .swatch-name { text-decoration: underline; text-underline-offset: 3px; }
.swatch:hover .swatch-name { color: var(--bluewell-primary); }

/* The books page's catalogue (tools/build_site.py, catalog_entry): one list, shown as a grid of
   covers (as the home page's shelf) or as a list of rows, the cover small at the left, the title,
   who wrote it and what it is, then the facts and the links at the right. Sort and View sit at the
   page head's right, the chosen one marked with the Primary square. */
.arrange { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 40px; margin-left: auto; }
.arrange[hidden] { display: none; }
.arrange .sort { margin-left: 0; }
.catalog { list-style: none; margin: 0 0 80px; padding: 0; }
.entry-cover { display: block; }
.entry-title { margin: 0; font-weight: 300; line-height: 1.15; }
.entry-title a { color: var(--bluewell-ink); text-decoration: none; }
.entry-title a:hover, .entry-title a:focus-visible { color: var(--bluewell-primary); }
.entry-who { margin: 0; font-family: var(--bluewell-font-sans); font-size: 13px; line-height: 1.4; color: var(--bluewell-graphite);
  font-variant-numeric: lining-nums; }
.catalog[data-view="grid"] { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 32px 24px; }
.catalog[data-view="grid"] .entry-title { margin: 12px 0 2px; font-size: 1.35rem; }
.catalog[data-view="grid"] :is(.entry-subtitle, .entry-desc, .entry-side) { display: none; }
.catalog[data-view="list"] { border-top: 0.5pt solid var(--bluewell-mist); }
.catalog[data-view="list"] .entry { display: grid; grid-template-columns: 92px minmax(0, 1fr) max-content; gap: 6px 36px; align-items: start;
  padding: 26px 0; border-bottom: 0.5pt solid var(--bluewell-mist); }
.catalog[data-view="list"] .entry-title { font-size: 1.5rem; }
.entry-subtitle { margin: 3px 0 0; font-style: italic; color: var(--bluewell-graphite); }
.catalog[data-view="list"] .entry-who { margin-top: 6px; font-size: 14px; }
.entry-desc { margin: 12px 0 0; max-width: 36em; }
.entry-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 4px 0 14px;
  font-family: var(--bluewell-font-sans); font-size: 13px; line-height: 1.4; font-variant-numeric: lining-nums; }
.entry-facts div { display: contents; }
.entry-facts dt { color: var(--bluewell-graphite); }
.entry-facts dd { margin: 0; color: var(--bluewell-ink); white-space: nowrap; }
.entry-links { margin: 0; font-family: var(--bluewell-font-sans); font-size: 14px; color: var(--bluewell-graphite); }
.entry-links a { font-weight: 600; text-underline-offset: 3px; }
/* the small cover: its lettering scaled to the cover's width */
.catalog[data-view="list"] .card-art { container-type: inline-size; }
.catalog[data-view="list"] .cover-title { font-size: 12.5cqi; }
.catalog[data-view="list"] .cover-rule { margin: 4cqi 0 2.5cqi; }
.catalog[data-view="list"] .cover-author { font-size: 5.5cqi; letter-spacing: 0.12em; }
@media (max-width: 900px) {
  .catalog[data-view="list"] .entry { grid-template-columns: 80px minmax(0, 1fr); }
  .catalog[data-view="list"] .entry-cover { grid-row: span 2; }
  .catalog[data-view="list"] .entry-side { grid-column: 2; }
  .entry-facts { margin-top: 10px; }
  .entry-facts dd { white-space: normal; }
}
@media (max-width: 520px) {
  .arrange { margin-left: 0; gap: 4px 28px; }
  .arrange .sort { gap: 4px 13px; }
  .catalog[data-view="grid"] { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .catalog[data-view="grid"] .entry-title { font-size: 1.15rem; }
  .catalog[data-view="list"] .entry { grid-template-columns: 64px minmax(0, 1fr); gap: 4px 16px; padding: 18px 0; }
  .catalog[data-view="list"] .entry-title { font-size: 1.2rem; }
  .entry-desc { display: none; }
}

/* ── A book's page: the cover beside its names, its description, its length and Start reading;
      then its contents and its edition ─────────────────────────────────────────────────────── */
.book-page { display: grid; grid-template-columns: minmax(150px, 230px) 1fr; gap: 44px; align-items: end; padding: 64px 0 56px; }
.book-about h1 { font-weight: 300; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.05; margin: 0 0 6px; }
.book-subtitle { margin: 0 0 6px; font-size: 1.15rem; font-style: italic; }
.book-by { margin: 0 0 1.4em; font-size: 1.15rem; }
.book-by a { text-decoration: none; }
.book-by a:hover { text-decoration: underline; text-underline-offset: 3px; }
.book-desc { margin: 0 0 1.1em; max-width: 34em; }
.book-actions { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; }
/* Start reading: the Primary fill with on-primary text, square, like the system's number blocks */
.read-btn { display: inline-block; padding: 10px 20px; background: var(--bluewell-primary-fill); color: var(--bluewell-on-primary);
  font-family: var(--bluewell-font-sans); font-size: 15px; font-weight: 600; text-decoration: none; }
.read-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.read-where { font-style: italic; color: var(--bluewell-graphite); }
.downloads { margin: 18px 0 0; font-family: var(--bluewell-font-sans); font-size: 14px; color: var(--bluewell-graphite);
  font-variant-numeric: lining-nums; }
.downloads a { font-weight: 600; text-underline-offset: 3px; }
.downloads .size { color: var(--bluewell-graphite); }
.book-section { margin: 0 0 56px; }
.book-section .details { max-width: 40rem; }
/* the details: labelled fields, the label in the sans, the value in the text face */
.details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 28px; margin: 0; }
.details dt { font-family: var(--bluewell-font-sans); font-size: 14px; color: var(--bluewell-graphite);
  padding-top: 0.2em; font-variant-numeric: lining-nums; }
.details dd { margin: 0; }
.details a { text-underline-offset: 3px; }
@media (max-width: 520px) {
  .details { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .details dd { margin-bottom: 10px; }
}
@media (max-width: 640px) {
  .book-page { grid-template-columns: 1fr; gap: 28px; align-items: start; padding-top: 40px; }
  .book-cover { max-width: 200px; }
}

/* ── Authors: an index in surname order, each with the titles in italic ──────────────────── */
.author-index { list-style: none; margin: 0 0 80px; padding: 0; max-width: 40rem; }
.author-index li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; padding: 12px 0;
  border-bottom: 0.5pt solid var(--bluewell-mist); }
.author-index a { font-size: 1.2rem; color: var(--bluewell-ink); text-decoration: none; }
.author-index a:hover { color: var(--bluewell-primary); }
.author-books { color: var(--bluewell-graphite); font-size: 0.95em; }

/* ── Search: the field, then books, then passages in their text ─────────────────────────── */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.search-form { display: flex; gap: 8px; max-width: 40rem; margin: 0 0 16px; font-family: var(--bluewell-font-sans); }
.search-form input { flex: 1; min-width: 0; padding: 9px 12px; font: inherit; font-size: 16px; color: var(--bluewell-ink);
  background: var(--bluewell-paper); border: 1px solid var(--bluewell-graphite); border-radius: 0; }
.search-form input:focus-visible { outline: 2px solid var(--bluewell-primary); outline-offset: 1px; }
.search-form button { padding: 9px 18px; font: inherit; font-size: 15px; font-weight: 600; color: var(--bluewell-on-primary);
  background: var(--bluewell-primary-fill); border: 0; cursor: pointer; }
.search-status { min-height: 1.5em; margin: 0 0 32px; font-style: italic; color: var(--bluewell-graphite); }
.search-group { max-width: 40rem; margin: 0 0 56px; }
.hits { list-style: none; margin: 0; padding: 0; }
.hit { padding: 0 0 20px; margin: 0 0 20px; border-bottom: 0.5pt solid var(--bluewell-mist); }
.hit-book { margin: 0 0 6px; font-family: var(--bluewell-font-sans); font-size: 14px; color: var(--bluewell-graphite); }
.hit-title { display: inline-block; font-size: 1.15rem; color: var(--bluewell-ink); text-decoration: none; }
.hit-title:hover { color: var(--bluewell-primary); text-decoration: underline; text-underline-offset: 3px; }
.hit-excerpt { margin: 2px 0 10px; font-size: 0.95em; }
.hit-excerpt mark { background: var(--bluewell-surface-definition, var(--bluewell-mist)); color: inherit; }

/* ── Authors: the list (under each letter, the name, who they were, how many books), and a page ── */
.author-letter { max-width: 44rem; }
.author-letter .author-index { margin-bottom: 0; }
.author-letter:last-of-type .author-index { margin-bottom: 80px; }
.letter { margin: 28px 0 0; font-weight: 400; font-size: 1.1rem; color: var(--bluewell-graphite); }
.author-index li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: baseline; }
.author-desc { grid-column: 1; grid-row: 2; font-size: 0.95em; color: var(--bluewell-graphite); }
.author-count { grid-column: 2; grid-row: 1; font-family: var(--bluewell-font-sans); font-size: 14px; color: var(--bluewell-graphite);
  font-variant-numeric: lining-nums; }
.author-head { display: block; max-width: 40rem; }
.author-line { margin: 0 0 16px; font-style: italic; color: var(--bluewell-graphite); }
.author-bio { margin: 0; }
.section-count { font-family: var(--bluewell-font-sans); font-size: 14px; color: var(--bluewell-graphite); margin-left: 8px; }

/* ── A book's contents: one arrangement for every book (tools/build_site.py, book_contents).
      The entries in Ink, numbers and titles alike. In a list the titles share a left edge after
      the widest number (--gutter, measured at build time, set by classes in the generated web/covers.css), and an entry without a number starts
      there too (--indent). A list of bare numbers runs on like a line of text, as in the reader's
      contents, at one spacing in every book. A part's chapters are indented under it, under its title when it has one (--sub).
      A book divided into parts (.parts) sets them as Primary headings, one under another, their
      chapters as many to a row as fit, folding away on narrow screens; other long contents
      (.long) go into two columns where there is room. ──────────────────── */
.contents, .contents ol { list-style: none; margin: 0; padding: 0; --gap: 0.7em; }
.contents a { display: flex; align-items: baseline; gap: 0 var(--gap); padding: 3px 0; color: var(--bluewell-ink);
  text-decoration: none; font-variant-numeric: lining-nums; }
.contents .toc-n { flex: none; min-width: var(--gutter, 0); }
.contents .toc-t { flex: 1; min-width: 0; }
.contents .toc-t:first-child { padding-left: var(--indent, 0); }
.contents a:hover :is(.toc-n, .toc-t), .contents a:focus-visible :is(.toc-n, .toc-t) { text-decoration: underline;
  text-decoration-thickness: 0.5pt; text-underline-offset: 3px; }
.contents a:hover, .contents a:focus-visible { color: var(--bluewell-primary); }
.contents li { break-inside: avoid; }
.contents li > ol { margin: 0 0 10px var(--sub, 1.6em); }
.contents :where(li > ol:not(.toc-nums)) { --gutter: 0em; --indent: 0em; }
.contents .toc-nums { display: flex; flex-wrap: wrap; gap: 0 0.9em; max-width: 44rem; }
.contents > .toc-run > .toc-nums { margin: 2px 0 10px; }
.contents .toc-nums a { padding: 2px 0; }
/* a run's shared word, said once ("Chapters I II …"), and a new word starting a line */
.contents .toc-nums { align-items: baseline; }
/* the word hangs in the margin of its run, so a run that wraps lines its numbers up under the first */
.contents .toc-nums.labelled { padding-left: 4.8em; }
.contents .toc-nums-label { width: 4.8em; margin-left: -4.8em; margin-right: -0.9em; padding: 2px 0;
  font-family: var(--bluewell-font-sans); font-size: 14px; color: var(--bluewell-graphite); }
.contents .toc-nums.labelled .toc-nums-label { width: calc(4.8em * 18 / 14); margin-left: calc(-4.8em * 18 / 14); }
.contents .toc-nums-break { flex-basis: 100%; height: 0; }
/* the numbered parts of a titled entry (a story in parts: "A Scandal in Bohemia", I II III): quieter
   than the titles, tucked under theirs. A book's parts (.part) keep their chapters at full size. */
.contents li:not(.part):not(.toc-run) > a + .toc-nums { margin-top: -2px; font-family: var(--bluewell-font-sans);
  font-size: 14px; gap: 0 0.8em; }
.contents li:not(.part):not(.toc-run) > a + .toc-nums a { color: var(--bluewell-graphite); padding: 1px 0; }
.contents li:not(.part):not(.toc-run) > a + .toc-nums a:hover { color: var(--bluewell-primary); }
@media (min-width: 900px) { .contents.long { columns: 2; column-gap: 56px; } }
/* parts: one under another, each a heading in Primary with its chapters straight under it: bare
   numbers running on, titled entries in columns as many to a row as the width allows */
.contents.parts > li { margin: 0 0 18px; }
.contents.parts > li:not(.part) { margin-bottom: 6px; }
.contents .part > a { color: var(--bluewell-primary); padding-bottom: 4px; }
.contents .part > a:hover, .contents .part > a:focus-visible { color: var(--bluewell-primary); }
.contents.parts .part > ol { margin: 0; }
.contents.parts .part > ol:not(.toc-nums) { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); column-gap: 40px; }
/* a part's heading, and on a narrow screen the button that folds its chapters away */
.contents .part { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 16px; }
.contents .part > ol { grid-column: 1 / -1; }
.contents ol[hidden], .part-toggle[hidden] { display: none; }
.part-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 0 8px 12px; border: 0; background: none;
  cursor: pointer; font-family: var(--bluewell-font-sans); font-size: 14px; color: var(--bluewell-graphite); font-variant-numeric: lining-nums; }
.part-toggle::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform 0.15s; }
.part-toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.part-toggle:hover, .part-toggle:focus-visible { color: var(--bluewell-primary); }
@media (max-width: 820px) {
  .contents.parts > .part { margin: 0; border-bottom: 0.5pt solid var(--bluewell-mist); }
  .contents.parts > .part > a { padding: 8px 0; }
  .contents.parts > .part > ol { margin-bottom: 14px; }
  .contents.parts > li:not(.part) { margin: 0 0 8px; }
}
/* the site's arrangement of a collection (site.json): "Start here", then group headings */
.contents .toc-group-title { display: block; column-span: all; margin: 24px 0 8px; padding-top: 10px;
  border-top: 0.5pt solid var(--bluewell-mist); font-family: var(--bluewell-font-sans); font-size: 14px; font-weight: 600;
  color: var(--bluewell-graphite); break-after: avoid; }
.contents > .toc-group-title:first-child, .contents > .toc-start:first-child > .toc-group-title { margin-top: 0; padding-top: 0; border-top: 0; }
.contents .toc-start { column-span: all; margin-bottom: 8px; }
.contents .toc-start > ol { margin: 0; columns: 2; column-gap: 56px; }
@media (max-width: 899px) { .contents .toc-start > ol { columns: 1; } }

/* The home page's shelves (the picks, recently added): five covers in a row; on a narrower screen, a
   row to swipe through, one book at a time: each swipe moves one book and stops with it in the
   middle, its neighbours showing at either side. Recently added starts with its first book at the
   frame's left edge and ends with its last at the right; the picks go round (the home page's script
   copies them either side, the copies hidden from screen readers and the keyboard, and keeps the
   row in the middle set). No buttons, and nothing turns by itself. */
:is(.picks, .recent, .short) .shelf { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px 20px; }
.shelf > .shelf-copy { display: none; }
@media (max-width: 800px) {
  :is(.picks, .recent, .short) .shelf { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: clamp(180px, 58%, 280px);
    gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-left: -24px; margin-right: -24px; padding: 0 24px 4px; scroll-padding: 0 24px; }
  :is(.picks, .recent, .short) .shelf::-webkit-scrollbar { display: none; }
  :is(.picks, .recent, .short) .book-card { scroll-snap-align: center; scroll-snap-stop: always; }
  .shelf > .shelf-copy { display: block; }
}
@media (max-width: 520px) {
  :is(.picks, .recent, .short) .shelf { margin-left: -18px; margin-right: -18px; padding: 0 18px 4px; scroll-padding: 0 18px; }
}

/* The footer's top: a Mist hairline across the whole window, while the text keeps to the frame and
   its shared left edge. html clips sideways overflow, so the 100vw line (which counts the
   scrollbar) never makes the page scroll. */
html { overflow-x: clip; }
.foot::before { content: ""; position: absolute; top: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  border-top: 0.5pt solid var(--bluewell-mist); pointer-events: none; }

/* ── The FAQ: questions that fold away, Mist rules between them (the contents' rule, spec 2.1);
   the chevron is the parts' fold-away one ─────────────────────────────────────────────── */
.faq h2 { margin-top: 2.2em; }
.faq details, .home-faq details { border-bottom: 0.5pt solid var(--bluewell-mist); }
.faq h2 + details { border-top: 0.5pt solid var(--bluewell-mist); }
:is(.faq, .home-faq) summary { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0;
  cursor: pointer; list-style: none; }
:is(.faq, .home-faq) summary::-webkit-details-marker { display: none; }
:is(.faq, .home-faq) summary::after { content: ""; flex: none; width: 6px; height: 6px; margin-right: 4px; border-right: 1.5px solid var(--bluewell-graphite);
  border-bottom: 1.5px solid var(--bluewell-graphite); transform: translateY(-3px) rotate(45deg); transition: transform 0.15s; }
:is(.faq, .home-faq) details[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
:is(.faq, .home-faq) summary:hover { color: var(--bluewell-primary); }
:is(.faq, .home-faq) summary:focus-visible { outline-offset: 2px; }
:is(.faq, .home-faq) details > p { margin: 0 0 16px; color: var(--bluewell-ink); }

/* ── The Contact form: the reason, then the fields it needs ─────────────────────────────── */
.contact-form { margin: 32px 0 28px; font-family: var(--bluewell-font-sans); font-size: 15px; line-height: 1.45;
  font-variant-numeric: lining-nums; }
.contact-form[hidden], .cf-group[hidden] { display: none; }
.cf-reasons { margin: 0 0 24px; padding: 0; border: 0; }
.cf-reasons legend { margin: 0 0 10px; padding: 0; font-weight: 600; }
.contact-form .cf-reasons label { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-weight: 400; cursor: pointer; }
.contact-form label { display: block; margin: 0 0 4px; font-weight: 600; }
.cf-optional { font-weight: 400; color: var(--bluewell-graphite); }
.cf-note { margin: 0 0 16px; color: var(--bluewell-graphite); font-family: var(--bluewell-font-serif); font-size: 16px; }
.contact-form :is(input:not([type="radio"], [type="checkbox"]), textarea) { display: block; width: 100%; margin: 0 0 18px;
  padding: 9px 12px; font: inherit; font-size: 16px; color: var(--bluewell-ink); background: var(--bluewell-paper);
  border: 1px solid var(--bluewell-graphite); border-radius: 0; }
.contact-form textarea { resize: vertical; min-height: 8em; font-family: var(--bluewell-font-serif); line-height: 1.45; }
.contact-form ::placeholder { color: var(--bluewell-graphite); }
.contact-form :is(input, textarea, button):focus-visible { outline: 2px solid var(--bluewell-primary); outline-offset: 1px; }
/* the reason and the good-faith box: square, filled with a Primary square when chosen */
.contact-form :is(input[type="radio"], input[type="checkbox"]) { appearance: none; flex: none; width: 15px; height: 15px; margin: 0;
  border: 1px solid var(--bluewell-graphite); border-radius: 0; background: var(--bluewell-paper); cursor: pointer; }
.contact-form :is(input[type="radio"], input[type="checkbox"]):checked { padding: 3px; border-color: var(--bluewell-primary);
  background: var(--bluewell-primary-fill); background-clip: content-box; }
.contact-form .cf-check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px; font-weight: 400; cursor: pointer; }
.contact-form .cf-check input { margin-top: 3px; }
.cf-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cf-status { min-height: 1.45em; margin: 0 0 14px; }
.cf-status a { color: var(--bluewell-primary); text-underline-offset: 3px; }
.contact-form button[type="submit"] { padding: 9px 22px; font: inherit; font-weight: 600; color: var(--bluewell-on-primary);
  background: var(--bluewell-primary-fill); border: 0; border-radius: 0; cursor: pointer; }
.contact-form button:disabled { opacity: 0.6; cursor: default; }
.cf-after { color: var(--bluewell-graphite); font-size: 16px; }

/* the shelf's own space goes; the link under it keeps the section's end */
:is(.recent, .short) .shelf { margin-bottom: 0; }
/* The home page's questions: the FAQ's own, under a section heading (which carries the first rule) */
.home-faq { max-width: 44rem; }
.home-faq .more { margin-top: 24px; }
.home-faq .section-h { margin-bottom: 0; }
.picks[hidden] { display: none; }

/* ── The Guide: its clips (a figure: the clip, 8 px, a Mist rule, the caption, as spec 7.2) and
   the keys ─────────────────────────────────────────────────────────────────────────────── */
.guide h2 { margin-top: 2.2em; }
.clip { margin: 24px 0; }
/* the clip on the theme's pale canvas, so a page in the reader shows its edges on a page of the site
   (an opaque surface without a border, spec 2.1) */
.clip video { display: block; box-sizing: content-box; width: 100%; max-width: 320px; height: auto; padding: 20px;
  background: var(--bluewell-canvas); }
.clip figcaption { max-width: 360px; margin-top: 8px; padding-top: 6px; border-top: 0.4pt solid var(--bluewell-mist);
  font-family: var(--bluewell-font-sans); font-size: 13px; line-height: 1.4; color: var(--bluewell-graphite); }
.keys { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0 0 1em; }
.keys dt, .keys dd { margin: 0; }
kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; font-family: var(--bluewell-font-sans); font-size: 14px;
  line-height: 1.4; text-align: center; color: var(--bluewell-ink); border: 1px solid var(--bluewell-mist); border-radius: 0; }

/* ── The home page's opening: the night sky (Bluewell Design spec 7.1.1, web/sky.css) from the top
   of the page, the masthead over it and the introduction in its clearing ───────────────────
   The drawing is 1440 x 640 with its clearing centred at (720, 355), cropped to fill the box
   (xMidYMid slice). The box keeps the drawing's height until the window is wider than 1440 px and
   then grows with it (640/1440 of the width), so the drawing is never cropped top or bottom and
   the clearing's centre is always 355/640 of the box's height down. */
.sky-head { position: relative; height: max(640px, 44.45vw); margin-bottom: 40px; }
.sky-head > .sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
/* one sky per masthead (tools/build_site.py, SKY and SKY_NARROW): its band ends just under it */
.sky-head > .sky-narrow { display: none; }
/* a page older than the month, while it fetches the month's sky (tools/build_site.py, SKY_SWITCH) */
.sky-head[data-stale] > .sky { visibility: hidden; }
@media (max-width: 800px) {
  .sky-head > .sky-wide { display: none; }
  .sky-head > .sky-narrow { display: block; }
}
.sky-head > .masthead { position: relative; z-index: 2; }
.sky-head > .home-intro { position: absolute; z-index: 1; left: 50%; top: 55.47%; transform: translate(-50%, -50%);
  width: min(40rem, calc(100% - 48px)); margin: 0; padding: 0; }
@media (max-width: 520px) {
  .sky-head { height: 560px; margin-bottom: 24px; }
  .sky-head > .home-intro { width: calc(100% - 36px); }
}

/* ── An author's portrait: drawn by Bluewell Design (spec 7.1.2; tools/build_portraits.py), shown
   and scanned in by its web/portrait.css and portrait.js. Here only where it sits: beside the name
   and bio, or above them on a narrow screen. ──────────────────────────────────────────────── */
.author-head.has-portrait { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px 64px; align-items: start;
  max-width: 64rem; }
.author-head .author-text { min-width: 0; }
@media (max-width: 760px) {
  .author-head.has-portrait { grid-template-columns: minmax(0, 1fr); }
  .author-head.has-portrait .portrait { order: -1; max-width: 240px; }
}

/* ── Short reads (the home page) and a card's reading time ─────────────────────────────────── */
.card-time { margin: 2px 0 0; font-family: var(--bluewell-font-sans); font-size: 13px; line-height: 1.4;
  color: var(--bluewell-graphite); font-variant-numeric: lining-nums; }

/* ── The feed, under the email sign-up ────────────────────────────────────────────────────── */
.foot-news .foot-feed { margin: 14px 0 0; font-size: 14px; }
.foot-feed a { color: var(--bluewell-graphite); text-underline-offset: 3px; }
.foot-feed a:hover { color: var(--bluewell-primary); }

/* ── Articles: the index and an author's page list them (title, summary, date and whom about);
      an article is prose, its header a small link back to the index, the title and that line;
      the books it names are shelves inside it, three or four to a row, with their reading times ── */
.article-list { list-style: none; margin: 0 0 80px; padding: 0; max-width: 40rem; }
.article-entry { padding: 20px 0; border-bottom: 0.5pt solid var(--bluewell-mist); }
.article-entry:first-child { padding-top: 0; }
.article-entry-title { margin: 0 0 6px; font-weight: 400; font-size: 1.45rem; line-height: 1.2; }
.article-entry-title a { color: var(--bluewell-ink); text-decoration: none; }
.article-entry-title a:hover, .article-entry-title a:focus-visible { color: var(--bluewell-primary); text-decoration: underline;
  text-decoration-thickness: 0.5pt; text-underline-offset: 4px; }
.article-summary { margin: 0 0 8px; }
.article-meta { margin: 0; font-family: var(--bluewell-font-sans); font-size: 14px; color: var(--bluewell-graphite);
  font-variant-numeric: lining-nums; }
.article-meta a { color: inherit; text-underline-offset: 3px; }
.article-meta a:hover { color: var(--bluewell-primary); }
.author-articles .article-list { margin-bottom: 0; }
.author-articles { margin: 0 0 80px; }
.author-articles .more { margin-bottom: 0; }
.article { max-width: 40rem; }
.article-head { margin: 0 0 36px; }
.article-head h1 { margin-bottom: 12px; }
.article-kicker { margin: 0 0 10px; font-family: var(--bluewell-font-sans); font-size: 14px; }
.article-kicker a { color: var(--bluewell-graphite); text-decoration: none; }
.article-kicker a::before { content: "\2190"; content: "\2190" / ""; margin-right: 0.35em; }
.article-kicker a:hover { color: var(--bluewell-primary); }
.prose .article-shelf { list-style: none; padding: 0; margin: 20px 0 8px; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 20px; }
.prose .article-shelf li { margin: 0; }
.article-shelf .card-title { font-size: 1.05rem; }
@media (max-width: 520px) { .prose .article-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; } }
.prose .article-shelf p { margin: 0; }
.prose .article-shelf .card-title { margin: 10px 0 2px; }
.prose .article-shelf .card-time { margin-top: 2px; }

/* ── More, the masthead's last section: a disclosure, its pages in a panel under it (as the
      theme's: Paper, a Mist hairline, square). The summary looks like the other sections, with a
      small chevron; it takes Primary and the underline when one of its pages is open ─────────── */
.masthead nav { align-items: baseline; }
.more-menu { position: relative; }
.more-menu summary { display: inline-flex; align-items: center; gap: 7px; list-style: none; cursor: pointer;
  font-family: var(--bluewell-font-sans); font-size: 15px; color: var(--bluewell-ink); }
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu summary::after { content: ""; width: 5px; height: 5px; border-right: 1.25px solid currentColor;
  border-bottom: 1.25px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.15s; }
.more-menu[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.more-menu summary:hover, .more-menu[open] summary, .more-menu:has([aria-current]) summary { color: var(--bluewell-primary); }
.more-menu:has([aria-current]) summary { text-decoration: underline; text-decoration-thickness: 1.5pt; text-underline-offset: 6px; }
.more-list { position: absolute; z-index: 7; top: calc(100% + 10px); left: -16px; min-width: 11rem; margin: 0; padding: 8px 0;
  list-style: none; background: var(--bluewell-paper); border: 0.5pt solid var(--bluewell-mist); }
.more-list a { display: block; padding: 7px 16px; }
.masthead nav .more-list a[aria-current="page"] { text-decoration: none; }
.masthead nav .more-list a[aria-current="page"]::before { content: ""; display: inline-block; width: 6px; height: 6px;
  margin: 0 8px 0 -14px; vertical-align: 0.12em; background: var(--bluewell-primary); }
@media (prefers-reduced-motion: reduce) { .more-menu summary::after { transition: none; } }
@media (max-width: 520px) {
  .more-list { left: auto; right: -12px; }
}

}

/* ── An author's books: the section heading with the books page's Sort and View at its right, on
      the heading's rule; then the same catalog, as a grid or a list ──────────────────────────── */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 32px; margin: 0 0 20px; padding-bottom: 10px;
  border-bottom: 0.5pt solid var(--bluewell-mist); }
.section-head .section-h { margin: 0; padding: 0; border: 0; }
.section-head + .catalog[data-view="list"] { border-top: 0; }

/* ── An author page's foot: where the portrait comes from, small and in Graphite ─────────────── */
.portrait-credit { max-width: 40rem; margin: -40px 0 80px; font-family: var(--bluewell-font-sans); font-size: 13px; line-height: 1.5;
  color: var(--bluewell-graphite); }
.portrait-credit a { color: inherit; text-underline-offset: 3px; }
.portrait-credit a:hover { color: var(--bluewell-primary); }

/* ── Corrections: each fix, newest first: when, the book, where; what it was and is (struck and
      marked in the text's own colours, labelled for those who cannot see the difference) ───────── */
.fixes { list-style: none; margin: 32px 0 0; padding: 0; }
.fix { padding: 18px 0; border-top: 0.5pt solid var(--bluewell-mist); }
.fix:last-child { border-bottom: 0.5pt solid var(--bluewell-mist); }
.fix-meta { margin: 0 0 8px; font-family: var(--bluewell-font-sans); font-size: 14px; color: var(--bluewell-graphite); }
.fix-meta a { color: inherit; text-underline-offset: 3px; }
.fix-text { margin: 0 0 4px; }
.fix-label { display: inline-block; min-width: 3em; font-family: var(--bluewell-font-sans); font-size: 13px; color: var(--bluewell-graphite); }
.fix del { color: var(--bluewell-graphite); text-decoration-thickness: 0.5pt; }
.fix ins { text-decoration: none; }
.fix-note { margin: 6px 0 0; font-size: 16px; color: var(--bluewell-graphite); }
.fixes-none { color: var(--bluewell-graphite); }
