/* The Discover menu and the phone menu (DIRECTION §1, SPEC-SHELL §1). Loaded by the shared header on every page, so
   it uses only the header's own tokens (--bg, --ink, --mut, --rule), which reading-room.css and shell.css both set. */
.hd-dm{position:relative;display:inline-flex;align-items:center}
.hd-dm+a{margin-left:22px}
.hd-nav a+.hd-dm{margin-left:28px}
.hd-dm-b{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;margin-left:-4px;padding:0;border:0;background:none;color:inherit;cursor:pointer;border-radius:var(--r-control,8px)}
.hd-dm-b svg{transition:transform 150ms ease}
.hd-dm-b[aria-expanded='true'] svg{transform:rotate(180deg)}
.hd-dm-b:focus-visible,.hd-m:focus-visible{outline:2px solid var(--ink);outline-offset:2px}

.dm{position:absolute;top:100%;left:0;z-index:30;width:780px;margin-top:1px;padding:24px;background:var(--bg);border:1px solid var(--rule);border-radius:var(--r-card,12px);box-shadow:0 1px 2px rgba(0,0,0,.08),0 8px 24px -8px rgba(0,0,0,.22)}
.dm[hidden]{display:none}
.dm-cols{display:grid;grid-template-columns:1fr 1.25fr;gap:32px}
.dm-h{margin:0 0 4px;font:600 13px/18px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--mut)}
.hd .dm-open{display:flex;align-items:center;min-height:44px;margin-top:16px;padding-top:12px;border-top:1px solid var(--rule);font-weight:600;font-size:15px;color:var(--ink);text-decoration:none}
@media (hover:hover){.hd .dm-open:hover{text-decoration:underline;text-underline-offset:3px}}

/* ---- The shared pieces (SPEC-DISCOVER-SYSTEM §2): Ways in and Subjects, the same on every door ---- */
.wi,.sj{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;column-gap:16px}
.sj[hidden]{display:none}
.wi li,.sj li{border-top:1px solid var(--rule);min-width:0}
.sj li{display:flex}
.wi a{display:block;min-height:64px;padding:11px 0 12px;text-decoration:none;color:var(--ink)}
.wi-l{display:block;font:600 16px/22px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--ink)}
.wi-d{display:block;font:400 14px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--mut)}
@media (hover:hover){.wi a:hover .wi-l,.sj a:hover{text-decoration:underline;text-underline-offset:3px}}
.sj a{flex:1;display:flex;align-items:center;min-height:44px;padding:10px 0;box-sizing:border-box;font:400 15px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--ink);text-decoration:none}
.sj-more summary{display:flex;align-items:center;gap:8px;min-height:44px;border-top:1px solid var(--rule);font:600 15px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--ink);cursor:pointer;list-style:none}
.sj-more summary::-webkit-details-marker{display:none}
.sj-more summary::after{content:'';width:7px;height:7px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform-origin:50% 50%;transform:rotate(45deg)}
.sj-more[open] summary::after{transform:rotate(225deg)}
@media (min-width:640px){
  .wi{grid-template-columns:repeat(3,1fr);column-gap:24px}
}
.wi.wi-1{grid-template-columns:1fr}
.dm .sj{column-gap:24px}

