/* Shared reading controls; loaded after the catalogue's original styles. */
body :is(.eyebrow,.card-image-label,.image-badge,.caption-note,.card-meta,.card-material,
.citations,.editorial-note,.search-help,.glossary-evidence,.route-back,.collection-stats,
.viewer-status,.viewer-caption,.chrono-scroll-hint,.chrono-chart-note,.chrono-gap-note,
.chrono-evidence,.chrono-record,.chrono-kind,.chrono-unquantified,.chrono-tick){font-size:.875rem}
body .artifact-figure figcaption,body .comparison-gallery figcaption,body .specimen figcaption,
body .detailed-sources p,body .source-card p,body .source-card .caption-note,
body .glossary-examples,body .glossary-examples>span,body .fact-grid span,
body .chrono-date>span,body .chrono-table tbody th span,body .chrono-table caption,
body .chrono-overview summary span{font-size:.875rem;line-height:1.8}
body .hero .artifact-figure figcaption,body .chrono-photo .artifact-figure figcaption,
body .chrono-photo .image-badge{font-size:.875rem;line-height:1.8}
body .article-hero .review-date,body .article-hero .aliases{font-size:.875rem!important}
body .reading-nav .article-toc a,body .chrono-chapter-nav a,
body .compare-preset-links a,body .tag-list a{font-size:.875rem;min-height:44px}
body .tag-list a{display:inline-flex;align-items:center;padding:8px 12px}
body .reading-nav .article-toc a{overflow-wrap:anywhere}
body .specimen dd,body .source-card a,body .detailed-sources a{overflow-wrap:anywhere}
body .citations a{padding-inline:3px;text-underline-offset:3px}
.reading-menu>summary,.chrono-menu>summary{display:flex;align-items:center;gap:12px;min-height:48px;padding:10px 12px;font-size:1rem;font-weight:650;color:var(--primary);cursor:pointer;list-style:none}
.reading-menu>summary::-webkit-details-marker,.chrono-menu>summary::-webkit-details-marker{display:none}
.reading-menu>summary::after,.chrono-menu>summary::after{content:'＋';margin-left:auto;font-size:1.2rem}
.reading-menu[open]>summary::after,.chrono-menu[open]>summary::after{content:'−'}
.menu-hint{font-size:.8125rem;font-weight:400;color:var(--muted)}
.reading-menu>summary:focus-visible,.chrono-menu>summary:focus-visible,
.long-page-tools a:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.long-page-tools{position:sticky;top:76px;z-index:6;display:flex;flex-wrap:wrap;gap:8px;padding-block:8px;background:var(--bg);border-block:1px solid var(--line)}
.long-page-tools a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 14px;border:1px solid var(--line);border-radius:4px;background:var(--surface);font-size:.875rem;color:var(--primary);text-underline-offset:4px}
html:has(.long-page-tools),html:has(.chrono-menu){scroll-padding-top:156px}
.chrono-menu{position:sticky;top:76px;z-index:6;background:var(--bg);border-bottom:1px solid var(--line)}
.chrono-menu>summary{display:none}
.chrono-menu .chrono-chapter-nav{position:static;border:0}
.chronology [id]{scroll-margin-top:12px}
@media(max-width:900px){
 html{scroll-padding-top:144px}
 .reading-nav{position:sticky;top:76px;z-index:7;max-height:none;overflow:visible;padding:0;margin-bottom:24px;background:var(--bg);border:1px solid var(--line);border-radius:4px}
 .reading-menu>summary{background:#edf2ea}
 body .reading-nav .article-toc{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px;max-height:50dvh;overflow:auto;overscroll-behavior:contain}
 body .reading-nav .article-toc a{display:flex;align-items:center;margin:0;padding:9px 10px;line-height:1.65;background:var(--surface)}
 .chrono-menu>summary{display:flex}
 .chrono-menu .chrono-chapter-nav{max-height:50dvh;overflow:auto;gap:8px}
 body .chrono-chapter-nav a{white-space:normal}
}
@media(max-width:640px){
 .reading-nav,.long-page-tools,.chrono-menu{top:66px}
 html,html:has(.long-page-tools),html:has(.chrono-menu){scroll-padding-top:140px}
 body .utility-nav{font-size:.875rem;letter-spacing:normal}
 body .utility-nav a{min-height:44px;padding-inline:8px}
 body .viewer-button{font-size:.875rem}
 body .artifact-figure .image-badge{position:static;display:block;text-align:center;width:100%;padding:8px 12px;border-inline:0;border-bottom:0;border-radius:0}
 .long-page-tools a{padding-inline:12px}
 body .fact-grid strong{font-size:.875rem}
}
@media print{
 .reading-nav,.long-page-tools,.chrono-menu{display:none!important}
}
/* Variable offsets also follow a wrapped header at enlarged text sizes. */
html:has(.reading-enhanced){scroll-padding-top:var(--reading-top-offset,140px)}
.reading-enhanced .long-page-tools,.reading-enhanced .chrono-menu{top:var(--site-header-height,76px)}
@media(max-width:900px){
 .reading-enhanced .reading-nav{top:var(--site-header-height,76px)}
 body:not(.reading-enhanced) .reading-nav,body:not(.reading-enhanced) .long-page-tools,body:not(.reading-enhanced) .chrono-menu{position:static}
}
@media(max-width:640px){
 .header-inner{gap:12px}.brand{min-width:0;flex:1}.brand span{overflow-wrap:anywhere;white-space:normal}.brand img,.nav-toggle{flex-shrink:0}
 .menu-hint{display:none}
 body .utility-nav>div{display:flex;flex-wrap:wrap}
}
