/* Newsletter additions reuse ui.css tokens and existing card/button patterns. */
.library-page { --library-scroll-offset: 6rem; }
/* Hidden is authoritative, including when grid/flex rules are added later. */
.library-page [hidden] { display: none !important; }
.library-page [id] { scroll-margin-top: var(--library-scroll-offset); }
.newsletter-layout { display: grid; gap: 1.5rem; }

.library-page h2 { font-size: clamp(1.2rem, 3vw, 1.55rem); text-transform: uppercase; letter-spacing: .03em; }
.library-page h3 { font-size: 1.05rem; }
.library-page h4 { font-size: 1.12rem; line-height: 1.35; margin: 0 0 .7rem; overflow-wrap: anywhere; }
.library-page h4:focus, .library-page h2:focus, .closures-list li:focus { outline: 3px solid var(--ink); outline-offset: 4px; }
.library-page select:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.translation-note, .calendar-note { margin-top: 1rem; font-size: .88rem; color: var(--muted); max-width: 85ch; }
.section-nav { position: sticky; top: .5rem; z-index: 5; display: flex; align-items: center; gap: .25rem; padding: .25rem; margin-bottom: 1.5rem; background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-low); }
.section-nav-links { display: flex; gap: .5rem; overflow-x: auto; min-width: 0; padding: .4rem; scrollbar-width: thin; }
.section-nav a { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-height: 44px; padding: .4rem .8rem; flex-shrink: 0; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .9rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.section-nav a:focus-visible { outline-offset: 3px; }
@media (hover: hover) { .section-nav a:hover { text-decoration: underline; } }
/* Avoid a sticky strip dominating short landscape screens. */
@media (max-height: 450px) { .section-nav { position: static; } }
.language-controls { display: flex; flex-wrap: wrap; gap: .5rem; }
.language-controls button, .filter-panel button { font: inherit; font-weight: 700; cursor: pointer; }
.language-controls [aria-pressed="true"] { background: repeating-linear-gradient(-45deg, var(--hatch-a),var(--hatch-a) 4px,var(--hatch-b) 4px,var(--hatch-b) 8px); }
.highlight-grid, .event-grid, .service-grid, .contact-grid { display: grid; gap: 1rem; min-width: 0; }
.highlight-grid { margin-top: 1rem; }
.highlight-card, .event-card { border: 2px solid var(--line); border-radius: 12px; background: var(--surface); padding: 1rem; min-width: 0; box-shadow: 1px 1px 0 var(--line); }
.highlight-card h3 { margin-top: .7rem; }
.highlight-card a { display: inline-block; padding-block: .5rem; }
.event-card { align-self: start; }
.event-card p { font-size: .94rem; }
.event-status { display: inline-block; font-size: .85rem; font-weight: 700; border: 1px solid var(--line); border-radius: 6px; padding: .2rem .5rem; margin-top: .7rem; }
.event-card[data-current-status="past"] .event-status { border-style: dashed; }
.event-date, .event-age { font-weight: 700; }
.event-card .event-date { font-size: 1rem; }
.event-date time:last-child { font-size: 1.12rem; }
.event-age { margin-top: .5rem; }
.requirements { border-top: 2px dashed var(--line); padding-top: .7rem; margin-top: .9rem; }
.event-secondary { margin-top: 1rem; }
.event-location, .confirmation { margin-top: .9rem; }
.source-link { display: inline-block; margin-top: .9rem; font-size: .8rem; min-height: 44px; padding-block: .4rem; }
.audience-section { margin-top: 1.5rem; }
.audience-section > h3 { border-bottom: 2px dashed var(--line); padding-bottom: .7rem; margin-bottom: 1rem; }
.filter-panel { margin-top: 1.2rem; }
.filter-panel fieldset { border: 2px solid var(--line); border-radius: 12px; padding: 1rem; min-width: 0; }
.filter-panel legend { padding-inline: .4rem; font-weight: 700; }
.filter-help { margin: .4rem 0 1rem; font-size: .88rem; }
.filter-fields { display: grid; gap: .8rem; margin-bottom: 1rem; }
.filter-fields label { display: grid; gap: .4rem; min-width: 0; font-weight: 700; }
.filter-fields select { width: 100%; min-width: 0; min-height: 44px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; font: inherit; padding: .4rem; }
.result-count { margin-top: .8rem; font-weight: 700; font-size: .9rem; }
.month-calendar { width: 100%; border-collapse: collapse; table-layout: fixed; margin-top: 1rem; font-size: .85rem; }
.month-calendar caption { text-align: left; font-weight: 700; padding-bottom: .75rem; }
.month-calendar th { text-transform: uppercase; font-size: .75rem; padding: .6rem 0; }
.month-calendar td { border: 1px solid var(--line); vertical-align: top; padding: 0; overflow-wrap: normal; }
.month-calendar a { display: flex; flex-direction: column; justify-content: space-between; gap: .3rem; min-height: 64px; padding: .35rem 0; text-align: center; text-decoration-thickness: 1px; }
.month-calendar a:focus-visible { outline-offset: -3px; }
.month-calendar .day-number { font-size: 1rem; font-weight: 800; }
.month-calendar .calendar-count { font-size: .85rem; line-height: 1.3; font-weight: 700; }
.calendar-closure-link { background: repeating-linear-gradient(-45deg, var(--hatch-a),var(--hatch-a) 4px,var(--hatch-b) 4px,var(--hatch-b) 8px); }
.plain-day { display: block; min-height: 70px; padding: .25rem .1rem; text-align: center; }
.service-grid details { margin-top: 1rem; min-width: 0; align-self: start; }
.contact-grid { margin-top: 1rem; }
address { font-style: normal; margin-block: 1rem; }
.hours-list { margin: 1rem 0 0; }
.hours-list > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; border-bottom: 1px dashed var(--line); padding-block: .45rem; }
.hours-list dd { margin: 0; }
.closures-heading { margin-top: 1.5rem !important; }
.closures-list { padding-left: 1.2rem; }
.closures-list li { padding-block: .5rem; scroll-margin-top: var(--library-scroll-offset); }
.closures-list strong { display: block; margin-top: .2rem; }
@media (min-width: 650px) {
 .filter-fields { grid-template-columns: 1fr 1fr 1fr; }
 .event-grid, .service-grid, .contact-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .highlight-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .month-calendar a, .plain-day { min-height: 85px; }
}
@media (min-width: 1000px) { .highlight-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media print {
 [hidden] { display: none !important; }
 .filter-panel, .language-controls, .theme-toggle, .section-nav, .floating-top { display: none !important; }
 .event-grid { display: block; }
 .event-card { break-inside: avoid; margin-block: 1rem; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 649px) {
 #calendar { padding: .5rem; }
 .event-card { padding: .85rem; }
}

.library-page .hero-actions > a { display: inline-flex; align-items: center; min-height: 44px; }

.floating-top { position: fixed; z-index: 20; right: calc(1rem + env(safe-area-inset-right, 0px)); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); width: 48px; height: 48px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-low); background: var(--surface); color: var(--ink); font-size: 1.6rem; font-weight: 700; text-decoration: none; }
.floating-top:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