/* ---- The phone menu (§3): a short list on a full-height <dialog>, its top bar where the header is ---- */
.hd-m{display:none;flex:none;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;background:none;color:inherit;cursor:pointer;border-radius:var(--r-control,8px)}
.pm{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:var(--bg);color:var(--ink);overflow-y:auto;overscroll-behavior:contain}
.pm::backdrop{background:transparent}
.pm-bar{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;height:64px;padding:0 20px;border-bottom:1px solid var(--rule);background:var(--bg)}
.pm-bar .logo{color:var(--ink)}
.pm-x{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;margin-right:0;padding:0;border:0;background:none;color:inherit;cursor:pointer;border-radius:var(--r-control,8px)}
.pm-x:focus-visible,.pm a:focus-visible,.pm button:focus-visible,.pm summary:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.pm-nav{padding:0 20px 32px}
.pm-d summary,.hd .pm .pm-a{display:flex;align-items:center;width:100%;min-height:56px;padding:0;border:0;border-bottom:1px solid var(--rule);background:none;font:600 18px/24px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--ink);text-align:left;text-decoration:none;cursor:pointer;list-style:none}
.pm-d summary::-webkit-details-marker{display:none}
.pm-d summary::after{content:'';margin-left:auto;margin-right:4px;width:8px;height:8px;border-right:1.8px solid currentColor;border-bottom:1.8px solid currentColor;transform-origin:50% 50%;transform:rotate(45deg)}
.pm-d[open] summary::after{transform:rotate(225deg)}
.pm-d[open] summary{border-bottom-color:transparent}
.pm-d .sj{padding-bottom:12px;border-bottom:1px solid var(--rule)}
.pm-ft{display:flex;flex-direction:column;margin-top:12px}
.hd .pm-ft a,.hd .pm-ft button{display:flex;align-items:center;min-height:44px;padding:0;border:0;background:none;font:400 15px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--mut);text-align:left;text-decoration:none;cursor:pointer}
@media (hover:hover){.hd .pm .pm-a:hover,.hd .pm-ft a:hover,.hd .pm-ft button:hover{text-decoration:underline;text-underline-offset:3px}}
/* UX-31 (Juno): signed out, Create free account is the primary filled button, like Want to read, not a muted line. */
.hd .pm-ft a.pm-join{align-self:flex-start;justify-content:center;margin:4px 0 8px;padding:0 18px;border:0;border-radius:var(--r-control,8px);background:var(--acc,var(--accent));font-weight:600;color:var(--acc-ink,var(--on-accent))}
@media (hover:hover){.hd .pm-ft a.pm-join:hover{text-decoration:none;color:var(--acc-ink,var(--on-accent))}}
html.pm-open,html.pm-open body{overflow:hidden}
/* "Your clubs" (SPEC-CLUBS-MENU): Clubs stays a link, and its chevron opens the list. It drops under Clubs on a wide
   screen (Discover's panel, at least 280 px) and opens in place in the phone menu, like Genres. Rows match the app's
   club switcher: the initial in a small square, the name, the next date muted, "Current" as plain text. */
/* Clubs leads the nav either way, at the header's own gap from the logo (App builder, Nov 13): signed in, the Clubs menu
   with its chevron; signed out, a plain Clubs link (below). */
[data-signed-in] .hd-cm + .hd-dm{margin-left:22px}
/* Clubs without its chevron (outside the mode): the plain-link gap to Discover (Juno, #482). */
:root[data-signed-in]:not([data-one]) .hd-cm+.hd-dm{margin-left:28px}
/* Signed out, Clubs is a plain link to Find a club (/explore; Juno, P1 1): first in the nav, so it takes no margin and
   Discover keeps the 28 px a link gives it. */
.hd-nav a[data-signed-out-only]+.hd-cm{margin-left:0}
:root:not([data-signed-in]) .hd-cm+.hd-dm{margin-left:28px}
/* With Clubs' chevron the signed-in header is one control longer: between 900 and 1199 px the gaps tighten, so the
   search bar keeps room for "Search books" at 1024 (SPEC-CLUBS-MENU §1: nothing cut at 1024). */
@media (min-width:900px) and (max-width:1199px){.hd .hd-in{gap:16px}.hd-nav a+a,.hd-nav a+.hd-dm,:root[data-signed-in]:not([data-one]) .hd-cm+.hd-dm,:root:not([data-signed-in]) .hd-cm+.hd-dm{margin-left:20px}.hd-nav a[data-signed-out-only]+.hd-cm{margin-left:0}.hd-dm+a,[data-signed-in] .hd-cm+.hd-dm{margin-left:12px}}
.dm.cm{width:320px;max-width:calc(100vw - 32px);padding:16px 20px 12px}
/* The Account menu (UX-13, Juno): Settings, then Sign out below a hairline, in a small panel whose right edge is the
   button's. Settings and Sign out are rare, so two clicks; Your taste stays a one-click link beside it. */
