/* Book-specific reading guide and limited sample; shares Folio's typography and palette. SPDX-License-Identifier: MIT */
.book-insight {
    grid-column: 1 / -1;
    min-width: 0;
    border-top: 1px solid var(--rule);
    padding-top: 50px;
    scroll-margin-top: 35px;
}
.book-insight [hidden] { display: none !important; }
.book-insight__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 36px;
}
.book-insight__heading .eyebrow { color: var(--accent); margin-bottom: 12px; }
.book-insight__heading h2 { font-size: clamp(32px, 4vw, 46px); }
.book-insight__download { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: 100%; }
.book-insight__rights { color: var(--muted); font-size: 11px; line-height: 1.5; text-decoration: underline; text-underline-offset: 3px; }
.book-insight__rights:hover, .book-insight__rights:focus-visible { color: var(--accent); }
.book-insight__pdf {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 9px 22px;
    min-height: 44px;
    padding: 12px 16px;
    border: 1px solid var(--rule);
    color: var(--ink);
    font-size: 12px;
    text-decoration: none;
}
.book-insight__pdf:hover { border-color: var(--accent); color: var(--accent); }
.book-insight__pdf > span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.book-insight__body { max-width: 820px; margin-inline: auto; min-width: 0; }
.book-insight__tabs {
    display: flex;
    gap: clamp(16px, 4vw, 32px);
    border-bottom: 1px solid var(--rule);
    margin-bottom: 30px;
}
.book-insight__tabs button {
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--muted);
    padding: 12px 0;
    min-height: 46px;
    font: 14px/1.5 var(--font-body);
    text-align: left;
    overflow-wrap: anywhere;
}
.book-insight__tabs button[aria-selected='true'] { border-bottom-color: var(--accent); color: var(--accent); }
.book-insight__tabs button:hover { color: var(--accent); }
.book-insight__panel-heading { margin: 28px 0 18px; font-size: 26px; }
.book-insight.is-enhanced .book-insight__panel-heading { display: none; }
.book-insight__label { color: var(--accent); font: 11px/1.6 var(--font-body); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 13px; }
.book-insight__intro { font: 24px/1.6 var(--font-display); margin-bottom: 30px; text-align: justify; text-align-last: start; hyphens: auto; }
.book-insight__questions { margin: 0 0 30px; padding-left: 22px; font-size: 16px; }
.book-insight__questions li { padding: 6px 0 6px 6px; }
.book-insight__chapter { border-top: 1px solid var(--rule); }
.book-insight__chapter summary {
    display: flex;
    align-items: baseline;
    gap: 16px;
    list-style: none;
    padding: 18px 0;
    font: 23px/1.4 var(--font-display);
    cursor: pointer;
}
.book-insight__chapter summary::-webkit-details-marker { display: none; }
.book-insight__chapter summary::after { content: '+'; color: var(--muted); font: 19px/1 var(--font-latin-body); flex-shrink: 0; }
.book-insight__chapter[open] summary::after { content: '−'; }
.book-insight__chapter summary > :nth-child(2) { flex: 1; min-width: 0; }
.book-insight__chapter-number { color: var(--accent); font: 13px/1.5 var(--font-latin-body); min-width: 12px; }
.book-insight__page-number { color: var(--muted); font: 13px/1.7 var(--font-latin-body); flex-shrink: 0; }
.book-insight__chapter ol { margin: 0; padding: 0 0 20px 28px; list-style: none; }
.book-insight__chapter li, .book-insight__toc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 8px 0; font-size: 15px; }
.book-insight__chapter li > :first-child, .book-insight__toc-row > :first-child { min-width: 0; }
.book-insight__toc-read { display: inline-block; min-height: 44px; color: var(--accent); text-decoration: none; }
.book-insight__toc-read:hover { color: var(--accent-hover); }
.book-insight__toc-read > span { display: block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; margin-top: 3px; }
.book-insight__backmatter { border-top: 1px solid var(--rule); padding-top: 14px; }
.book-insight__reader-options { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; margin-bottom: 20px; }
.book-insight__reader-options > label { flex: 1 1 300px; min-width: 0; color: var(--muted); font: 12px/1.5 var(--font-latin-body); }
.book-insight__reader-options select {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 6px;
    min-height: 46px;
    padding: 10px 34px 10px 12px;
    border: 1px solid var(--rule);
    border-radius: 0;
    background: var(--paper);
    color: var(--ink);
    font: 14px/1.5 var(--font-latin-body);
}
.book-insight__format { display: flex; border-bottom: 1px solid var(--rule); }
.book-insight__format button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); min-height: 44px; padding: 10px; font: 12px/1.5 var(--font-latin-body); }
.book-insight__format button[aria-pressed='true'] { border-bottom-color: var(--accent); color: var(--accent); }
.book-insight__pager { display: grid; grid-template-columns: 46px minmax(0, 1fr) 46px; align-items: center; gap: 12px; margin-bottom: 18px; }
.book-insight__pager button { min-width: 44px; min-height: 44px; background: transparent; border: 1px solid var(--rule); color: var(--ink); font: 20px/1 var(--font-latin-body); }
.book-insight__pager button:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.book-insight__pager button:disabled { opacity: .3; cursor: default; }
.book-insight__pager p { text-align: center; color: var(--muted); font: 13px/1.5 var(--font-latin-body); }
.book-insight__original { margin: 0; }
.book-insight__original img { display: block; width: 100%; max-width: 760px; height: auto; margin-inline: auto; box-shadow: 0 3px 18px #232a2610; }
.book-insight__text { max-width: 36em; margin-inline: auto; font: 19px/1.85 var(--font-latin-display); overflow-wrap: break-word; text-align: justify; text-align-last: start; hyphens: auto; }
.book-insight__text p + p { margin-top: 1.25em; }
.book-insight__fallback { font-size: 15px; }
.book-insight__fallback a { color: var(--accent); }
.book-insight__note { margin-top: 32px; border-top: 1px solid var(--rule); padding-top: 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }
html[data-script='glagoljica'] .book-insight__tabs button { font-size: 13px; }
html[data-script='glagoljica'] .book-insight__intro { hyphens: none; }
@media (max-width: 600px) {
    .book-insight { padding-top: 32px; }
    .book-insight__heading { align-items: flex-start; gap: 20px; margin-bottom: 24px; }
    .book-insight__tabs { gap: 16px; margin-bottom: 24px; }
    .book-insight__tabs button { font-size: 12px; }
    .book-insight__intro { font-size: 21px; }
    .book-insight__questions { font-size: 15px; }
    .book-insight__chapter summary { font-size: 20px; gap: 10px; }
    .book-insight__chapter ol { padding-left: 22px; }
    .book-insight__chapter li, .book-insight__toc-row { font-size: 14px; gap: 14px; }
    .book-insight__reader-options { gap: 8px; }
    .book-insight__reader-options select { font-size: 16px; }
    .book-insight__text { font-size: 18px; }
    .book-insight .action { gap: 20px; padding-inline: 16px; font-size: 12px; }
}
