.library-skip { position: absolute; top: -5rem; left: 1rem; z-index: 100; padding: .8rem 1rem; background: var(--white); }
.library-skip:focus { top: .5rem; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
.library-hero { padding: 5rem 0; background: var(--gold-soft); border-bottom: 1px solid #dfd4b7; }
.library-hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 4rem; align-items: center; }
.library-hero h1 { font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(2.8rem, 6vw, 4.6rem); line-height: 1.05; color: var(--navy); margin: 1rem 0; }
.library-lead { font-size: 1.2rem; max-width: 35rem; margin-bottom: 1.8rem; }
.library-hero-note { border-inline-start: 1px solid #cdbb86; padding-inline-start: 2.5rem; color: var(--navy); }
.library-mark { display: block; font-size: 4rem; line-height: 1.2; margin-bottom: 1rem; color: var(--gold); }
.library-caption { margin-top: 1rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .07em; }
.library-section { scroll-margin-top: 90px; }
.library-intro { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 3rem; margin-bottom: 2rem; }
.library-intro h2 { text-align: start; margin-bottom: 0; }
.library-intro > p { color: var(--muted); }
.library-controls { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem; padding: 1.5rem; background: var(--light); border: 1px solid #e0e5ee; margin-bottom: 2rem; border-radius: var(--radius); }
.library-controls label { display: block; font-weight: 600; font-size: .92rem; color: var(--navy); margin-bottom: .4rem; }
.library-controls input, .library-controls select { width: 100%; min-height: 48px; border: 1px solid #cbd2e0; border-radius: 6px; background: white; color: var(--text); padding: .7rem; font: inherit; }
.library-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2rem; align-items: start; }
.library-themes { display: grid; gap: .3rem; }
.library-theme { width: 100%; display: flex; justify-content: space-between; gap: .8rem; align-items: center; text-align: start; padding: .8rem; border: 1px solid transparent; border-radius: 6px; font: inherit; color: var(--navy); background: transparent; cursor: pointer; }
.library-theme:hover { background: var(--gold-soft); }
.library-theme[aria-pressed="true"] { background: var(--navy); color: white; }
.library-theme-count { font-size: .85rem; opacity: .8; }
.library-results-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; min-height: 2rem; }
.library-results-heading p { color: var(--muted); }
.library-reset { border: 0; background: transparent; color: var(--navy); text-decoration: underline; font: inherit; cursor: pointer; }
.library-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.library-card { border: 1px solid #dce2ec; border-top: 3px solid var(--gold); padding: 1.5rem; border-radius: 0 0 10px 10px; background: white; display: flex; flex-direction: column; align-items: start; transition: border-color .2s, box-shadow .2s; overflow-wrap: anywhere; }
.library-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.library-card-theme { text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; font-weight: 700; color: var(--navy); margin-bottom: .8rem; }
.library-card h3 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.6rem; line-height: 1.15; color: var(--navy); margin-bottom: .8rem; }
.library-card-authors { font-weight: 600; }
.library-card-meta { font-size: .9rem; color: var(--muted); margin: .3rem 0 1rem; }
.library-card-note { font-size: .9rem; padding-top: .7rem; border-top: 1px solid #e5e8ef; margin-bottom: 1rem; }
.library-badge { display: inline-block; padding: .2rem .65rem; border-radius: 3px; background: var(--gold-soft); color: var(--navy); font-size: .8rem; font-weight: 600; margin-bottom: 1rem; }
.library-card-links { display: flex; flex-wrap: wrap; gap: .7rem 1rem; margin-top: auto; font-weight: 600; font-size: .95rem; }
.library-card-links a { text-decoration: underline; text-underline-offset: 3px; }
.library-card-source { font-size: .76rem; color: var(--muted); margin-top: 1rem; }
.library-empty { grid-column: 1 / -1; padding: 3rem 2rem; background: var(--light); text-align: center; border-radius: var(--radius); }
.library-skeleton { height: 310px; border: 1px solid #e0e5ee; border-radius: 10px; background: linear-gradient(110deg, #f4f6fb 30%, #e7ecf5 50%, #f4f6fb 70%); background-size: 200% 100%; animation: library-loading 1.8s ease infinite; }
.library-guidance { background: var(--light); }
.library-guidance-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 4rem; }
.library-guidance h2 { text-align: start; }
.library-guidance p + p { margin-top: 1rem; color: var(--muted); font-size: .95rem; }
.library-sources { border-inline-start: 1px solid #cbd2e0; padding-inline-start: 2rem; }
.library-sources h3 { margin-bottom: 1rem; color: var(--navy); }
.library-sources a { display: block; border-bottom: 1px solid #dce2ec; padding: .65rem 0; }
.library-contribute { text-align: center; }
.library-contribute p { max-width: 42rem; margin: 0 auto 1.5rem; }
.library-content { min-width: 0; }
.library-content > .btn { margin-top: 1rem; }
[hidden] { display: none !important; }
.library-theme:focus-visible, .library-reset:focus-visible, .library-controls :focus-visible, .library-card a:focus-visible, .library-sources a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@keyframes library-loading { to { background-position: -200% 0; } }
@media (max-width: 900px) {
  .library-hero-grid, .library-intro { grid-template-columns: 1fr; gap: 2rem; }
  .library-hero-note { padding-inline-start: 1.5rem; }
  .library-mark { font-size: 2rem; }
  .library-layout { grid-template-columns: 1fr; }
  .library-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-guidance-grid { gap: 2rem; }
}
@media (max-width: 600px) {
  .library-hero { padding: 3rem 0; }
  .library-controls, .library-results, .library-guidance-grid { grid-template-columns: 1fr; }
  .library-controls { padding: 1rem; }
  .library-sources { border-inline-start: 0; padding-inline-start: 0; }
  .library-card { padding: 1.25rem; }
  .library-theme { font-size: .9rem; padding: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .library-skeleton { animation: none; }
  .library-card { transition: none; }
}