.hd-am-b .hd-dm-b{flex:none}/* Discover's own caret box (44 px, -4 px), so glyph, size and gap match (Juno) */
.hd-am-b[aria-expanded='true'] .hd-dm-b svg{transform:rotate(180deg)}
.hd-am-b:focus-visible{outline:2px solid var(--ink);outline-offset:2px;border-radius:2px}
.dm.am{left:auto;right:0;width:200px;padding:8px 0}
.am a,.am button{display:flex;align-items:center;box-sizing:border-box;width:100%;min-height:44px;margin:0;padding:0 20px;border:0;background:none;color:var(--ink);font-family:inherit;font-weight:600;font-size:15px;line-height:20px;text-align:left;text-decoration:none;cursor:pointer}
.am button{border-top:1px solid var(--rule)}
@media (hover:hover){.am a:hover,.am button:hover{text-decoration:underline;text-underline-offset:3px}}
.am a:focus-visible,.am button:focus-visible{outline:2px solid var(--ink);outline-offset:-2px}
.cm-h{margin:0 0 4px;font:600 13px/18px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--mut)}
.cm-list,.cm-ways{list-style:none;margin:0;padding:0}
.hd .cm .cm-row,.cm .cm-row{display:flex;align-items:center;gap:12px;box-sizing:border-box;width:100%;min-height:52px;margin:0;padding:6px 0;border:0;border-top:1px solid var(--rule);background:none;font:inherit;color:var(--ink);text-align:left;text-decoration:none;cursor:pointer}
.hd .cm .cm-list li:first-child .cm-row,.cm .cm-list li:first-child .cm-row{border-top:0}
.cm-row[aria-disabled="true"]{cursor:default}
.cm-row[aria-disabled="true"] .cm-club{color:var(--mut)}
.cm-i{flex:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid var(--rule);border-radius:var(--r-control,8px);font:500 15px/1 var(--font-display,Newsreader,serif);color:var(--ink)}
.cm-img{padding:0;object-fit:cover}
.cm-n{flex:1;min-width:0}
.cm-club{display:block;font:600 16px/22px var(--font-ui,'Public Sans',system-ui,sans-serif);overflow-wrap:anywhere}
.cm-next{display:block;font:400 14px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--mut)}
.cm-cur{flex:none;font:400 14px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--mut)}
@media (hover:hover){.cm-row:not([aria-disabled="true"]):hover .cm-club,.cm-way:hover{text-decoration:underline;text-underline-offset:3px}}
.cm-note{display:flex;align-items:center;min-height:52px;margin:0;font:400 15px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--mut)}
.cm-err{margin:0;font:400 14px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--err,#b3261e)}
.cm-err:empty{display:none}
@media (prefers-color-scheme:dark){.cm-err{color:var(--err,#f2b8b5)}}
.cm-ways{margin-top:8px;padding-top:4px;border-top:1px solid var(--rule)}
.hd .cm .cm-way,.cm .cm-way{display:flex;align-items:center;min-height:44px;margin:0;padding:0;border:0;font:400 15px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--ink);text-decoration:none}
.cm-row:focus-visible,.cm-way:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.cm-ways.cm-again{margin-top:0;padding-top:0;border-top:0}
.cm .cm-try{width:100%;background:none;cursor:pointer;text-align:left;-webkit-tap-highlight-color:transparent}
.pm-cl{display:flex;align-items:center;border-bottom:1px solid var(--rule)}
.hd .pm .pm-cl .pm-a{flex:1;width:auto;border-bottom:0}
/* The chevron's mark sits where Genres' does (summary::after, 4px in from the column's edge): Vera's 2px rule. */
.pm-cb{flex:none;display:inline-flex;align-items:center;justify-content:flex-end;width:44px;height:44px;margin-right:0;padding:0 4px 0 0;border:0;border-radius:var(--r-control,8px);background:none;color:var(--ink);cursor:pointer}
.pm-cb::after{content:'';width:8px;height:8px;margin-top:-4px;border-right:1.8px solid currentColor;border-bottom:1.8px solid currentColor;transform:rotate(45deg)}
.pm-cb[aria-expanded="true"]::after{margin-top:4px;transform:rotate(225deg)}
.pm-cl:has(.pm-cb[aria-expanded="true"]){border-bottom-color:transparent}
.pm-cm{padding-bottom:12px;border-bottom:1px solid var(--rule)}
.pm-cm[hidden]{display:none}
@media (max-width:899px){
  .hd-m{display:inline-flex;margin-left:4px}
  /* Signed in on a phone the header keeps My books only; Your taste, Settings and Sign out are in the menu (Juno, #304; M3). */
  .hd-in > .hd-taste,.hd-in > .hd-am{display:none !important}
}
@media (min-width:900px){
  .pm{display:none !important}
}
@media (prefers-reduced-motion:reduce){
  .hd-dm-b svg{transition:none}
}

/* ---- The search sheet (SPEC-DISCOVER-SYSTEM §4): full screen on a phone, a 640 px panel under the header on a wide
   screen. Before typing: Recent searches, Ways in, Subjects. Typing: the grouped results (§5). ---- */
.ss{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:var(--bg);color:var(--ink);overflow:hidden;font:400 16px/1.5 var(--font-ui,'Public Sans',system-ui,sans-serif)}
.ss[open]{display:flex;flex-direction:column}
.ss::backdrop{background:transparent}
.ss-f{flex:none;display:flex;align-items:center;gap:8px;height:64px;padding:0 9px 0 20px;border-bottom:1px solid var(--rule)}
/* The field keeps its 1 px border at rest, the icon inside it (Juno, #347). */
.ss-box{flex:1;min-width:0}/* the box is the search field below (.sf) */
.ss-x{flex:none;display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:44px;padding:0 8px;border:0;background:none;font:400 16px/24px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--ink);cursor:pointer;border-radius:var(--r-control,8px)}
.ss-x:focus-visible,.ss a:focus-visible,.ss button:focus-visible,.ss summary:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.ss-b{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:4px 20px 32px}
.ss-sec,.ss-g{margin-top:20px}
.ss-g + .ss-g{padding-top:16px;border-top:1px solid var(--rule)}
.ss h2.sh{margin:0 0 8px;font:500 22px/28px var(--font-display,Newsreader,serif);letter-spacing:-.01em;color:var(--ink)}
.ss-h{display:flex;align-items:center;justify-content:space-between}
.ss-h h2.sh{margin:0}
.ss ul{list-style:none;margin:0;padding:0}
/* Before typing (SPEC-SEARCH-BAR §3): small muted headings, then Recent, Try and Browse as rows, ruled between. */
.ss-home h2.sh{margin:0 0 2px;font:600 14px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);letter-spacing:0;color:var(--mut)}
.ss-home .ss-sec{margin-top:24px}
.ss-recent li,.ss-tries li{display:flex;align-items:center;border-top:1px solid var(--rule)}
.ss-recent li:first-child,.ss-tries li:first-child{border-top:0}
.ss-recent a,.ss-tries a{flex:1;min-width:0;display:flex;align-items:center;gap:14px;min-height:48px;padding:2px 0;font:400 16px/22px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--ink);text-decoration:none}
.ss-recent a span,.ss-tries a span{min-width:0;overflow-wrap:anywhere}
.ss-recent a svg,.ss-tries a svg{flex:none;width:20px;height:20px;color:var(--mut)}
.ss-rx{flex:none;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;margin-right:-12px;padding:0;border:0;border-radius:var(--r-control,8px);background:none;color:var(--mut);cursor:pointer}
@media (hover:hover){.ss-rx:hover{color:var(--ink)}}
@media (hover:hover){.ss-recent a:hover span,.ss-tries a:hover span,.ss-more a:hover{text-decoration:underline;text-underline-offset:3px}}
/* Browse: the lead eight with their counts in two columns, then "All 19 genres" across both. */
.ss-browse .ss-gn{row-gap:0}
.ss-browse .ss-gn li:nth-child(-n+2){border-top:0}
.ss-browse .ss-gn a{justify-content:space-between;gap:8px;min-height:48px;font-size:16px;line-height:22px}
.ss-browse .sj-n{flex:none;font-variant-numeric:tabular-nums;color:var(--mut)}
.ss-browse .sj-all-li{grid-column:1/-1;border-top-color:color-mix(in srgb,var(--mut) 45%,var(--rule))}
.ss-browse .sj-all{justify-content:space-between}
.ss-browse .sj-all::after{content:'';flex:none;width:7px;height:7px;margin-right:4px;border-top:1.6px solid currentColor;border-right:1.6px solid currentColor;transform:rotate(45deg)}
/* Ways in, one line of plain links (on a phone the sheet is still its shortest path). */
.ss-wl{display:flex;flex-wrap:wrap;column-gap:20px}
.ss-wl a{display:inline-flex;align-items:center;min-height:44px;font:400 15px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--ink);text-decoration:underline;text-decoration-color:var(--rule);text-underline-offset:3px}
@media (hover:hover){.ss-wl a:hover{text-decoration-color:currentColor}}
/* The compact book row (§5): a 48 x 72 cover, title, byline, proof line; the whole row is the link. */
/* As you type (SPEC-SEARCH-BAR §4): small muted headings, Top result, Books, Go to, then Ask and See all. Each row is
   an option of one listbox; the highlighted one (Up and Down, or the pointer) takes a soft fill that bleeds 12 px past
   the text on both sides, drawn on every row at rest so nothing moves. Only what matches the typing is semi-bold. */
