/*
 * Quotes (quotes plan 7.1, 7.2; slice 4): /{c}/quotes/ and /{c}/quotes/{author-slug}/. Drawn from the approved design
 * canvas v15 ("BDeBooks Quotes design", owner yes 2026-11-20), on top of family-lists.css (crumbs, headings, the find
 * field and the pager come from there). Phone first; 44 px targets; tokens only from bde-f2.css. No share button yet
 * (slice 5). Never white-space: nowrap on words that come from a language file.
 */

/* Head: H1 and first line, the "find an author" field beside them on wide screens. */
.q-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin: 4px 0 20px; }
.q-head > div { flex: 1 1 420px; min-width: 0; }
.q-head .fl-lead { margin-top: 6px; }

/* Index: one card per author, the whole card is the link to the author's quote page. */
.q-authors { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.q-acard { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 4px 14px; padding: 16px; background: var(--f2-surface); border-radius: 22px; box-shadow: 0 1px 2px rgba(77, 40, 24, .06), 0 6px 18px rgba(77, 40, 24, .05); }
.q-acard:focus-within { box-shadow: 0 1px 2px rgba(77, 40, 24, .06), 0 0 0 3px var(--f2-accent); }
.q-acard .f2-avatar { width: 56px; height: 56px; }
.q-acard__name { margin: 0; font-family: var(--f2-display); font-weight: 700; font-size: 17px; line-height: 1.25; }
.q-acard__name a { color: var(--f2-ink); text-decoration: none; outline: 0; }
.q-acard__name a::after { content: ""; position: absolute; inset: 0; border-radius: 22px; }
.q-acard__meta { margin: 2px 0 0; font-size: 13.5px; color: var(--f2-muted); }
.q-acard__teaser { grid-column: 1 / -1; margin: 8px 0 0; font-family: var(--f2-serif); font-size: 16px; line-height: 1.45; color: var(--f2-body); }
.q-pager { margin-top: 24px; }

/* Author page: the facts card, the jump row, the Top section, the book sections. */
.q-layout { display: block; }
.q-facts { display: flex; gap: 14px; align-items: center; padding: 14px 16px; margin: 0 0 18px; background: var(--f2-surface); border-radius: 26px; box-shadow: 0 1px 2px rgba(77, 40, 24, .06), 0 6px 18px rgba(77, 40, 24, .06); }
.q-facts .f2-avatar { width: 56px; height: 56px; flex: 0 0 56px; }
.q-facts__text { min-width: 0; }
.q-facts__name { margin: 0; font-family: var(--f2-display); font-weight: 700; font-size: 18px; line-height: 1.2; }
.q-facts__life { margin: 2px 0 0; font-size: 14px; color: var(--f2-muted); }
.q-facts__link { display: flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 14.5px; }

.q-jump { display: flex; gap: 8px; margin: 0 -16px 20px; padding: 0 16px 4px; overflow-x: auto; scrollbar-width: thin; }
.q-jump a, .q-jump button { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--f2-field-edge); background: var(--f2-surface); color: var(--f2-ink); font-family: var(--f2-serif); font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; }
.q-jump button { font-family: var(--f2-ui); font-weight: 700; font-size: 14.5px; }
/* Without script every book shows and the button stays hidden; with script (html.js) the row starts in its final shape. */
.q-jump__all { display: none !important; }
.js .q-jump:not(.q-jump--open) .q-jump__all { display: inline-flex !important; }
.js .q-jump:not(.q-jump--open) [data-q-extra] { display: none; }

.q-top .f2-h2, .q-top h2 { margin: 4px 0 4px; }
.q-basis { margin: 0 0 12px; font-size: 14px; line-height: 1.45; color: var(--f2-sub); }

.q-list { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.q-quote { position: relative; margin: 0; padding: 22px 20px 14px; background: var(--f2-surface); border-radius: 22px; box-shadow: 0 1px 2px rgba(77, 40, 24, .06), 0 6px 18px rgba(77, 40, 24, .05); }
.q-quote__mark { position: absolute; top: 6px; left: 16px; font-family: var(--f2-serif); font-weight: 600; font-size: 54px; line-height: 1; color: var(--f2-rule); }
[dir="rtl"] .q-quote__mark { left: auto; right: 16px; }
.q-quote blockquote { margin: 18px 0 12px; font-family: var(--f2-serif); font-weight: 400; font-size: 19px; line-height: 1.5; color: var(--f2-ink); overflow-wrap: anywhere; text-wrap: pretty; }
.q-quote blockquote p { margin: 0; }
.q-top .q-quote blockquote { font-size: 20px; }
.q-quote__foot { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.q-known { display: flex; width: fit-content; align-items: center; min-height: 26px; padding: 0 10px; margin: 0; border-radius: 999px; background: var(--f2-t1-bg); color: var(--f2-t1-fg); font-size: 12.5px; font-weight: 700; }
.q-src { margin: 0; font-size: 14px; line-height: 1.4; color: var(--f2-muted); }
.q-booklink { display: inline-flex; align-items: center; min-height: 44px; vertical-align: middle; font-family: var(--f2-serif); font-weight: 600; font-size: 16.5px; color: var(--f2-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* A book's own section: a ruled reading list under its title. No content-visibility: its 600 px guess was taller than most
   sections, so the footer jumped as they came near the screen (audit V1, Q2: CLS 0.13 to 0.32 on phones). */
.q-booksec { margin-top: 28px; scroll-margin-top: 80px; }
.q-booksec__h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; font-family: var(--f2-display); font-weight: 700; font-size: 20px; line-height: 1.3; }
.q-booksec__link { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; font-family: var(--f2-serif); font-weight: 600; color: var(--f2-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.q-tile { flex: 0 0 34px; width: 34px; height: 51px; border-radius: 6px; object-fit: cover; background: var(--f2-coral-tint); box-shadow: 0 3px 8px rgba(77, 40, 24, .18); }
.q-booksec .q-list { gap: 0; }
.q-booksec .q-quote { padding: 18px 0 8px; background: transparent; box-shadow: none; border-radius: 0; border-top: 1px solid var(--f2-line); }
.q-booksec .q-quote__mark { position: static; display: block; height: 22px; font-size: 40px; }
.q-booksec .q-quote blockquote { margin: 4px 0 8px; font-size: 18px; }

/* Revealed in steps with script (bde-quotes.js); without script every quote shows. */
.q-wait { display: none !important; }
.q-more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 52px; margin: 22px 0 6px; border: 1px solid var(--f2-field-edge); border-radius: 16px; background: var(--f2-surface); color: var(--f2-ink); font: 700 16px/1.2 var(--f2-ui); cursor: pointer; }
.q-more span { color: var(--f2-muted); font-weight: 600; }

:where(.q-acard a, .q-jump a, .q-jump button, .q-booklink, .q-booksec__link, .q-facts__link, .q-more):focus-visible { outline: 3px solid var(--f2-accent); outline-offset: 2px; }

@media (min-width: 720px) {
  .q-authors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .q-jump { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding: 0; }
}

@media (min-width: 1100px) {
  .q-authors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .q-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; }
  .q-facts { flex-direction: column; align-items: flex-start; padding: 24px; position: sticky; top: 88px; }
  .q-facts .f2-avatar { width: 96px; height: 96px; flex-basis: 96px; }
  .q-top .q-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
}
