/*
 * Give me something to read (givemesomething.to/read), local prototype. Built on Watch's public/style.css, with
 * Read's own look: a bookshop after hours. Warm lamplit dark, cream text, book titles in Newsreader, covers standing on
 * shelves, and the reason a book fits written like a bookseller's shelf note. Set like print, not a template (D-029):
 * headings in serif small caps with a hairline, few boxes, 2-3px corners, shadows only under books, and coral kept to
 * the wordmark and one action; "selected" is cream. The shared brand (lockup, home sentence, All menu) stays Red Hat
 * with Read's coral. Book-only rules are at the end of the file.
 */

@font-face { font-family: 'Red Hat Display'; src: url('fonts/red-hat-display-latin-wght-normal.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'Red Hat Text'; src: url('fonts/red-hat-text-latin-wght-normal.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('fonts/newsreader-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('fonts/newsreader-latin-wght-italic.woff2') format('woff2'); font-weight: 200 800; font-style: italic; font-display: swap; }

:root {
  /* Neutral ramp (lamplit brown-black, cream ink), back to front */
  --canvas: #15110e;
  --surface: #1e1915;
  --raised: #2a231d;
  --skeleton: #231d18;
  --line: #3a3029;
  --line-strong: #85735f;
  --ink-3: #a5968a;
  --ink-2: #d2c5b3;
  --ink: #f5ede0;
  /* Shelves, and the cream card of a shelf note */
  --shelf: #33271d;
  --shelf-top: #6a5240;
  --paper: #efe4cf;
  --paper-ink: #2b2018;
  --paper-accent: #a5432f;
  /* The one accent: Read coral */
  --accent: #ff8f7a;
  --accent-strong: #ffa897;
  --on-accent: #2a0d07;
  --focus: #ff8f7a;
  /* Semantics */
  --free: #9edcae;
  --on-free: #10291a;
  --positive: #8fc6ff;
  --scrim: rgb(10 7 5 / 0.8);
  --shadow-pop: 0 18px 40px -16px rgb(0 0 0 / 0.6), 0 0 0 1px var(--line);
  /* The flat-to-dark band that lets a title sit on any still */
  --still-scrim: linear-gradient(to top, rgb(5 7 11 / 0.92), rgb(5 7 11 / 0.7) 55%, transparent);

  --font-display: 'Red Hat Display', system-ui, sans-serif;
  --font-body: 'Red Hat Text', system-ui, sans-serif;
  /* Book titles, headings and shelf notes: Newsreader, hosted with the site so it's the same on every computer (D-029) */
  --font-serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --radius: 3px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--canvas); color: var(--ink); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
body { margin: 0; min-height: 100dvh; background: var(--canvas); font-size: 15px; line-height: 1.45; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 32px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p, li { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }
.num { font-family: var(--font-body); font-variant-numeric: lining-nums proportional-nums; }
/* A section heading, set as a book sets one: serif small caps with a hairline running on to the edge (D-029). The
   browser draws the small caps: Newsreader's free release has none of its own. */
.label-caps { display: flex; align-items: center; gap: 12px; margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 17px; line-height: 1.2; font-variant-caps: all-small-caps; letter-spacing: 0.06em; color: var(--ink-2); }
.label-caps::after { content: ''; flex: 1; min-width: 24px; height: 1px; background: var(--line); }
/* Where a note follows the heading, the hairline runs on after the note instead. */
.has-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.has-note .label-caps::after { content: none; }
.has-note::after { content: ''; flex: 1; min-width: 24px; height: 1px; align-self: center; background: var(--line); }
.note { font-family: var(--font-serif); font-style: italic; font-size: 15px; line-height: 1.3; color: var(--ink-3); }
.hint { margin: 0; font-size: 13px; line-height: 1.35; color: var(--ink-3); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 6px; }
.ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ico svg { width: 100%; height: 100%; }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header { display: flex; align-items: center; gap: 16px; padding: 12px 32px; border-bottom: 1px solid var(--line); min-height: 68px; flex-wrap: wrap; }
/* The marquee lockup: the umbrella line small, the section's verb big in its colour (/play and /read get their own). */
.wordmark { display: inline-grid; gap: 4px; line-height: 1; text-decoration: none; color: var(--ink); }
.wordmark .wm-pre { font-family: var(--font-body); font-weight: 700; font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); }
.wordmark .wm-verb { font-family: var(--font-display); font-weight: 900; font-size: 30px; line-height: 0.85; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.wordmark:hover .wm-verb { color: var(--accent-strong); }
/* "Beta" on the live site, in italic beside the lockup. */
.proto-tag { font-family: var(--font-serif); font-style: italic; font-size: 15px; color: var(--ink-3); }
/* Preview (a private Vercel link) and Local are tagged loudly, so neither is mistaken for the live site. */
html[data-target='preview'] .proto-tag, html[data-target='local'] .proto-tag { padding: 2px 7px; border-radius: 2px; background: var(--accent); color: var(--on-accent); font-family: var(--font-body); font-style: normal; font-weight: 700; font-size: 12px; }
.header-search { flex: 1; max-width: 560px; margin-left: 24px; }
/* The way to the other apps and the front page, top right on every Watch page (D-025). A native popover:
   it opens, closes on Escape or a click outside, and needs no script. Anchored under its button where the
   browser can; elsewhere it sits at the top right, where the button always is. */
.apps { margin-left: auto; }
.owner-signout:not([hidden]) + .apps { margin-left: 8px; }
.apps-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 6px; background: none; color: var(--ink-2); font-weight: 700; font-size: 14px; anchor-name: --apps; }
.apps-btn:hover, .apps-btn:has(+ .apps-menu:popover-open) { color: var(--ink); background: var(--raised); }
.apps-menu { position: fixed; inset: auto; top: 64px; right: 16px; margin: 0; width: 280px; padding: 14px; border: 0; border-radius: 10px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); }
@supports (position-anchor: --apps) { .apps-menu { position-anchor: --apps; top: calc(anchor(bottom) + 8px); right: anchor(right); } }
.apps-menu:popover-open { display: grid; gap: 2px; }
.apps-pre { margin: 0; padding: 2px 10px 6px; font-weight: 700; font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); }
.apps-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 6px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; }
a.apps-item:hover { background: var(--raised); }
.apps-verb { font-family: var(--font-display); font-weight: 900; font-size: 26px; line-height: 0.9; letter-spacing: 0.04em; text-transform: uppercase; }
.apps-note { font-size: 12.5px; color: var(--ink-3); }
/* Each verb in its app's colour, as on the front page: watch amber, play mint, read coral. */
.v-watch .apps-verb { color: #f0b84a; }
.v-play .apps-verb { color: #6fdc9b; }
.v-read .apps-verb { color: var(--accent); }
.apps-home { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 6px; padding: 8px 10px 0; border-top: 1px solid var(--line); color: var(--ink-2); font-weight: 700; font-size: 14px; text-decoration: none; }
.apps-home:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ── Buttons ────────────────────────────────────────────────────────── */
/* Squared and quiet (D-029): a raised fill, or coral for the one main action. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--radius); font-weight: 700; font-size: 14px; transition: background-color 150ms var(--ease); }
.btn.secondary { background: var(--raised); color: var(--ink); }
.btn.secondary:hover { background: var(--line); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-strong); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[aria-pressed='true'] { background: var(--paper); color: var(--paper-ink); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: var(--radius); background: transparent; color: var(--ink-2); }
.icon-btn:hover { background: var(--raised); color: var(--ink); }
.text-btn { border: 0; background: none; padding: 10px 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.text-btn:hover { color: var(--ink); }

/* ── Search ─────────────────────────────────────────────────────────── */
.search { position: relative; }
.search-box { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink-3); }
.search-box:hover { border-color: var(--line-strong); }
.search-box:focus-within { outline: 3px solid var(--focus); outline-offset: 0; }
.search-box input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); font-size: 15px; height: 100%; }
.search-box input::placeholder { color: var(--ink-3); opacity: 1; }
.search-box input::-webkit-search-cancel-button { appearance: none; }
.search.lg .search-box { height: 56px; padding: 0 18px; }
.search.lg input { font-size: 17px; }
.search.dashed .search-box { background: transparent; height: 44px; }
.search ul { position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-pop); z-index: 30; max-height: 70vh; overflow: auto; min-width: 300px; }
/* A row: the title (picks it) with where it streams, and an ⓘ for its details (D-024). */
.search .s-row { display: flex; align-items: center; gap: 2px; border-radius: 2px; }
.search .s-row.active, .search .s-row:hover { background: var(--raised); }
.search .s-main { flex: 1; min-width: 0; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 8px; border: 0; background: none; text-align: left; border-radius: 2px; }
.search .s-main > img, .search .s-main > .noimg { width: 32px; height: 48px; object-fit: cover; border-radius: 4px; background: var(--raised); }
.search .s-text { display: grid; gap: 2px; min-width: 0; }
.search .s-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.search .s-name { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search .s-meta { flex: none; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.s-where { display: block; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-fig { font-weight: 800; color: var(--ink); }
.s-fig.free { color: var(--free); }
.s-fig.muted { color: var(--ink-3); font-weight: 600; }
.s-how { color: var(--ink-3); }
.search .s-logos { display: inline-flex; align-items: center; gap: 4px; }
.search .s-logos .w-logo { width: 22px; height: 22px; border-radius: 5px; }
.search .s-logos .mine { box-shadow: 0 0 0 2px var(--free); }
.search .s-more { padding: 1px 6px; border-radius: 4px; background: var(--line); color: var(--ink-2); font-size: 12px; font-weight: 700; }
.search .s-info { flex: none; color: var(--ink-3); }
.search .s-info:hover { color: var(--ink); background: var(--line); }
/* On a phone the words already say where; the logos make way for the title. */
@media (max-width: 639px) {
  .search .s-logos { display: none; }
  .search .s-main { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 6px 4px 6px 6px; }
}
.d-where-line { margin: 0; }
.d-where-line .s-where { font-size: 15px; white-space: normal; }
/* The rail's field is narrow: on desktop its list is at least 440px and opens over the results (New Game+ D-129); app.js places it. */

/* ── Home ───────────────────────────────────────────────────────────── */
.home { padding: 72px 0 56px; }
.hero { font-family: var(--font-display); font-weight: 800; font-size: clamp(44px, 6vw, 72px); line-height: 0.98; letter-spacing: -0.025em; }
.hero .accent { color: var(--accent); }
.lede { max-width: 600px; margin: 24px 0 28px; font-size: 17px; line-height: 1.4; color: var(--ink-2); }
.home-search { max-width: 672px; }
/* The home page sentence: "Give me something to watch like…", finished by the search field. */
.say { max-width: 11em; margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(36px, 5.6vw, 72px); line-height: 1; letter-spacing: -0.025em; }
.say .accent { color: var(--accent); }
.say-search { max-width: 760px; margin-top: 14px; }
.search.say .search-box { height: auto; gap: 14px; padding: 4px 0 12px; border: 0; border-bottom: 3px solid var(--accent); border-radius: 0; background: none; font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 3.2vw, 44px); letter-spacing: -0.02em; }
.search.say .search-box:focus-within { outline: none; box-shadow: 0 3px 0 var(--accent-strong); border-bottom-color: var(--accent-strong); }
.search.say input { height: auto; padding: 0; font: inherit; letter-spacing: inherit; }
.search.say ul { top: calc(100% + 12px); font-size: 15px; letter-spacing: 0; }
.say-caret { flex: none; width: 3px; height: 0.95em; background: var(--accent); animation: say-blink 1s steps(1) infinite; }
.search.say .search-box:focus-within .say-caret, .search.say .search-box:has(input:not(:placeholder-shown)) .say-caret { display: none; }
@keyframes say-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .say-caret { animation: none; } }
.notice { max-width: 672px; margin-top: 16px; padding: 12px 14px; border-radius: var(--radius); background: var(--raised); }
.home-starts { margin-top: 48px; }
.starts { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
/* Ten starters: two columns, or two full rows of five on desktop. */
@media (min-width: 1024px) { .starts { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.start { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; color: #fff; border-radius: 10px; overflow: hidden; outline-offset: 3px; transition: translate 200ms var(--ease); }
.start .start-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px; background: var(--still-scrim); font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.05; }
@media (max-width: 639px) { .starts { gap: 12px; } .start .start-name { padding: 20px 10px 8px; font-size: 15px; } }
@media (min-width: 1024px) and (max-width: 1279px) { .start .start-name { padding: 22px 12px 10px; font-size: 16px; } }
.start img, .start .noimg { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--raised); }
.start:hover { outline: 2px solid var(--accent); translate: 0 -2px; }

/* ── Discover: rail + results ───────────────────────────────────────── */
.discover { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 24px 0 64px; }
@media (min-width: 1024px) { .discover { grid-template-columns: 288px minmax(0, 1fr); } .rail { position: sticky; top: 16px; align-self: start; max-height: calc(100dvh - 32px); overflow: auto; padding-right: 4px; z-index: 20; } }
.rail { display: grid; gap: 30px; align-content: start; }
.rail-block { display: grid; gap: 14px; }

/* Your picks: the cover and the title, no panel round them. */
.seed-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.seed { display: grid; grid-template-columns: 40px minmax(0, 1fr) 44px; align-items: center; gap: 14px; border-radius: 2px; }
.seed img, .seed .noimg { width: 40px; height: 60px; object-fit: cover; border-radius: 2px; background: var(--raised); }
.seed-name { font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: 19px; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.seed-year { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
/* The pick just added: a cream ring that fades, so you can see where it went. */
.seed.just-added { animation: seed-in 1.6s var(--ease); }
@keyframes seed-in { from { box-shadow: 0 0 0 2px var(--paper); } to { box-shadow: 0 0 0 2px transparent; } }
.seed-note { margin: 8px 0 0; }

/* Traits: squared buttons. More of one is cream; left out is struck through on a hairline. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid transparent; border-radius: 2px; background: var(--raised); color: var(--ink-2); font-size: 14px; position: relative; transition: background-color 150ms var(--ease); }
.chip::after { content: ''; position: absolute; inset: -5px 0; }
.chip:hover { background: var(--line); color: var(--ink); }
.chip[data-state='more'] { background: var(--paper); color: var(--paper-ink); font-weight: 700; }
.chip[data-state='more']:hover { background: #fbf3e4; }
.chip[data-state='without'] { background: transparent; border-color: var(--line); color: var(--ink-3); }
.chip[data-state='without'] .chip-text { text-decoration: line-through; }
.chip .ico { width: 15px; height: 15px; }

.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.segmented button { min-height: 38px; border: 0; border-radius: 2px; background: var(--raised); color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.segmented button:hover { background: var(--line); color: var(--ink); }
.segmented button[aria-checked='true'] { background: var(--paper); color: var(--paper-ink); font-weight: 700; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.service { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 6px; background: var(--raised); text-align: left; font-size: 13px; line-height: 1.2; }
.service:hover { background: var(--line); }
.service img, .service .noimg { width: 26px; height: 26px; border-radius: 4px; flex: none; background: var(--line); }
.service .check { display: none; width: 18px; height: 18px; margin-left: auto; color: var(--on-accent); flex: none; }
.service[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.service[aria-pressed='true'] .check { display: inline-flex; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.switch-row:last-of-type { border-bottom: 1px solid var(--line); }
.switch-label { display: block; font-weight: 700; font-size: 14px; }
.switch-hint { display: block; font-size: 12px; color: var(--ink-3); }
.switch-row input { appearance: none; width: 40px; height: 24px; border-radius: 2px; background: var(--line-strong); position: relative; flex: none; cursor: pointer; transition: background-color 150ms var(--ease); }
.switch-row input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 1px; background: var(--surface); transition: translate 150ms var(--ease); }
.switch-row input:checked { background: var(--paper); }
.switch-row input:checked::after { translate: 16px 0; background: var(--paper-ink); }
/* Filters fold under a bar below 1024px, where the rail sits above the picks (D-028, as Play's). Open on desktop. */
.filters-toggle { display: none; }
@media (max-width: 1023px) {
  .filters-toggle { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: none; color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
  .filters-toggle:hover { border-color: var(--line-strong); }
  .filters-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
  .ft-label { font-family: var(--font-serif); font-weight: 500; font-size: 17px; font-variant-caps: all-small-caps; letter-spacing: 0.06em; color: var(--ink-2); }
  .ft-active { flex: 1; min-width: 0; overflow: hidden; font-weight: 400; font-size: 13px; color: var(--ink-3); white-space: nowrap; text-overflow: ellipsis; }
  .ft-chev { flex: none; margin-left: auto; transition: rotate 150ms var(--ease); }
  .filters-toggle[aria-expanded='true'] .ft-chev { rotate: 180deg; }
  .filters-toggle[aria-expanded='false'] + .filters { display: none; }
  .filters { padding: 4px 2px 0; }
}

/* Not ready yet (D-027): the row greyed, "Coming soon" where the switch would be. */
.switch-row.is-soon { cursor: default; }
.switch-row.is-soon .switch-label { color: var(--ink-3); }
.soon { flex: none; font-family: var(--font-serif); font-style: italic; font-size: 15px; white-space: nowrap; color: var(--ink-3); }

/* ── Results ────────────────────────────────────────────────────────── */
.results { min-width: 0; }
.results-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 30px; }
.summary { flex: 1 1 20rem; min-width: 0; font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.summary .num { font-family: var(--font-display); }
.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; row-gap: 40px; transition: opacity 150ms var(--ease); }
.shelf[aria-busy='true'] { opacity: 0.55; }
@media (min-width: 1280px) { .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cell { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }

.card { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; position: relative; }
.cover { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--raised); outline-offset: 3px; transition: translate 200ms var(--ease); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
/* No still: the poster, framed on its upper part */
.cover img.poster-fallback { object-position: center 22%; }
.card:has(.open:hover) .cover { outline-color: var(--accent); }
.cover .noart { display: grid; place-items: end start; height: 100%; padding: 12px; font-family: var(--font-display); font-weight: 800; font-size: 25px; line-height: 1; }
.card:has(.open:hover) .cover { outline: 2px solid var(--line-strong); translate: 0 -2px; }
.card:has(.open:focus-visible) .cover { outline: 3px solid var(--focus); translate: 0 -2px; }
.cover { cursor: pointer; }
.card:has(.cover:hover) .cover { outline: 2px solid var(--line-strong); translate: 0 -2px; }
.card:has(.cover:hover) .open { text-decoration: underline; }
.cover-tags { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.cover-tag { padding: 2px 6px; border-radius: 4px; background: color-mix(in srgb, var(--canvas) 90%, transparent); color: var(--ink); font-size: 12px; font-weight: 700; }
.match-tag { color: var(--accent); }

.info { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; min-width: 0; }
/* The title sits on the still: positioned from the info row up over the bottom of the cover */
.info { position: relative; }
.title { position: absolute; left: 0; right: 0; bottom: 100%; margin: 0; padding: 30px 14px 12px; background: var(--still-scrim); border-radius: 0 0 10px 10px; color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 25px; line-height: 1.02; letter-spacing: -0.015em; }
.open { padding: 0; border: 0; background: none; text-align: left; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.open::after { content: ''; position: absolute; inset: 0; z-index: 0; }
.open:hover, .open:focus-visible { text-decoration: underline; }
.open:focus-visible { outline: none; color: var(--accent); }
.meta { margin: 0; font-size: 13px; color: var(--ink-3); }
.reason { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: wrap; }
.stats { margin: auto 0 0; padding: 8px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats > div { padding: 0 8px; border-left: 1px solid var(--line); }
.stats > div:first-child { padding-left: 0; border-left: 0; }
.stats dt { font-family: var(--font-body); font-weight: 700; font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats dd { margin: 2px 0 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.stats dd.pos { color: var(--positive); }
.stats dd.unknown { color: var(--ink-3); }


.access { padding: 12px 0 10px; display: grid; gap: 6px; align-content: start; }
.access-figure { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; }
.access-figure.free { color: var(--free); }
.access-figure.muted { font-size: 19px; color: var(--ink-3); }
.access-note { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); min-height: 24px; min-width: 0; }
.access-note img { width: 22px; height: 22px; border-radius: 4px; flex: none; }
.access-note .txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-weight: 700; }
.access-note .how { color: var(--ink-3); font-weight: 400; }
.access-note .more-svc { flex: none; padding: 1px 6px; border-radius: 4px; background: var(--raised); color: var(--ink-2); font-size: 12px; font-weight: 700; }

.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: 6px; overflow: hidden; position: relative; z-index: 1; align-self: start; }
.act { display: grid; justify-items: center; gap: 4px; min-height: 56px; padding: 8px 2px; border: 0; background: var(--surface); color: var(--ink-2); font-size: 12px; font-weight: 700; }
.act:hover { background: var(--raised); color: var(--ink); }
.act[aria-pressed='true'] { background: var(--ink); color: var(--canvas); }
.act:focus-visible { outline-offset: -3px; }
.act .ico.down { rotate: 180deg; }

/* ── View switch and list view ──────────────────────────────────────── */
/* The tools stay on one line; when the title needs the room they move below it together. */
.results-tools { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.sort-menu { position: relative; }
.sort-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px 0 12px; border: 0; border-radius: 8px; background: var(--raised); color: var(--ink); font-size: 13px; font-weight: 700; }
.sort-btn:hover { background: var(--line); }
.sort-btn .sort-label { color: var(--ink-3); font-weight: 700; }
.sort-btn .chev { width: 16px; height: 16px; color: var(--ink-2); transition: rotate 150ms var(--ease); }
.sort-btn[aria-expanded='true'] .chev { rotate: 180deg; }
.sort-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 240px; margin: 0; padding: 6px; list-style: none; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-pop); outline: none; }
.sort-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.sort-list li:hover, .sort-list li.active { background: var(--raised); }
.sort-list:focus-visible li.active { outline: 2px solid var(--focus); outline-offset: -2px; }
.sort-opt { display: grid; flex: 1; }
.sort-opt-label { font-size: 14px; font-weight: 700; color: var(--ink); }
.sort-opt-desc { font-size: 12px; color: var(--ink-3); }
.sort-list .tick { width: 18px; height: 18px; color: var(--accent); }
.sort-hint { margin: -12px 0 16px; }
/* What the pay filter hides from the best matches, and one tap to widen it (D-034). */
.filter-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: -12px 0 16px; font-size: 14px; color: var(--ink-2); }
.sort-hint:not([hidden]) + .filter-hint { margin-top: -8px; }
.view-switch { display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--radius); background: var(--raised); }
.view-switch button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 0; border-radius: 2px; background: none; color: var(--ink-2); font-size: 13px; font-weight: 700; position: relative; }
.view-switch button::after { content: ''; position: absolute; inset: -6px 0; }
.view-switch button:hover { color: var(--ink); }
.view-switch button[aria-pressed='true'] { background: var(--paper); color: var(--paper-ink); }

.rows { list-style: none; margin: 0; padding: 0; transition: opacity 150ms var(--ease); }
.rows[aria-busy='true'] { opacity: 0.55; }
/* Wide: one line per title, columns aligned under a header */
.row-card, .row-head { display: grid; grid-template-columns: 28px 160px minmax(0, 1fr) 64px 64px 80px 220px 124px; align-items: center; column-gap: 16px; }
.row-head { padding: 0 0 10px; border-bottom: 1px solid var(--line); font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.row { border-bottom: 1px solid var(--line); }
.row-card { position: relative; padding: 12px 0; }
.row-card:has(.open:hover) { background: color-mix(in srgb, var(--raised) 45%, transparent); }
.row-card:has(.open:hover) .row-still, .row-card:has(.open:focus-visible) .row-still { outline: 2px solid var(--accent); outline-offset: 2px; }
.row-rank { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--ink-3); text-align: right; }
.row-still { width: 160px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--raised); }
.row-still img { width: 100%; height: 100%; object-fit: cover; }
.row-still img.poster-fallback { object-position: center 22%; }
.row-main { min-width: 0; display: grid; gap: 3px; }
.row-title { font-family: var(--font-display); font-weight: 800; font-size: 21px; line-height: 1.05; letter-spacing: -0.01em; }
.row-match { color: var(--accent); }
.row-reason { margin: 0; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-num { text-align: left; }
.row-num .num { font-family: var(--font-display); font-weight: 700; font-size: 19px; white-space: nowrap; }
.row-num .num.pos { color: var(--positive); }
.row-num .num.unknown { color: var(--ink-3); }
.row-num-label { display: none; }
.row-access { display: grid; gap: 4px; min-width: 0; }
.row-access .access-figure { font-size: 17px; }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; position: relative; z-index: 1; }
.ibtn { width: 36px; height: 36px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: none; color: var(--ink-3); position: relative; }
.ibtn::after { content: ''; position: absolute; inset: -4px; }
.ibtn:hover { background: var(--raised); color: var(--ink); }
.ibtn[aria-pressed='true'] { background: var(--ink); color: var(--canvas); }

/* Wide: the facts wrapper dissolves so its cells are the table's columns */
.row-facts { display: contents; }
/* Medium: title block on the first line, one line of facts under it */
@media (max-width: 1279px) {
  .row-head { display: none; }
  .row-card { grid-template-columns: 24px 136px minmax(0, 1fr) auto; grid-template-areas: 'rank still main actions' 'rank still facts facts'; row-gap: 10px; align-items: start; }
  .row-rank { grid-area: rank; padding-top: 4px; }
  .row-still { grid-area: still; width: 136px; }
  .row-main { grid-area: main; }
  .row-actions { grid-area: actions; }
  .row-facts { grid-area: facts; display: flex; flex-wrap: wrap; align-items: end; gap: 8px 24px; min-width: 0; }
  .row-num-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
  .row-access { flex: 1 1 180px; }
}
/* Phone: still and title, then the facts, then the actions */
@media (max-width: 639px) {
  .results-head { flex-direction: column; }
  .row-card { grid-template-columns: 96px minmax(0, 1fr) auto; grid-template-areas: 'still main main' 'facts facts actions'; column-gap: 12px; }
  .row-rank { display: none; }
  .row-still { width: 96px; }
  .row-title { font-size: 18px; }
  .row-reason { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .row-facts { gap: 8px 16px; }
  .row-access { flex-basis: 100%; }
  .row-actions { align-self: end; gap: 0; margin-right: -6px; }
}

.more-row { display: flex; align-items: center; gap: 16px; margin-top: 40px; }
.empty-shelf { border-top: 1px solid var(--line); padding-top: 24px; display: grid; gap: 12px; }
.empty-shelf .drops { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Phone: horizontal cards (New Game+'s < 640 layout) ─────────────── */
@media (max-width: 639px) {
  main { padding: 0 16px; }
  .site-header { padding: 10px 16px; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  /* The All menu stays on the logo's line; just its icon. */
  .apps { order: 2; }
  .apps-txt { display: none; }
  .apps-btn { width: 44px; justify-content: center; padding: 0; }
  .proto-tag { display: none; }
  .summary { flex: none; font-size: 34px; }
  .results-head { flex-direction: column; }
  .results-tools { flex-wrap: wrap; justify-content: flex-start; margin-left: 0; }
  .sort-list { left: 0; right: auto; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .chip { flex: none; }
  .shelf { grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
  .title { font-size: 23px; }
  /* One column stacks picks closely, so each is its own panel: its buttons plainly belong to it. */
  .card { background: var(--surface); border-radius: 12px; padding-bottom: 12px; }
  .card .cover { border-radius: 12px 12px 0 0; }
  .card .title { border-radius: 0; }
  .card .info { padding-left: 12px; padding-right: 12px; }
  .card .access { padding-left: 12px; padding-right: 12px; }
  .card .actions { margin: 0 12px; }
  .card .act { background: var(--raised); }
  .card .act:hover { background: var(--line); }
  .card .act[aria-pressed='true'] { background: var(--ink); color: var(--canvas); }
}

/* Trailer: one 16:9 frame; a poster button until played */
.trailer-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--raised); border: 0; padding: 0; display: block; }
.trailer-frame.skeleton { animation: pulse 1.4s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: 0.55; } }
.trailer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer-poster img { width: 100%; height: 100%; object-fit: cover; }
.play-pill { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.trailer-poster:hover .play-pill { background: var(--accent-strong); }

/* ── Drawer and dialog ──────────────────────────────────────────────── */
dialog { color: var(--ink); background: var(--surface); border: 0; padding: 0; }
dialog::backdrop { background: var(--scrim); }
/* max-width: none undoes the browser's default dialog cap, so the panel is full width on phones */
.drawer { margin: 0 0 0 auto; height: 100dvh; max-height: none; max-width: none; width: min(560px, 100vw); border-radius: 0; overflow: auto; }
.drawer[open] { animation: drawer-in 250ms var(--ease); }
@keyframes drawer-in { from { opacity: 0; transform: translateX(24px); } }
.drawer-inner { padding: 20px 24px 32px; display: grid; gap: 20px; }
.drawer-top { display: grid; grid-template-columns: 120px minmax(0, 1fr) 44px; gap: 16px; align-items: start; }
/* Title, byline and year beside the cover (was an inline style; the policy allows none, D-051). */
.drawer-heading { display: grid; gap: 6px; align-content: start; padding-top: 4px; }
.drawer-top img, .drawer-top .noimg { width: 120px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; background: var(--raised); }
.drawer-title { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 0.95; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.good-match { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
/* "Good match?" in the drawer: thumbs, then "What's off?" after a thumbs-down (New Game+'s D-118). */
.match-block { display: grid; gap: 10px; }
.ico.down { rotate: 180deg; }
.whats-off { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.whats-off .hint { color: var(--ink-2); }
.off-options { display: flex; flex-wrap: wrap; gap: 6px; }
.match-block .btn[aria-pressed='true'] { background: var(--ink); color: var(--canvas); }
.leave-out { justify-self: start; }
.note-form { display: flex; flex-wrap: wrap; gap: 8px; }
.note-input { flex: 1 1 200px; min-width: 0; min-height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; }
.vote-status:empty { display: none; }

/* Feedback dialog (footer → Feedback; New Game+'s D-115). */
.feedback-dialog { width: min(520px, calc(100vw - 32px)); }
.feedback-form { display: grid; gap: 14px; }
.feedback-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
.feedback-form label .opt { font-weight: 400; color: var(--ink-2); }
.feedback-form textarea, .feedback-form input[type='email'] { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; }
.feedback-form textarea { resize: vertical; line-height: 1.4; }
.feedback-form .trap { position: absolute; left: -9999px; width: 0; height: 0; opacity: 0; }
.feedback-status:empty { display: none; }
.footer-links button { padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; cursor: pointer; }
.footer-links button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 639px) { .footer-links button { display: inline-flex; align-items: center; min-height: 44px; } }
.d-section { display: grid; gap: 10px; }
.d-section p { margin: 0; color: var(--ink-2); }
.d-section .hint { color: var(--ink-3); }
.credits { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; font-size: 14px; }
.credits dt { color: var(--ink-3); }
.credits dd { margin: 0; }
.dialog { width: min(760px, calc(100vw - 32px)); border-radius: var(--radius); padding: 20px 24px 24px; }
.dialog[open] { display: grid; gap: 16px; animation: fade-in 200ms var(--ease); }
@keyframes fade-in { from { opacity: 0; } }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-title { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 0.95; }
.blind-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.blind-cols ol { margin: 10px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.blind-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.blind-reveal { margin: 0; padding: 12px 14px; border-radius: 6px; background: var(--raised); }

/* ── Info pages: About and sources, Privacy, Terms ───────────────────── */
.doc { max-width: 720px; padding: 56px 0 72px; }
.doc h1 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 5vw, 56px); line-height: 1; letter-spacing: -0.025em; }
.doc .lead { margin: 16px 0 0; font-size: 18px; line-height: 1.5; color: var(--ink-2); }
.doc .updated { margin: 10px 0 0; font-size: 13px; color: var(--ink-3); }
.doc .cta { margin: 24px 0 0; }
.doc a.btn { text-decoration: none; }
.doc h2 { margin: 44px 0 12px; font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.1; letter-spacing: -0.01em; }
.doc p, .doc li { font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.doc p { margin: 0 0 12px; }
.doc ul { display: grid; gap: 8px; margin: 0 0 12px; padding-left: 20px; }
.doc a:not(.btn) { color: var(--ink); text-underline-offset: 3px; }
.sources { display: grid; gap: 16px; margin: 0 0 16px; }
.sources > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 20px; align-items: baseline; }
.sources dt { font-weight: 700; color: var(--ink); }
.sources dd { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.sources .tmdb-logo { display: block; height: 12px; width: auto; }
@media (max-width: 639px) { .doc { padding: 36px 0 56px; } .sources > div { grid-template-columns: minmax(0, 1fr); } }

/* ── Owner page (New Game+'s D-119) ─────────────────────────────────── */
.doc.owner { max-width: 960px; }
.owner-catalog { margin: 8px 0 8px; padding: 12px 16px; border-radius: 8px; background: var(--surface); }
.doc.owner .owner-catalog p { margin: 0; }
.doc.owner .owner-warn { margin-top: 6px; color: var(--accent); font-weight: 700; }
.owner-signout { margin-left: auto; }
.owner-login { display: grid; gap: 8px; max-width: 420px; margin-top: 24px; }
.owner-login label { font-weight: 700; }
.owner-login-row { display: flex; gap: 8px; }
.owner-login input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; }
.owner-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.owner-tabs button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 6px; background: var(--raised); color: var(--ink-2); font-weight: 700; font-size: 14px; }
.owner-tabs button[aria-selected='true'] { background: var(--ink); color: var(--canvas); }
.owner-inbox, .owner-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.owner-item { padding: 14px 16px; border-radius: 8px; background: var(--surface); display: grid; gap: 8px; }
.owner-item p { margin: 0; }
.doc.owner .owner-message { white-space: pre-wrap; color: var(--ink); }
.owner-status { text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; font-weight: 700; }
.owner-status.s-new { color: var(--accent); }
.owner-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.owner-actions .btn[aria-pressed='true'] { background: var(--ink); color: var(--canvas); }
.owner-delete { margin-left: auto; }
.owner-rates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.owner-rate { padding: 14px 16px; border-radius: 8px; background: var(--surface); }
.owner-rate p { margin: 0; }
.doc.owner .owner-figure { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1.1; color: var(--ink); }
.doc.owner h3 { margin: 28px 0 10px; }
.owner-weeks { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; align-items: end; }
.owner-week { display: grid; gap: 4px; justify-items: center; }
.owner-bar { display: flex; align-items: flex-end; width: 100%; height: 120px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.owner-bar > span { display: flex; align-items: flex-end; width: 100%; background: var(--line-strong); }
.owner-bar-up { width: 100%; background: var(--accent); }
.owner-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.owner-table th, .owner-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.owner-table th { color: var(--ink-3); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.owner-table .num { text-align: right; }
.owner-notes li { padding: 10px 14px; border-radius: 8px; background: var(--surface); }
.owner-notes p { margin: 0; }
@media (max-width: 639px) { .owner-rates { grid-template-columns: minmax(0, 1fr); } .doc.owner .owner-figure { font-size: 32px; } }

/* One or two quiet lines: TMDB's logo and required notice, then the info pages. */
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding: 16px 32px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.4; color: var(--ink-3); }
.footer-credit { margin: 0; }
/* TMDB's logo at the smallest size that stays readable (9px tall), well below our own marks as its terms ask. */
.tmdb-mark { display: inline-flex; flex: none; }
.tmdb-mark img { display: block; height: 9px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover, .footer-links a[aria-current='page'] { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 639px) { .site-footer { padding: 12px 16px 16px; } .footer-links a { display: inline-flex; align-items: center; min-height: 44px; } }

/* ── Where to watch (details panel): one row per service ──────────────── */
.w-logo { border-radius: 6px; object-fit: cover; flex: none; background: var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.wt { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.wt thead th:not(:first-child) { width: 56px; }
.wt th, .wt td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
.wt thead th { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); text-align: center; padding-top: 0; }
.wt thead th:first-child { text-align: left; }
.wt thead th.free { color: var(--free); }
.wt tbody th { text-align: left; font-weight: 700; }
.wt-svc { display: inline-flex; align-items: center; gap: 10px; }
.wt-svc .w-logo { width: 26px; height: 26px; }
.wt-yours { padding: 1px 6px; border-radius: 4px; background: var(--free); color: var(--canvas); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.wt td { text-align: center; width: 56px; color: var(--ink); }
.wt td.free { color: var(--free); }
.wt td .ico { width: 18px; height: 18px; }
.wt-no { color: var(--line-strong); }
.wt-svc { min-width: 0; }
.wt-name { min-width: 0; }
.wt-yours { display: inline-block; margin-left: 8px; white-space: nowrap; vertical-align: 1px; }
@media (max-width: 639px) {
  .drawer-inner { padding: 16px 16px 28px; }
  .wt thead th:not(:first-child) { width: 44px; }
  .wt th, .wt td { padding: 8px 2px; }
  .wt thead th { font-size: 10px; letter-spacing: 0.06em; }
  .wt-svc { gap: 8px; }
  .wt-svc .w-logo { width: 22px; height: 22px; }
  .wt-yours { font-size: 10px; padding: 1px 4px; }
}

/* ── Filters (concept A: set once) ─────────────────────────────────── */
.filters { display: grid; gap: 22px; }
.fc-block { display: grid; gap: 10px; }
.fc-head { display: flex; align-items: center; justify-content: space-between; }
.fc-head .text-btn { padding: 0; }
/* Show: two by two, so every label fits on one line. */
.segmented.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.segmented.four button { font-size: 14px; padding: 0 6px; }
.segmented.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.segmented.three button { font-size: 12.5px; padding: 0 2px; }
.svc-logo { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; flex: none; background: var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.logo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; border: 0; border-radius: 8px; background: var(--surface); text-align: left; }
.logo-row:hover { background: var(--raised); }
.logo-row .more-svc, .lib-tag { padding: 2px 6px; border-radius: 4px; background: var(--raised); color: var(--ink-2); font-size: 12px; font-weight: 700; }

/* Services picker */
.picker { width: min(720px, calc(100vw - 32px)); max-height: min(86vh, 900px); }
.picker[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.pick-body { overflow: auto; display: grid; gap: 22px; padding: 4px 2px; align-content: start; }
.pick-section { display: grid; gap: 10px; }
.pick-section .service .svc-logo { width: 26px; height: 26px; }
.service .svc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-more { padding-top: 4px; }
.pick-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.service-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* The big eight: two rows of four, or four rows of two on phones. */
.service-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 639px) {
  .service-grid.three, .service-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Two columns are narrow: long names wrap to a second line rather than being cut. */
  .pick-section .service .svc-name { white-space: normal; line-height: 1.15; }
  .pick-section .service { gap: 6px; padding: 6px; }
  .pick-section .service .svc-logo { width: 22px; height: 22px; }
  .pick-section .service .check { width: 14px; height: 14px; }
}


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

/* ── Books (Read only) ──────────────────────────────────────────────── */
/* Covers are portrait (2:3) and carry their own type, so titles sit under them. Each is drawn as a book: a spine
   crease down the left edge and a shadow where it stands. Books are the one thing with a shadow (D-029). */
.bcover { position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; border-radius: 1px 4px 4px 1px; overflow: hidden; background: var(--raised); box-shadow: 0 14px 18px -12px rgb(0 0 0 / 0.9), 0 1px 0 rgb(0 0 0 / 0.5); }
.bcover::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgb(0 0 0 / 0.32) 0, rgb(255 255 255 / 0.12) 3px, rgb(0 0 0 / 0.12) 7px, transparent 14px); }
.bcover img { width: 100%; height: 100%; object-fit: cover; }
/* No cover on file: the title on a plain cloth board, never a made-up image. */
.bcover .nocover { display: grid; align-content: space-between; height: 100%; padding: 14px 12px 12px 20px; background: linear-gradient(160deg, #3b2f26, #2a211b); font-family: var(--font-serif); font-weight: 600; font-size: 17px; line-height: 1.12; color: var(--ink); overflow: hidden; overflow-wrap: anywhere; }
.bcover .nocover small { font-family: var(--font-body); font-weight: 700; font-size: 11.5px; color: var(--ink-3); }
/* The board in the small covers: the starters, the series shelf and the gems (a cover that fails to load gets it too). */
.start .bcover .nocover { padding: 10px 8px 10px 14px; font-size: 13px; }
.start .bcover .nocover small { font-size: 10px; }
.ss-book .bcover .nocover { padding: 8px 6px 8px 12px; font-size: 12px; }
.ss-book .bcover .nocover small { font-size: 9.5px; }
.gem .bcover .nocover { padding: 3px 3px 3px 6px; font-size: 7px; }
.gem .bcover .nocover small { display: none; }
/* A sticker on a board would hide its title or author: the board's type moves clear of it. */
.book .shelved:has(.book-tags) .nocover { padding-top: 34px; }
.book .shelved:has(.series-tag) .nocover { padding-bottom: 34px; }
.ss-book .shelved:has(.ss-flag) .nocover { padding-top: 26px; }

/* The shelf: a plank under each row of covers. Every cover carries its own piece, half a gap wider on each side,
   so the pieces meet into one plank across the row. The book lifts off it on hover. */
.shelved { position: relative; display: block; }
.shelved::before { content: ''; position: absolute; left: calc(var(--half-gap, 10px) * -1); right: calc(var(--half-gap, 10px) * -1); bottom: -11px; height: 11px; border-radius: 1px; background: linear-gradient(var(--shelf-top), var(--shelf) 3px, #241b14); box-shadow: 0 10px 12px -8px rgb(0 0 0 / 0.85); }

/* Stickers, as a bookshop puts them on a cover: cream paper, flat. "Free" is green; the rest are cream, with
   "Matches 2 picks" and "Next" in the paper's red. Sentence case, not tracked capitals (D-029). */
.book-tag, .series-tag, .ss-flag { border-radius: 2px; background: var(--paper); color: var(--paper-ink); font-family: var(--font-body); font-size: 11px; font-weight: 700; line-height: 1.3; }

/* Home: the ten starters on one shelf, so Hidden gems fit under them (D-023). All ten across from 1100px; narrower,
   the shelf scrolls sideways (a thin scrollbar with a mouse, none on phones). */
.home-starts { margin-top: 40px; }
.starts { --half-gap: 10px; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1099px) {
  .starts { display: flex; margin: 16px -32px 0; padding: 0 32px 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 32px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  .starts li { flex: 0 0 112px; scroll-snap-align: start; }
}
@media (max-width: 639px) {
  .starts { --half-gap: 7px; gap: 14px; margin: 16px -16px 0; padding: 0 16px 6px; scroll-padding: 0 16px; scrollbar-width: none; }
  .starts::-webkit-scrollbar { display: none; }
  .starts li { flex-basis: 96px; }
}
.start { display: grid; gap: 6px; align-content: start; color: var(--ink); border-radius: 2px; overflow: visible; }
.start:hover { outline: none; translate: none; }
.start .shelved { margin-bottom: 14px; }
.start .bcover { transition: translate 200ms var(--ease); }
.start:hover .bcover, .start:focus-visible .bcover { translate: 0 -4px; }
.start:focus-visible { outline: none; }
.start:focus-visible .bcover { outline: 3px solid var(--focus); outline-offset: 3px; }
.start .start-name { position: static; display: -webkit-box; padding: 0; background: none; font-family: var(--font-serif); font-weight: 500; font-size: 15.5px; line-height: 1.2; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.start .start-by { overflow: hidden; margin-top: -3px; font-size: 12px; color: var(--ink-3); white-space: nowrap; text-overflow: ellipsis; }
.home-starts .label-caps { margin-bottom: 6px; }

/* Hidden gems (D-023, as Watch's D-045): quieter than the starters, under their own heading. Two rows of five on
   desktop, each under two starters (the same column gap, so the edges line up); two columns on tablets; six as a list
   on phones. */
.home-gems { margin-top: 40px; }
.gems { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 20px; }
@media (min-width: 640px) { .gems { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; } }
@media (min-width: 1024px) { .gems { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 639px) { .gems li:nth-child(n + 7) { display: none; } }
.gem { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; width: calc(100% + 16px); margin: 0 -8px; padding: 6px 8px; border: 0; border-radius: 2px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.gem:hover { background: var(--surface); }
.gem:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; }
.gem .bcover { border-radius: 1px 3px 3px 1px; box-shadow: 0 6px 10px -6px rgb(0 0 0 / 0.9); }
.gem-text { display: grid; gap: 1px; min-width: 0; }
.gem-name { display: -webkit-box; overflow: hidden; font-family: var(--font-serif); font-weight: 500; font-size: 16px; line-height: 1.2; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.gem-meta { overflow: hidden; font-size: 12.5px; line-height: 1.35; color: var(--ink-3); white-space: nowrap; text-overflow: ellipsis; }
.gem-score { font-size: 12.5px; line-height: 1.35; }
.gem-score b { font-weight: 700; color: var(--positive); }
@media (max-width: 639px) {
  .gem { grid-template-columns: 32px minmax(0, 1fr); padding: 5px 8px; }
  .gem-text { display: flex; flex-wrap: wrap; column-gap: 6px; }
  .gem-name { flex-basis: 100%; -webkit-line-clamp: 1; }
  .gem-meta { flex: 0 1 auto; min-width: 0; }
  .gem-score { flex: none; }
}

/* In this series (D-026): a pick's series on its own short shelf above the picks, in reading order, the pick outlined
   and the next book flagged. One row, no panel round it; it scrolls sideways when the series is long. */
.series-shelves:empty { display: none; }
.series-shelf { margin: 0 0 36px; }
.ss-head { margin-bottom: 14px; }
.ss-row { --half-gap: 10px; list-style: none; display: flex; gap: 20px; margin: 0 -10px; padding: 4px 10px 12px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 10px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.ss-row li { flex: 0 0 84px; scroll-snap-align: start; }
.ss-book { display: grid; gap: 4px; width: 100%; padding: 0; border: 0; background: none; color: var(--ink-2); text-align: left; cursor: pointer; }
.ss-book .shelved { margin-bottom: 12px; }
.ss-book .bcover { transition: translate 200ms var(--ease); }
.ss-book:hover .bcover, .ss-book:focus-visible .bcover { translate: 0 -3px; }
.ss-book:focus-visible { outline: none; }
.ss-book:focus-visible .bcover { outline: 3px solid var(--focus); outline-offset: 3px; }
.ss-book.is-pick .bcover { outline: 1px solid var(--ink-3); outline-offset: 3px; }
.ss-flag { position: absolute; left: 4px; top: 4px; z-index: 1; padding: 2px 5px; font-size: 10px; }
.ss-flag.next { color: var(--paper-accent); }
.ss-pos { font-size: 11.5px; color: var(--ink-3); }
.ss-book.is-next .ss-pos { font-weight: 700; color: var(--ink-2); }
.ss-name { display: -webkit-box; overflow: hidden; font-family: var(--font-serif); font-weight: 500; font-size: 14px; line-height: 1.2; color: var(--ink); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
@media (max-width: 639px) { .ss-row { --half-gap: 7px; gap: 14px; } .ss-row li { flex-basis: 72px; } }

/* ── The catalogue card (D-029, D-031) ──────────────────────────────── */
/* Covers on shelves, two to five across. Under the shelf, each book's label reads left to right like a catalogue
   card: the title, "Author · year", the picks it's like (with more than one), why it fits in italics, then two squared
   buttons: the way to get it and More like this. Each book spans seven rows of the shelf, shared through subgrid, so
   every part lines up across the row: titles start on one line, and a one-line title leaves room under it when another
   in the row takes two (D-031). A hairline runs between books, from the title to the buttons. Spacing is margins, as
   the shelf has no row gap. */
.bookshelf { --half-gap: 22px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 44px; transition: opacity 150ms var(--ease); }
.bookshelf[aria-busy='true'] { opacity: 0.55; }
@media (min-width: 900px) { .bookshelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .bookshelf { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .bookshelf { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.book { position: relative; display: grid; grid-row: span 7; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); row-gap: 0; min-width: 0; }
/* Each part on its own row, so a book without the picks line keeps its reason on the reason row. */
@media (min-width: 640px) {
  .book > .cover-btn { grid-row: 1; }
  .book > .book-title { grid-row: 2; }
  .book > .book-by { grid-row: 3; }
  .book > .why-for { grid-row: 4; }
  .book > .reason { grid-row: 5; }
  .book > .book-where { grid-row: 6; }
  .book > .book-actions { grid-row: 7; }
  /* The rule in the gutter to a book's left: placed on the label's rows but out of the flow, so it sizes nothing. */
  .book::before { content: ''; position: absolute; grid-row: 2 / 8; grid-column: 1; top: 2px; bottom: 40px; left: calc(var(--half-gap) * -1); width: 1px; background: var(--line); }
}
/* None before the first book in each row: two, three, four or five across. */
@media (min-width: 640px) and (max-width: 899px) { .book:nth-child(2n + 1)::before { display: none; } }
@media (min-width: 900px) and (max-width: 1279px) { .book:nth-child(3n + 1)::before { display: none; } }
@media (min-width: 1280px) and (max-width: 1499px) { .book:nth-child(4n + 1)::before { display: none; } }
@media (min-width: 1500px) { .book:nth-child(5n + 1)::before { display: none; } }
.book .cover-btn { display: block; margin-bottom: 22px; padding: 0; border: 0; background: none; border-radius: 2px; cursor: pointer; }
.book .bcover { transition: translate 200ms var(--ease); }
.book .cover-btn:hover .bcover { translate: 0 -4px; }
.book .cover-btn:focus-visible { outline: none; }
.book .cover-btn:focus-visible .bcover { outline: 3px solid var(--focus); outline-offset: 3px; translate: 0 -4px; }
.book-tags { position: absolute; top: 8px; left: 8px; right: 6px; z-index: 1; display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none; }
.book-tag { padding: 3px 7px; }
.book-tag.free { background: var(--free); color: var(--on-free); }
.book-tag.match { color: var(--paper-accent); }
/* Line height 1.25: the two-line clamp keeps the descenders. */
.book-title { align-self: start; margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 20px; line-height: 1.25; }
/* Two lines at most, clamped inside the title button (a clamp on the heading can't cut into a button). */
.book-title .tt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-title .open { text-align: left; }
/* Watch stretches the title over its card; here the cover, title and where button are each their own button. */
.book .open::after { content: none; }
.book-by { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The year in the serif, as a catalogue card sets it. (Newsreader's free release has no old-style figures.) */
.yr { font-family: var(--font-serif); font-size: 1.1em; }
/* Why it fits: in the hand of a bookseller's shelf note, a serif italic. Above it, small, the picks it's like. */
.book .reason { align-self: start; margin-top: 8px; -webkit-line-clamp: 3; font-family: var(--font-serif); font-style: italic; font-size: 16px; line-height: 1.35; color: var(--ink-2); }
.why-for { align-self: start; margin: 10px 0 0; font-size: 12.5px; line-height: 1.35; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book .why-for + .reason { margin-top: 3px; -webkit-line-clamp: 2; }
/* The way to get it: a squared button with a hairline, the best way first and the next one muted under it. It opens
   the details panel. */
.book-where { align-self: start; justify-self: start; display: grid; gap: 1px; max-width: 100%; min-height: 36px; margin: 14px 0 0; padding: 7px 11px; border: 1px solid var(--line); border-radius: var(--radius); background: none; text-align: left; font-size: 13.5px; line-height: 1.3; color: var(--ink-2); cursor: pointer; }
.book-where:hover { border-color: var(--line-strong); }
.bw-main { min-width: 0; overflow: hidden; font-weight: 700; color: var(--ink); white-space: nowrap; text-overflow: ellipsis; }
.bw-main.free, .book-where strong.free { color: var(--free); }
.book-where strong { margin-right: 4px; font-weight: 700; color: var(--ink); }
.bw-alt { font-size: 12.5px; color: var(--ink-3); }
/* More like this: a squared button, a raised fill. */
.book-actions { display: flex; gap: 6px; margin: 8px 0 40px; }
.book-actions .btn { flex: 1; min-height: 36px; padding: 0 10px; background: var(--raised); color: var(--ink-2); font-size: 13.5px; }
.book-actions .btn:hover { background: var(--line); color: var(--ink); }
.book-actions .btn .ico { width: 16px; height: 16px; }
.setup { display: grid; }
.setup .hint { margin: 6px 0 0; }

/* Phones: one book per row, the cover on the left and the label beside it, no shelves (a shelf holds a row, and a row
   here is one book). A hairline between books, not a panel round each. */
@media (max-width: 639px) {
  .bookshelf { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .book { grid-row: auto; grid-template-rows: none; grid-template-columns: 96px minmax(0, 1fr); align-content: start; column-gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
  .book > * { grid-column: 2; }
  .book-title { align-self: start; font-size: 19px; }
  .book .cover-btn { grid-column: 1; grid-row: 1 / span 4; align-self: start; margin-bottom: 0; }
  .book .shelved::before { display: none; }
  .book .reason { font-size: 15.5px; }
  .book-where { margin-top: 10px; }
  .book-actions { grid-column: 1 / -1; margin: 14px 0 0; }
  .book .bcover .nocover { padding: 8px 6px 8px 12px; font-size: 12px; }
  .book .bcover .nocover small { font-size: 10px; }
  .starts { --half-gap: 6px; column-gap: 12px; }
}

/* The rail: your picks, steering and your setup, each under its own ruled heading. */
.seed .bcover { width: 40px; border-radius: 1px 3px 3px 1px; box-shadow: 0 6px 10px -6px rgb(0 0 0 / 0.9); }
.seed .bcover .nocover { padding: 3px 3px 3px 6px; font-size: 8px; }
.drawer-top .bcover { width: 120px; }
.search .s-main > .bcover { width: 32px; border-radius: 1px 3px 3px 1px; box-shadow: none; }
.search .s-main > .bcover .nocover { padding: 2px 2px 2px 5px; font-size: 6px; }
.search .s-name { font-family: var(--font-serif); font-weight: 500; font-size: 16px; }

/* Results heading, as a bookseller would put it: "For readers of The Farthest Shore", the count small beside it. */
.results-title { flex: 1 1 24rem; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.summary { flex: 0 1 auto; min-width: 0; font-family: var(--font-serif); font-weight: 400; font-size: 40px; line-height: 1.08; letter-spacing: -0.01em; }
.summary i { font-weight: 500; }
.count { font-size: 14px; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 639px) { .results-head { align-items: flex-start; } .results-title { flex: none; } .summary { font-size: 30px; } }

/* Details panel */
.drawer-title { font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: 30px; line-height: 1.08; }
.d-by { margin: 0; font-size: 15px; color: var(--ink-2); }
.d-meta { margin: 0; font-family: var(--font-serif); font-size: 16px; color: var(--ink-3); }
/* The shelf note: why this book fits, on a cream card, as a bookseller would write it. */
.talker { margin: 0; padding: 16px 18px; border-radius: 2px; background: var(--paper); color: var(--paper-ink); font-family: var(--font-serif); font-size: 17px; line-height: 1.4; }
.talker-label { display: block; margin-bottom: 4px; font-style: italic; font-size: 15px; color: var(--paper-accent); }

/* Where to read (details panel): what's known, then what you can check. */
.wr { display: grid; gap: 18px; }
.wr-group { display: grid; gap: 0; }
.wr-group h4 { margin: 0 0 2px; font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 15px; color: var(--ink-3); }
.wr-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; min-height: 44px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.wr-row:last-child { border-bottom: 0; }
.wr-name { font-weight: 700; }
.wr-what { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
.wr-fig { font-weight: 700; font-size: 15px; white-space: nowrap; }
.wr-fig.free { color: var(--free); }
.wr-fig.check { font-weight: 400; font-size: 14px; color: var(--ink-2); }
.wr-row a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.wr-row a:hover .wr-name { text-decoration: underline; text-underline-offset: 3px; }
.wr-row a .ico { width: 14px; height: 14px; color: var(--ink-3); }
.wr-pending { color: var(--ink-3); font-size: 13px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; }
.fact { padding: 3px 9px; border-radius: 2px; background: var(--raised); font-size: 13px; color: var(--ink-2); }
.fact.kind { color: var(--ink); font-weight: 700; }
.drawer .links { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; }
.drawer .links a { color: var(--ink-2); text-underline-offset: 3px; }
/* "Pick off the mark? Tell us" (D-026): quiet, at the foot of the panel. */
.drawer .report { margin: 20px 0 4px; }
.drawer .report a { color: var(--ink-2); text-underline-offset: 3px; }
.site-footer a { color: var(--ink-2); }

/* Synopsis, under the cover in the details panel: five lines, then More. */
.synopsis-wrap { display: grid; justify-items: start; gap: 2px; }
.synopsis { margin: 0; font-family: var(--font-serif); font-size: 17px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
/* "expanded", not "open": .open is the title button, with its underline and a click layer over the card. */
.synopsis.expanded { display: block; }
.synopsis-more { padding: 6px 0; font-size: 13px; }

/* Where to get it: Read and Listen as two squared tabs, each with its own price; the chosen one raised, a cream rule
   along its foot. */
.wr-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wr-tab { display: grid; align-content: start; gap: 2px; min-height: 72px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: none; text-align: left; color: var(--ink-2); }
.wr-tab:hover { border-color: var(--line-strong); }
.wr-tab[aria-selected='true'] { border-color: var(--raised); background: var(--raised); box-shadow: inset 0 -2px 0 var(--paper); color: var(--ink); }
.wr-tab-label { font-weight: 700; font-size: 14px; }
.wr-tab-price { font-family: var(--font-serif); font-weight: 500; font-size: 25px; line-height: 1.1; color: var(--ink); }
.wr-tab-what { font-size: 12px; line-height: 1.3; color: var(--ink-3); }

/* ── List view: one ranked row per book, for scanning ─────────────────── */
.booklist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); transition: opacity 150ms var(--ease); }
.booklist[aria-busy='true'] { opacity: 0.55; }
.brow { display: grid; grid-template-columns: 28px 56px minmax(0, 1fr) minmax(200px, 270px) auto; align-items: center; column-gap: 18px; padding: 12px 8px 12px 0; border-bottom: 1px solid var(--line); }
.brow:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.brow-rank { font-family: var(--font-serif); font-weight: 500; font-size: 19px; color: var(--ink-3); text-align: right; }
.brow .cover-btn { display: block; padding: 0; border: 0; background: none; cursor: pointer; }
.brow .bcover { width: 56px; box-shadow: 0 6px 10px -6px rgb(0 0 0 / 0.9); }
.brow .bcover .nocover { padding: 4px 3px 4px 8px; font-size: 8.5px; }
.brow .bcover .nocover small { font-size: 7px; }
.brow .cover-btn:focus-visible { outline: none; }
.brow .cover-btn:focus-visible .bcover { outline: 3px solid var(--focus); outline-offset: 2px; }
.brow-main { display: grid; gap: 2px; min-width: 0; }
.brow-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 19px; line-height: 1.3; }
.brow-open { min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brow-open:hover, .brow-open:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.brow-open:focus-visible { outline: none; color: var(--accent); }
.brow-title .book-tag { flex: none; font-size: 10.5px; }
.brow-by { margin: 0; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brow-reason { margin: 0; font-family: var(--font-serif); font-style: italic; font-size: 15px; line-height: 1.4; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brow .book-where { margin: 0; align-self: center; }
.brow .bw-main { font-weight: 400; color: var(--ink-2); white-space: normal; }
.brow-actions .btn { min-height: 36px; padding: 0 12px; background: var(--raised); color: var(--ink-2); font-size: 13.5px; }
.brow-actions .btn:hover { background: var(--line); color: var(--ink); }
/* Medium: the way to get it moves under the title; the button keeps just its icon. */
@media (max-width: 1279px) {
  .brow { grid-template-columns: 28px 56px minmax(0, 1fr) auto; grid-template-areas: 'rank cover main actions' 'rank cover where actions'; row-gap: 6px; }
  .brow-rank { grid-area: rank; }
  .brow .cover-btn { grid-area: cover; }
  .brow-main { grid-area: main; }
  .brow .book-where { grid-area: where; justify-self: start; }
  .brow-actions { grid-area: actions; }
  .brow-act-txt { display: none; }
  .brow-actions .btn { width: 40px; padding: 0; }
}
/* Phones: no rank; the cover beside title and way, the button at the end of the title line. */
@media (max-width: 639px) {
  .brow { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: 'cover main actions' 'cover where where'; column-gap: 12px; padding-right: 0; }
  .brow-rank { display: none; }
  .brow-title { font-size: 17px; }
  .brow-actions { align-self: start; }
}
.view-switch button .ico { width: 16px; height: 16px; }

/* The series sticker: a cream label along the cover's foot ("Book 1 · The Empyrean"), or beside the title in the list. */
.series-tag { position: absolute; left: 8px; bottom: 8px; z-index: 1; max-width: calc(100% - 16px); padding: 3px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.brow-title .series-tag { position: static; flex: 0 1 auto; min-width: 0; font-size: 10.5px; }
@media (max-width: 639px) { .book .series-tag { left: 4px; bottom: 4px; max-width: calc(100% - 8px); padding: 2px 5px; font-size: 9.5px; } }