.ss-res h2.sh{margin:0 0 2px;font:600 14px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);letter-spacing:0;color:var(--mut)}
.ss-res .ss-g{margin-top:16px}
.ss-res .ss-g + .ss-g{padding-top:0;border-top:0}
.ss-o{display:flex;align-items:center;gap:12px;box-sizing:border-box;min-height:48px;margin:0 -12px;padding:6px 12px;border-radius:var(--r-control,8px);text-decoration:none;color:var(--ink)}
.ss-o[aria-selected="true"]{background:color-mix(in srgb,var(--ink) 7%,transparent)}
@media (hover:hover){.ss-o:hover{background:color-mix(in srgb,var(--ink) 7%,transparent)}}
.ss-o[aria-selected="true"]{outline:2px solid transparent}/* forced colours keep a visible highlight */
.ss-tx{min-width:0;flex:1}
.ss-m{font-weight:600}
.ss .cr .cv-box{flex:none;width:32px;height:48px;min-width:0;border-radius:2px;overflow:hidden}
.ss .cr-top .cv-box{width:44px;height:66px}
/* F1 (Juno, Vera's P3 on #728): People and Picks by {name} share one 40 px media column and a 16 px gap, the 32 px covers
   left in it, so a person's name and the pick titles under it start at the same x. */
