.shelf-hero { padding: 12px 0 24px; border-bottom: 1px solid #80908030; margin-bottom: 24px; }
.shelf-eyebrow { font: 600 11px/1.4 ui-monospace, monospace; letter-spacing: .16em; text-transform: uppercase; opacity: .6; }
.shelf-hero h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.2; margin: 12px 0 16px; font-weight: 650; letter-spacing: -.04em; }
.shelf-hero p { opacity: .7; font-size: 15px; max-width: 40em; }
.shelf-controls { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.shelf-controls input, .shelf-controls select { padding: 10px 12px; border: 1px solid #80908050; border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: 14px; min-width: 0; }
.shelf-controls input { flex: 1; min-width: 160px; }
.shelf-controls select { max-width: 100%; }
.shelf-controls option { color: #28332e; background: #fff; }
.shelf-count { font-size: 12px; opacity: .6; margin-bottom: 24px; }
.paper-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.paper-card { border: 1px solid #80908030; border-radius: 12px; padding: 24px; transition: border-color .15s; }
.paper-card:hover { border-color: #80908080; }
.paper-card[hidden] { display: none !important; }
.paper-card .paper-meta { font: 12px/1.4 ui-monospace, monospace; opacity: .65; }
.paper-card h2 { font-size: 21px; line-height: 1.35; margin: 8px 0; font-weight: 650; }
.paper-card .paper-title { font-size: 13px; line-height: 1.65; opacity: .65; margin: 0 0 12px; }
.paper-card .paper-summary { font-size: 14px; line-height: 1.85; margin: 12px 0; }
.paper-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.paper-tags span { font: 11px/1.5 ui-monospace, monospace; padding: 3px 7px; background: #80908012; border-radius: 4px; opacity: .8; overflow-wrap: anywhere; }
.reading-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 13px; }
.reading-actions a { font-weight: 500; text-decoration: none; }
.reading-actions a:first-child { font-weight: 650; }
.paper-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 10px 0 16px; margin-bottom: 24px; border-bottom: 1px solid #80908030; font-size: 13px; }
.paper-details { background: #8090800b; border: 1px solid #80908025; padding: 16px 20px; border-radius: 8px; margin: 24px 0; }
.paper-details summary { cursor: pointer; font-size: 13px; }
.paper-details ul { margin-bottom: 0; }
.shelf-empty { padding: 40px 12px; text-align: center; opacity: .7; }
@media (max-width: 500px) { .paper-card { padding: 18px; } .shelf-controls { flex-direction: column; } .shelf-controls input { width: 100%; box-sizing: border-box; } }
.paper-tags a { font: 11px/1.5 ui-monospace, monospace; padding: 3px 7px; background: #80908012; border-radius: 4px; overflow-wrap: anywhere; text-decoration: none; }
.paper-tags a:hover { background: #80908028; }
.shelf-pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 28px 0; font-size: 14px; }
.shelf-pagination > span { opacity: .65; }
.shelf-pagination > :first-child, .shelf-pagination > :last-child { min-width: 5em; }
.shelf-pagination > :last-child { text-align: right; }
.shelf-error { color: #a64639; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.topic-card { display: flex; flex-direction: column; border: 1px solid #80908040; border-radius: 10px; padding: 20px; }
.markdown .topic-card h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 19px; margin: 0; padding: 0; }
.topic-card small, .collection-links small, .topic-children small { font-size: 12px; opacity: .6; font-weight: 400; font-variant-numeric: tabular-nums; }
.topic-card p { font-size: 13px; opacity: .65; min-height: 3.8em; margin: 10px 0 14px; }
.topic-children a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; padding: 6px 0; }
.collection-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.collection-links a { display: inline-flex; flex: 0 1 auto; align-items: baseline; gap: 12px; border: 1px solid #80908030; border-radius: 7px; padding: 7px 12px; font-size: 13px; }
.collection-links a:hover { background: #80908012; }
.collection-trail { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 12px; margin-bottom: 12px; }
.collection-trail > span { opacity: .6; }
.tag-directory { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.tag-directory a { display: inline-flex; align-items: center; gap: 10px; border: 1px solid #80908030; padding: 8px 12px; border-radius: 7px; font-size: 13px; overflow-wrap: anywhere; }
.tag-directory span { opacity: .6; }
.library-main-links { margin: 24px 0 !important; }
.library-nav-section { margin: 26px 0; }
.library-nav-section h2 { font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--body-font-color); opacity: .55; margin: 0 0 10px; }
.library-nav-section ul { margin: 0 !important; }
.library-nav-section li { margin: 0 !important; }
.library-nav-section a { display: flex !important; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 0; line-height: 1.5; }
.library-nav-section a span { min-width: 0; }
.library-nav-section small { opacity: .5; font-size: 11px; font-variant-numeric: tabular-nums; }
.library-navigation a.active { font-weight: 650; }
.nav-topic-group { margin: 3px 0; }
.nav-topic-group summary { display: flex; align-items: center; gap: 2px; list-style: none; cursor: pointer; border-radius: 6px; }
.nav-topic-group summary::-webkit-details-marker { display: none; }
.nav-topic-group summary a { flex: 1; min-width: 0; padding: 9px 0; }
.topic-toggle { display: grid; place-items: center; width: 32px; min-height: 40px; flex: 0 0 32px; font-size: 20px; opacity: .5; }
.nav-topic-group[open] .topic-toggle { transform: rotate(90deg); }
.nav-topic-group summary:hover { background: #8090800b; }
.nav-topic-group summary:focus-visible { outline: 2px solid var(--color-link); outline-offset: 2px; }
.library-nav-section .nav-topic-group ul { border-left: 1px solid #80908040; margin: 2px 0 10px 3px !important; padding-left: 12px; }
.nav-topic-group ul a { font-size: 13px; padding: 6px 0; }
