/* Jobs Bazaar digital library: shelves (lib-*) and the online reader (rd-*). Site pages use the jb.css colour variables,
   so the site's dark mode works here too; the reader has its own three themes. */

/* ---------- covers ---------- */
.lib-cover { aspect-ratio: 3 / 4; width: 100%; border-radius: 6px 12px 12px 6px; color: #fff; padding: 16px 14px 14px 20px; box-sizing: border-box;
    display: flex; flex-direction: column; justify-content: space-between; box-shadow: inset 7px 0 0 rgba(255,255,255,.16), 0 14px 24px -14px rgba(16,24,40,.55); overflow: hidden; }
.lib-cover-kind { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.lib-cover-title { font-family: 'Source Serif 4', Georgia, serif; font-size: 20px; line-height: 1.18; font-weight: 700; overflow-wrap: anywhere; }
.lib-cover.is-big { max-width: 260px; padding: 24px 22px 22px 30px; box-shadow: inset 9px 0 0 rgba(255,255,255,.16), 0 24px 36px -18px rgba(16,24,40,.6); }
.lib-cover.is-big .lib-cover-title { font-size: 28px; }

/* ---------- shelves page ---------- */
.lib-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lib-hero { background: linear-gradient(180deg, #0f3a6b 0%, #14518f 100%); color: #fff; padding: 36px 0 44px; }
.lib-hero-in { display: flex; flex-wrap: wrap; align-items: center; gap: 36px; }
.lib-hero-text { flex: 1 1 460px; min-width: 0; }
.lib-hero h1 { margin: 0 0 14px; font-family: 'Source Serif 4', Georgia, serif; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.14; font-weight: 700; color: #fff; }
.lib-eyebrow { display: block; margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #9fd8ec; }
.lib-eyebrow.is-dark { color: #0b6e8a; }
.lib-lead { margin: 0 0 22px; font-size: 17px; line-height: 1.55; color: #dbe9f7; max-width: 560px; }
.lib-search { display: flex; flex-wrap: wrap; gap: 10px; max-width: 580px; }
.lib-search input { flex: 1 1 260px; min-height: 52px; border: 0; border-radius: 12px; padding: 0 16px; font: inherit; font-size: 16px; background: #fff; color: #101828; }
.lib-search button { min-height: 52px; padding: 0 24px; border: 0; border-radius: 12px; background: #22b5db; color: #05283f; font-weight: 700; font-size: 16px; cursor: pointer; }
.lib-resume { flex: 0 1 380px; min-width: 0; display: flex; gap: 16px; padding: 20px; border-radius: 18px; background: var(--jb-card, #fff); color: var(--jb-ink, #101828); box-shadow: 0 24px 48px -18px rgba(0,0,0,.45); }
.lib-resume[hidden] { display: none; }
.lib-resume .lib-cover { width: 92px; flex: none; padding: 10px 8px 8px 14px; }
.lib-resume .lib-cover-title { font-size: 13px; }
.lib-resume .lib-cover-kind { font-size: 9px; }
.lib-resume > div { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; }
.lib-resume strong { font-family: 'Source Serif 4', Georgia, serif; font-size: 18px; line-height: 1.25; }
.lib-resume small { font-size: 13px; color: var(--jb-ink-2, #475467); }
.lib-bar { display: block; height: 6px; border-radius: 3px; background: var(--jb-line, #dbe9f4); }
.lib-bar i { display: block; height: 6px; border-radius: 3px; background: var(--jb-forest, #0f3a6b); width: 0; }

.lib-wrap { display: flex; flex-direction: column; gap: 26px; }
.lib-shelves { display: flex; flex-wrap: wrap; gap: 10px; }
.lib-shelves a { min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; border-radius: 999px; border: 1.5px solid var(--jb-line, #b9d3e6); background: var(--jb-card, #fff); color: var(--jb-forest, #0f3a6b); font-weight: 600; font-size: 15px; }
.lib-shelves a.is-on { background: var(--jb-forest, #0f3a6b); border-color: var(--jb-forest, #0f3a6b); color: #fff; }
.lib-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.lib-head h2 { margin: 0; font-size: 22px; }
.lib-head span { font-size: 14px; color: var(--jb-ink-2, #475467); }
.lib-grid { display: flex; flex-wrap: wrap; gap: 24px; }
.lib-card { flex: 1 1 200px; max-width: 270px; min-width: 170px; display: flex; flex-direction: column; gap: 10px; color: var(--jb-ink, #101828); transition: transform .15s; }
.lib-card:hover { transform: translateY(-3px); }
.lib-card-title { font-size: 15px; font-weight: 600; line-height: 1.35; }
.lib-card-meta { font-size: 13px; color: var(--jb-ink-2, #475467); }
.lib-feats { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.lib-feats > div { flex: 1 1 220px; background: var(--jb-card, #fff); border: 1px solid var(--jb-line, #cde2f0); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.lib-feats span { font-size: 14px; line-height: 1.5; color: var(--jb-ink-2, #475467); }

/* ---------- a title's page ---------- */
.lib-book { background: var(--jb-card, #fff); border: 1px solid var(--jb-line, #cde2f0); border-radius: 20px; padding: 28px; display: flex; flex-wrap: wrap; gap: 32px; }
.lib-book-cover { flex: 0 0 240px; max-width: 100%; }
.lib-book-body { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.lib-book-body h1 { margin: 0; font-family: 'Source Serif 4', Georgia, serif; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.16; }
.lib-byline { margin: 0; font-size: 14px; color: var(--jb-ink-2, #475467); }
.lib-summary { margin: 0; font-family: 'Source Serif 4', Georgia, serif; font-size: 18px; line-height: 1.6; color: var(--jb-ink-2, #344054); max-width: 640px; }
.lib-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.lib-btn { min-height: 52px; padding: 0 22px; border-radius: 12px; border: 1.5px solid var(--jb-line, #b9d3e6); background: var(--jb-card, #fff); color: var(--jb-forest, #0f3a6b) !important; font-weight: 600; font-size: 16px; display: inline-flex; align-items: center; gap: 10px; }
.lib-btn.is-primary { background: #0f3a6b; border-color: #0f3a6b; color: #fff !important; font-weight: 700; padding: 0 28px; }
.lib-pills { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--jb-ink-2, #475467); }
.lib-cols { display: flex; flex-wrap: wrap; gap: 26px; align-items: flex-start; }
.lib-toc { flex: 1 1 460px; min-width: 0; background: var(--jb-card, #fff); border: 1px solid var(--jb-line, #cde2f0); border-radius: 18px; padding: 22px; }
.lib-toc h2, .lib-box h2 { margin: 0 0 10px; font-size: 19px; }
.lib-toc ol { margin: 0; padding: 0; list-style: none; }
.lib-toc a { display: flex; gap: 14px; align-items: baseline; padding: 12px 10px; border-radius: 10px; border-bottom: 1px solid var(--jb-line, #eef3f8); color: var(--jb-ink, #101828); }
.lib-toc a:hover { background: var(--jb-green-50, #eaf4fb); }
.lib-toc b { flex: none; width: 24px; font-size: 14px; color: var(--jb-green-700, #0b6e8a); }
.lib-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.lib-box { background: var(--jb-card, #fff); border: 1px solid var(--jb-line, #cde2f0); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.lib-box a { color: var(--jb-green-700, #0b6e8a); font-weight: 600; line-height: 1.4; }
.lib-box.is-soft { background: var(--jb-green-50, #eaf4fb); }
.lib-box.is-soft span { font-size: 14px; line-height: 1.55; color: var(--jb-ink-2, #475467); }

/* ---------- the reader ---------- */
html[data-rd-theme="paper"] { --rd-bg: #fffdf8; --rd-bar: #f6f2e8; --rd-fg: #1f2937; --rd-mute: #5b6472; --rd-line: #e4dccb; --rd-acc: #0b6e8a; --rd-btn: #0f3a6b; }
html[data-rd-theme="sepia"] { --rd-bg: #f4ecd8; --rd-bar: #eadfc4; --rd-fg: #3b3024; --rd-mute: #6b5b45; --rd-line: #d6c7a4; --rd-acc: #8f4a1d; --rd-btn: #7a3f17; }
html[data-rd-theme="night"] { --rd-bg: #11161f; --rd-bar: #18202d; --rd-fg: #d9e0ec; --rd-mute: #9aa7bc; --rd-line: #2a3446; --rd-acc: #7cc8e8; --rd-btn: #1d5fb8; color-scheme: dark; }
html { --rd-size: 19px; }
.rd-body { margin: 0; background: var(--rd-bg); color: var(--rd-fg); font-family: 'Inter', system-ui, sans-serif; overflow: hidden; }
.rd { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--rd-bg); color: var(--rd-fg); }
.rd a { color: inherit; text-decoration: none; }
.rd button { font-family: inherit; color: var(--rd-fg); }
.rd a:focus-visible, .rd button:focus-visible, .rd-scroll:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; border-radius: 6px; }
.rd-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); border-bottom: 1px solid var(--rd-line); background: var(--rd-bar); }
.rd-ic, .rd-btn { min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid transparent; background: transparent; display: inline-grid; place-items: center; cursor: pointer; font-size: 20px; }
.rd-ic:hover, .rd-btn:hover { background: var(--rd-line); }
.rd-btn { border-color: var(--rd-line); padding: 0 14px; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.rd-btn.is-aa { font-size: 17px; font-weight: 700; }
.rd-btn[aria-expanded="true"] { background: var(--rd-line); }
.rd-title { flex: 1; min-width: 0; text-align: center; display: flex; flex-direction: column; }
.rd-title strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-title span { font-size: 12px; color: var(--rd-mute); }
.rd-main { flex: 1; min-height: 0; display: flex; position: relative; }
.rd-scroll { flex: 1; min-width: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.rd-scroll::-webkit-scrollbar { width: 10px; }
.rd-scroll::-webkit-scrollbar-thumb { background: rgba(120,130,150,.35); border-radius: 6px; }
.rd-article { max-width: 680px; margin: 0 auto; padding: 44px 22px 140px; font-family: 'Source Serif 4', Georgia, serif; font-size: var(--rd-size); line-height: 1.7; }
html[data-rd-font="sans"] .rd-article { font-family: 'Inter', system-ui, sans-serif; line-height: 1.65; }
.rd-article h1 { margin: 0 0 8px; font-family: 'Source Serif 4', Georgia, serif; font-size: 1.9em; line-height: 1.2; font-weight: 700; }
.rd-by { margin: 0 0 30px; font-family: 'Inter', system-ui, sans-serif; font-size: 14px; color: var(--rd-mute); }
.rd-article h2 { margin: 1.7em 0 .5em; font-family: 'Source Serif 4', Georgia, serif; font-size: 1.4em; line-height: 1.25; font-weight: 700; }
.rd-article h3, .rd-article h4 { margin: 1.4em 0 .4em; font-size: 1.15em; line-height: 1.3; }
.rd-article p { margin: 0 0 1.1em; }
.rd-article ul, .rd-article ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.rd-article li { margin-bottom: .4em; }
.rd-article a { color: var(--rd-acc); text-decoration: underline; }
.rd-article img { max-width: 100%; height: auto; border-radius: 8px; }
.rd-article table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .88em; display: block; overflow-x: auto; }
.rd-article th, .rd-article td { border: 1px solid var(--rd-line); padding: 8px 10px; text-align: left; vertical-align: top; }
.rd-article th { background: var(--rd-bar); }
.rd-article blockquote { margin: 0 0 1.1em; padding: 4px 0 4px 16px; border-left: 3px solid var(--rd-line); color: var(--rd-mute); }
.rd-article [style*="color"] { color: inherit !important; }
.rd-article table, .rd-article td, .rd-article th { background: transparent !important; }
.rd-end { margin: 2.4em 0 0; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--rd-line); background: var(--rd-bar); font-family: 'Inter', system-ui, sans-serif; font-size: 15px; line-height: 1.55; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.rd-end span { color: var(--rd-mute); }
.rd-cta { min-height: 44px; padding: 0 20px; border-radius: 10px; background: var(--rd-btn); color: #fff !important; font-weight: 600; display: inline-flex; align-items: center; }
.rd-more { color: var(--rd-acc) !important; font-weight: 600; text-decoration: underline; }
.rd-toc { flex: none; width: 300px; max-width: 82%; border-right: 1px solid var(--rd-line); background: var(--rd-bar); overflow-y: auto; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; z-index: 4; }
.rd-toc[hidden], .rd-set[hidden] { display: none; }
.rd-label { padding: 0 10px 6px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--rd-mute); display: block; }
.rd-toc ol { margin: 0; padding: 0; list-style: none; }
.rd-toc a { display: flex; gap: 10px; align-items: baseline; min-height: 44px; padding: 8px 10px; border-radius: 10px; font-size: 14px; line-height: 1.35; box-sizing: border-box; }
.rd-toc a:hover, .rd-toc a.is-here { background: var(--rd-line); }
.rd-toc b { flex: none; width: 20px; color: var(--rd-acc); }
.rd-none { margin: 4px 10px; font-size: 14px; color: var(--rd-mute); }
.rd-jump { margin: 0 6px 8px; min-height: 44px; border-radius: 10px; border: 1px dashed var(--rd-acc); background: transparent; color: var(--rd-acc) !important; font-weight: 600; font-size: 14px; cursor: pointer; }
.rd-jump[hidden] { display: none; }
.rd-set { position: absolute; top: 8px; right: 12px; width: 320px; max-width: calc(100% - 24px); background: var(--rd-bar); border: 1px solid var(--rd-line); border-radius: 16px; padding: 16px; box-shadow: 0 20px 40px -12px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 8px; z-index: 6; }
.rd-set .rd-label { padding: 6px 0 0; }
.rd-row { display: flex; gap: 8px; align-items: center; }
.rd-row button { flex: 1; min-height: 50px; border-radius: 12px; border: 2px solid var(--rd-line); background: transparent; font-size: 14px; font-weight: 600; cursor: pointer; }
.rd-row button[aria-pressed="true"] { border-color: var(--rd-acc); }
.rd-row .is-paper { background: #fffdf8; color: #1f2937; }
.rd-row .is-sepia { background: #f4ecd8; color: #3b3024; }
.rd-row .is-night { background: #11161f; color: #d9e0ec; }
.rd-row .is-serif { font-family: 'Source Serif 4', Georgia, serif; font-size: 16px; }
.rd-row.is-size { gap: 10px; }
.rd-row.is-size button { flex: none; width: 56px; font-size: 16px; font-weight: 700; }
.rd-row.is-size span { flex: 1; text-align: center; font-size: 15px; font-weight: 600; }
.rd-foot { flex: none; padding: 8px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rd-line); background: var(--rd-bar); display: flex; flex-direction: column; gap: 6px; }
.rd-prog { height: 5px; border-radius: 3px; background: var(--rd-line); }
.rd-prog i { display: block; height: 5px; border-radius: 3px; background: var(--rd-btn); width: 0; }
.rd-foot-t { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--rd-mute); }
.rd-btn span { display: inline; }

@media (max-width: 640px) {
    .rd-btn span { display: none; }
    .rd-article { padding: 28px 20px 120px; }
    .rd-toc { position: absolute; top: 0; bottom: 0; left: 0; box-shadow: 8px 0 24px rgba(0,0,0,.3); }
    .rd-set { left: 12px; right: 12px; width: auto; top: auto; bottom: 8px; }
}
@media print { .rd-bar, .rd-foot, .rd-toc, .rd-set { display: none !important; } .rd, .rd-body { position: static; overflow: visible; } .rd-scroll { overflow: visible; } }
@media (prefers-reduced-motion: reduce) { .lib-card { transition: none; } }

/* ---------- 3 Nov 2026: authors, cover pictures, details table, sample notice ---------- */
.lib-cover.is-photo { padding: 0; background: #e5e7eb; }
.lib-cover.is-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-cover-author { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: rgba(255,255,255,.88); }
.lib-card-author { font-size: 13px; font-weight: 600; color: var(--jb-green-700, #0b6e8a); }
.lib-sample { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--jb-amber-bg, #fef3c7); color: var(--jb-amber, #92400e); font-size: 14px; line-height: 1.5; }
.lib-sample i { margin-right: 6px; }
.lib-main-col { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.lib-main-col .lib-toc { flex: none; }
.lib-details { background: var(--jb-card, #fff); border: 1px solid var(--jb-line, #cde2f0); border-radius: 18px; padding: 22px; }
.lib-details h2 { margin: 0 0 10px; font-size: 19px; }
.lib-details dl { margin: 0; display: flex; flex-direction: column; }
.lib-details dl > div { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--jb-line, #eef3f8); }
.lib-details dl > div:last-child { border-bottom: 0; }
.lib-details dt { flex: 0 0 140px; font-size: 14px; font-weight: 600; color: var(--jb-ink-2, #475467); }
.lib-details dd { flex: 1 1 220px; margin: 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.lib-box a small { display: block; font-weight: 400; color: var(--jb-ink-2, #475467); }
:root[data-theme="dark"] .lib-sample { background: var(--jb-amber-bg); color: var(--jb-amber); }

/* the one-line complaint notice at the top of the Digital Library */
.lib-notice { margin: 0; padding: 9px 16px; text-align: center; font-size: 13.5px; line-height: 1.45; background: var(--jb-amber-bg, #fef3c7); color: var(--jb-amber, #7a4a0a); }
.lib-notice a { color: inherit; font-weight: 700; text-decoration: underline; overflow-wrap: anywhere; }
.rd-article .lib-notice { margin: 0 0 26px; padding: 10px 14px; border-radius: 10px; font-family: 'Inter', system-ui, sans-serif; text-align: left; border: 1px solid var(--rd-line); background: var(--rd-bar); color: var(--rd-mute); }
.rd-article .lib-notice a { color: var(--rd-acc); }

/* ---------- reading a PDF title page by page (no download link) ---------- */
.rd.is-pdf .rd-scroll { background: var(--rd-bg); }
.rd-pdfwrap { max-width: 1160px; margin: 0 auto; padding: 18px 12px 120px; }
.rd-pdfwrap .lib-notice { margin: 0 0 16px; }
.rd-loading { margin: 40px 0; text-align: center; color: var(--rd-mute); font-size: 15px; }
.rd-loading[hidden] { display: none; }
.rd-pages { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.rd-page { position: relative; background: #fff; border-radius: 4px; box-shadow: 0 4px 18px -6px rgba(0,0,0,.35); overflow: hidden; max-width: 100%; }
.rd-page canvas { display: block; }
.rd-page-n { position: absolute; right: 8px; bottom: 6px; font-size: 11px; color: #667085; background: rgba(255,255,255,.8); padding: 1px 7px; border-radius: 9px; font-family: 'Inter', system-ui, sans-serif; }
/* the page is a picture, so each theme tints it: paper as it is, sepia warm, night inverted */
html[data-rd-theme="sepia"] .rd-page canvas { filter: sepia(.38) saturate(.9) brightness(.97); }
html[data-rd-theme="sepia"] .rd-page { background: #f4ecd8; }
html[data-rd-theme="night"] .rd-page canvas { filter: invert(.9) hue-rotate(180deg) brightness(.95) contrast(.95); }
html[data-rd-theme="night"] .rd-page { background: #1a1f29; box-shadow: none; }
html[data-rd-theme="night"] .rd-page-n { background: rgba(0,0,0,.5); color: #b4c0d4; }
.rd-pagegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; padding: 4px 6px; }
.rd-pagegrid button { min-height: 44px; border-radius: 10px; border: 1px solid var(--rd-line); background: transparent; font-size: 14px; font-weight: 600; cursor: pointer; }
.rd-pagegrid button:hover, .rd-pagegrid button.is-here { background: var(--rd-line); border-color: var(--rd-acc); }
.rd-fit { margin-top: 4px; min-height: 46px; border-radius: 12px; border: 1px solid var(--rd-line); background: transparent; font-size: 14px; font-weight: 600; cursor: pointer; }
.rd-pdfwrap .rd-end { margin-top: 22px; }