.ss-g[aria-labelledby="ss-gp"] .ss-o,.ss-g[aria-labelledby="ss-gk"] .ss-o,.ss:has(.ss-g[aria-labelledby="ss-gp"]) .ss-g[aria-labelledby="ss-gb"] .ss-o{gap:16px}
.ss-g[aria-labelledby="ss-gk"] .cr .cv-box,.ss:has(.ss-g[aria-labelledby="ss-gp"]) .ss-g[aria-labelledby="ss-gb"] .cr .cv-box{margin-right:8px}
/* At this size a missing cover is its tone and the title-block mark (R3-93): the title and author beside it carry the row (§4). */
.ss .cr .cv-none > *{display:none}
.cr-t{display:block;font:400 16px/22px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--ink);overflow-wrap:anywhere}
.cr-top .cr-t{font:500 19px/24px var(--font-display,Newsreader,serif);letter-spacing:-.005em}
.cr-by,.cr-p{display:block;margin-top:2px;font:400 14px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--mut);overflow-wrap:anywhere}
.cr-p.ev{color:var(--ink)}
.ss-go-t{display:block;font:400 16px/22px var(--font-ui,'Public Sans',system-ui,sans-serif);overflow-wrap:anywhere}
.ss-go-k{display:block;margin-top:2px;font:400 14px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--mut)}
.ss-go-n{flex:none;font:400 14px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);font-variant-numeric:tabular-nums;color:var(--mut)}
/* A person's monogram tile in search (F1, Juno on #728), the /people cards' tile at 40 px, on every page this loads. */
.mono.mono-40{display:inline-grid;place-items:center;flex:none;width:40px;height:40px;border-radius:2px;background:#3a3f5a;color:#f4f4f0}
.mono.mono-40 b{font:500 17px/1 var(--font-display,Newsreader,serif);letter-spacing:.02em}
.ss-end{margin-top:12px;padding-top:4px;border-top:1px solid var(--rule)}
.ss-end .ss-o{font:600 15px/20px var(--font-ui,'Public Sans',system-ui,sans-serif)}
/* S3: a sentence's Ask Stoa row leads the list, so it has no rule over it. */
.ss-end.ss-ask{margin-top:0;padding-top:0;border-top:0}
/* "Searching" sits in a strip the panel always keeps at its top, so it appears and goes without moving anything
   (layout shift 0, Vera on #478). */
.ss-res{position:relative;padding-top:20px}
.ss-res > :first-child,.ss-res > :first-child > .ss-g:first-child,.ss-res > .ss-wait + *,.ss-res > .ss-wait + * > .ss-g:first-child{margin-top:0}
.ss-wait{position:absolute;top:0;left:0;margin:0;font:400 14px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--mut)}
.ss-read{margin:12px 0 0;font:400 14px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--mut)}
.ss-more a{display:flex;align-items:center;min-height:44px;font:600 15px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--ink);text-decoration:none}
.ss-none{margin:20px 0 0;font:400 18px/24px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--ink)}
.ss-try{margin:4px 0 0;font:400 15px/20px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--mut)}
.ss-try a{color:var(--ink);font-weight:600}
html.ss-open,html.ss-open body{overflow:hidden}
/* A wide screen (SPEC-SEARCH-BAR §3): the panel hangs under the bar that opened it (search-field.js sets where and
   how wide), the bar keeps the caret, and the panel's own field is not shown. Nothing is greyed and nothing in the
   header is covered. Not modal, so it needs its own layer. */
@media (min-width:900px){
  .ss.ss-under{position:fixed;inset:auto;top:var(--ss-top,72px);left:var(--ss-left,16px);right:auto;z-index:40;width:var(--ss-w,520px);height:auto;max-height:calc(100vh - var(--ss-top,72px) - 16px);border:1px solid var(--rule);border-radius:var(--r-card,12px);box-shadow:0 1px 2px rgba(0,0,0,.06),0 12px 32px -12px rgba(0,0,0,.24)}
  .ss-under .ss-f{display:none}
  .ss-under .ss-b{max-height:calc(100vh - var(--ss-top,72px) - 18px);padding-top:8px}
}

/* The search field (SPEC-SEARCH-BAR §2): one box for every search bar, on any element with class "sf" that holds
   discover-parts.mjs searchField(). 52 px, 44 in the desktop header (.sf-hd). No button at rest; with text, a clear
   and the arrow that submits, shown by CSS alone. Focus is a 2 px ink border drawn inward, so nothing moves. It has
   its own field, border and arrow colours because the header's tokens stop at --bg, --ink, --mut and --rule. */
.sf{--sf-field:#fff;--sf-line:#c6c6be;--sf-go:var(--fill,#2f44b5);--sf-go-ink:var(--on-fill,#fff);display:flex;align-items:center;box-sizing:border-box;height:52px;padding:0 5px 0 18px;border:1px solid var(--sf-line);border-radius:var(--r-control,8px);background:var(--sf-field);color:var(--mut);cursor:text}
@media (prefers-color-scheme:dark){.sf{--sf-field:#1c1d22;--sf-line:#44474d;--sf-go:var(--fill,#a8bbf0);--sf-go-ink:var(--on-fill,#0f1a3a)}}
.sf:focus-within{border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink)}
.sf > svg{flex:none;width:20px;height:20px;margin-right:12px}
.sf:focus-within > svg{color:var(--ink)}
.sf input{flex:1;min-width:0;height:100%;margin:0;padding:0;border:0;border-radius:0;background:none;font:400 17px/24px var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--ink);outline:none;-webkit-appearance:none;appearance:none}
.sf.sf input:focus-visible{outline:none}
.sf input::-webkit-search-cancel-button,.sf input::-webkit-search-decoration{display:none;-webkit-appearance:none}
.sf input::placeholder{color:var(--mut);opacity:1}
.sf-x,.sf-go,.sf-k{display:none;flex:none;align-items:center;justify-content:center;box-sizing:border-box;padding:0}
.sf input:not(:placeholder-shown) ~ .sf-x,.sf input:not(:placeholder-shown) ~ .sf-go{display:inline-flex}
.sf-x{width:44px;height:44px;margin-right:8px;border:0;border-radius:var(--r-control,8px);background:none;color:var(--mut);cursor:pointer}
@media (hover:hover){.sf-x:hover{color:var(--ink)}}
.sf-go{width:44px;height:44px;border:0;border-radius:var(--r-control,8px);background:var(--sf-go);color:var(--sf-go-ink);cursor:pointer}
.sf-x:focus-visible,.sf-go:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.sf-k{width:24px;height:24px;margin-right:9px;border:1px solid var(--sf-line);border-radius:var(--r-control,8px);font:400 13px/1 var(--font-ui,'Public Sans',system-ui,sans-serif);color:var(--mut)}
@media (min-width:900px) and (hover:hover){.sf:not(.sf-hd) input:placeholder-shown:not(:focus) ~ .sf-k{display:inline-flex}}
/* The header bar gives way to the links below 1100 px: no "/" hint there, and tighter sides below 1024, so
   "Search books" still fits whole at 900 (Vera, #432). */
@media (min-width:1100px) and (hover:hover){.sf-hd input:placeholder-shown:not(:focus) ~ .sf-k{display:inline-flex}}
.sf-hd{height:44px;padding:0 4px 0 14px;border-radius:var(--r-control,8px)}
.sf-hd input{font-size:16px}
/* In the 44 px bar both buttons are 44 x 44 boxes (Vera S1, Nov 13), overlapping the bar's 1 px border so its height
   holds; the arrow's visible square stays 34 px where it was, drawn by ::before, and its focus ring rings that square. */
.sf-hd .sf-go{position:relative;width:44px;height:44px;margin:-1px -4px -1px 0;border-radius:var(--r-control,8px);background:none}
.sf-hd .sf-go::before{content:'';position:absolute;inset:5px 4px 5px 6px;border-radius:var(--r-control,8px);background:var(--sf-go)}
.sf-hd .sf-go > svg{position:relative;left:1px}
.sf-hd .sf-go:focus-visible{outline:none}
.sf-hd .sf-go:focus-visible::before{outline:2px solid var(--ink);outline-offset:2px}
.sf-hd .sf-x{height:44px;margin:-1px 4px -1px 0}
@media (max-width:1023px){.sf-hd{padding-left:10px}.sf-hd > svg{margin-right:6px}}

/* ---- Previous and Next on a sideways row (UX-AUDIT-2 PL15; row-arrows.js): desktop with a hovering pointer only, right
   of "See all" in the row head, 44 px round icon buttons, disabled at each end; none on touch, none while the row fits ---- */
.row-arrows{display:none}
@media (min-width:900px) and (hover:hover){
.sec-h.has-arrows{align-items:center}
.sec-h.has-arrows > :first-child{margin-right:auto}
/* R3-80: a Gallery rail's head (author, book and list pages, section[data-rail]) holds the arrows' room from the first
   paint: 44 px tall, centred, and a 96 px spacer (two 44 px arrows and their 8 px gap) where the arrows will sit, so
   adding them moves neither the rail nor See all. The spacer stays while the arrows are hidden (a row that fits). */
section[data-rail]:not(:has(.rail-arrows)) > .sec-h{min-height:44px;align-items:center}
section[data-rail]:not(:has(.rail-arrows)) > .sec-h > :first-child{margin-right:auto}
section[data-rail]:not(:has(.rail-arrows)) > .sec-h:not(:has(> .row-arrows:not([hidden])))::after{content:"";flex:none;width:96px}
/* VB-56: home's sideways rows (Best, subjects, rails, paths) hold the same room from the first paint as R3-80 above, so the
   arrows arriving after parse no longer grow each head 2 px (CLS 0.06 at 1366) or slide See all 112 px left. */
.dh-home > section:has(.rail, .dh-subj, .path) > .sec-h{min-height:44px;align-items:center}
.dh-home > section:has(.rail, .dh-subj, .path) > .sec-h > :first-child{margin-right:auto}
.dh-home > section:has(.rail, .dh-subj, .path) > .sec-h:not(:has(> .row-arrows:not([hidden])))::after{content:"";flex:none;width:96px}
.row-arrows:not([hidden]){display:inline-flex;flex:none;gap:8px}
.row-arrow{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:44px;height:44px;margin:0;padding:0;border:1px solid var(--rule);border-radius:50%;background:none;color:var(--ink);cursor:pointer}
.row-arrow:hover:not(:disabled){background:color-mix(in srgb,var(--ink) 7%,transparent)}
.row-arrow:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.row-arrow:disabled{opacity:.35;cursor:default}
}
