:root {
  --navy: #25316c;
  --navy-deep: #18204a;
  --sky: #7aa7da;
  --sky-wash: #edf3fa;
  --ink: #1e2230;
  --muted: #4a5063;
  --paper: #f6f4ee;
  --rule: rgba(37, 49, 108, .14);
  --white: #fff;
  --display: "Federant", Georgia, serif;
  --text: "Inclusive Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--text);
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--navy); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3.25rem); }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.3vw, 2.5rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: .18em; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: 16px; top: -100px; z-index: 50; background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 3px; }
.skip:focus { top: 12px; outline-color: var(--navy); }

/* Notice */
.notice { background: var(--sky-wash); border-bottom: 1px solid var(--rule); text-align: center; }
.notice p { margin: 0; padding: 10px 16px; font-size: 1rem; color: var(--navy); font-weight: 600; }
.notice[hidden] { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 20px;
  font: 600 1rem/1.2 var(--text); text-decoration: none; text-align: center;
  border: 2px solid var(--navy); border-radius: 3px; cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .08s ease;
}
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--navy); color: #fff; }
.btn-line { background: #fff; color: var(--navy); }
.btn-white { background: #fff; color: var(--navy); border-color: #fff; }
.btn-lg { min-height: 52px; padding: 12px 26px; font-size: 1.0625rem; }
.btn-block { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn-solid:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
  .btn-line:hover { background: var(--navy); color: #fff; }
  .btn-white:hover { background: var(--sky-wash); border-color: var(--sky-wash); }
  a:hover { text-decoration-thickness: 2px; }
}

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--rule); position: relative; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { width: 72px; }
.brand-name { font-family: var(--display); color: var(--navy); font-size: 1.25rem; line-height: 1.05; }
.header-actions { display: flex; gap: 10px; }
.header-actions .btn-line { display: none; }
.menu-btn {
  font: 600 1rem var(--text); color: var(--navy); background: #fff;
  border: 2px solid var(--rule); border-radius: 3px; min-height: 46px; padding: 8px 14px; cursor: pointer;
}
.menu-btn[aria-expanded="true"] { border-color: var(--navy); }
.main-nav { order: 3; }
.menu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--rule);
  display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden;
  transition: grid-template-rows .25s ease, opacity .25s ease, visibility 0s linear .25s;
}
.menu > * { min-height: 0; overflow: hidden; }
.menu.open { grid-template-rows: 1fr; opacity: 1; visibility: visible; transition: grid-template-rows .25s ease, opacity .25s ease; }
.menu-inner { padding: 4px 16px 20px; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li a { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); text-decoration: none; font-weight: 600; font-size: 1.0625rem; }
.menu .menu-member { margin-top: 16px; width: 100%; }
html:not(.js) .menu { position: static; grid-template-rows: 1fr; opacity: 1; visibility: visible; }
html:not(.js) .menu-btn { display: none; }

@media (max-width: 480px) {
  .brand-name { font-size: 1rem; }
  .brand img { width: 46px; }
  .brand { gap: 8px; }
  .header-row { gap: 8px; }
  .header-actions .btn, .menu-btn { padding-left: 12px; padding-right: 12px; }
}

@media (min-width: 1140px) {
  .main-nav { order: 0; }
  .menu-btn { display: none; }
  .menu, .menu.open { position: static; display: block; opacity: 1; visibility: visible; border: 0; background: none; transition: none; }
  .menu-inner { padding: 0; display: flex; align-items: center; }
  .menu ul { display: flex; gap: 4px; }
  .menu li a { border: 0; padding: 10px 12px; font-size: 1rem; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .4em; transition: text-decoration-color .18s ease; }
  .menu .menu-member { display: none; }
  .header-actions .btn-line { display: inline-flex; }
  .header-actions { margin-left: 12px; }
}
@media (min-width: 1140px) and (hover: hover) and (pointer: fine) {
  .menu li a:hover { text-decoration-color: var(--navy); }
}

/* Hero */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.hero-photo { order: -1; margin: 0 -16px; }
.hero-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 70%; }
.hero-card { padding: 28px 0 8px; }
.hero-card .lede { font-size: 1.25rem; color: var(--navy); font-weight: 600; margin-bottom: .6em; }
.hero-card p { color: var(--muted); max-width: 46ch; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (min-width: 700px) { .hero-photo { margin: 0 -32px; } }
@media (min-width: 900px) {
  .hero { padding: 48px 0 24px; }
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
  .hero-photo { order: 0; margin: 0; }
  .hero-photo img { aspect-ratio: 4 / 3; object-position: 50% 75%; }
  .hero-card { padding: 0; }
}

/* Sections */
section { scroll-margin-top: 16px; }
.events, .support, .sales, .library, .volunteer { padding: 64px 0; }
@media (min-width: 900px) { .events, .support, .sales, .library, .volunteer { padding: 96px 0; } }

/* Events */
.events-grid { display: grid; gap: 40px; }
.events-intro p { color: var(--muted); }
.events-photo { margin: 28px 0 0; }
.events-photo figcaption, .photo-grid figcaption { font-size: .9375rem; color: var(--muted); margin-top: 8px; }
.event-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--navy); }
.event { display: grid; grid-template-columns: 76px 1fr; gap: 16px; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.event-date { font-family: var(--display); color: var(--navy); margin: 0; line-height: 1; }
.event-date .m { display: block; font-size: 1.125rem; margin-bottom: 6px; }
.event-date .d { display: block; font-size: 2rem; }
.event h3 { margin-bottom: .3em; }
.event-when { font-weight: 600; margin-bottom: .6em; }
.event-body > p:not(.event-when) { color: var(--muted); }
.event-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.event-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 2px solid var(--navy); border-radius: 3px; text-decoration: none; font-weight: 600; font-size: 1rem; color: var(--navy); transition: background-color .18s ease, color .18s ease; }
.event-links a:active { transform: translateY(1px); }
@media (hover: hover) and (pointer: fine) { .event-links a:hover { background: var(--navy); color: #fff; } }
.event-fund { font-size: .9375rem; font-style: italic; margin: 8px 0 0; }
.recent-title { font-size: 1.25rem; margin: 40px 0 8px; }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 1rem; }
.recent-list span { color: var(--navy); font-weight: 600; }
.events-photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
@media (min-width: 900px) {

  .event { grid-template-columns: 96px 1fr; gap: 24px; }
  .event-date .d { font-size: 2.5rem; }
}

/* Support */
.support { border-top: 1px solid var(--rule); }
.support-grid { display: grid; gap: 40px; }
.give-form fieldset { border: 0; margin: 0 0 24px; padding: 0; min-width: 0; }
.give-form legend, .freq-label, .custom label { font-weight: 600; margin-bottom: 10px; padding: 0; display: block; }
.mode { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--navy) !important; border-radius: 3px; overflow: hidden; }
.mode label { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 8px 10px; text-align: center; font-weight: 600; color: var(--navy); cursor: pointer; transition: background-color .18s ease, color .18s ease; }
.mode label + label { border-left: 2px solid var(--navy); }
.mode input, .amount-grid input, .freq-opts input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mode label:has(input:checked) { background: var(--navy); color: #fff; }
.mode label:has(input:focus-visible), .amount-grid label:has(input:focus-visible), .freq-opts label:has(input:focus-visible) { outline: 3px solid var(--navy); outline-offset: 3px; position: relative; z-index: 1; }
.amount-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.amount-grid label { display: flex; flex-direction: column; justify-content: center; min-height: 72px; padding: 10px 14px; border: 1px solid rgba(37, 49, 108, .35); border-radius: 3px; cursor: pointer; color: var(--muted); font-size: .9375rem; transition: background-color .18s ease, border-color .18s ease, color .18s ease; }
.amount-grid b { font-family: var(--text); font-weight: 600; font-size: 1.375rem; color: var(--navy); line-height: 1.1; }
.amount-grid label:has(input:checked) { background: var(--navy); border-color: var(--navy); color: #fff; }
.amount-grid label:has(input:checked) b { color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .amount-grid label:hover { border-color: var(--navy); }
  .mode label:not(:has(input:checked)):hover { background: var(--sky-wash); }
  .freq-opts label:not(:has(input:checked)):hover { border-color: var(--navy); }
}
.freq { margin-top: 20px; }
.freq-opts { display: flex; gap: 10px; flex-wrap: wrap; }
.freq-opts label { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border: 1px solid rgba(37, 49, 108, .35); border-radius: 3px; cursor: pointer; font-weight: 600; color: var(--navy); transition: background-color .18s ease, color .18s ease; }
.freq-opts label:has(input:checked) { background: var(--navy); color: #fff; border-color: var(--navy); }
.custom { margin: -8px 0 20px; }
.custom-input { display: flex; align-items: center; border: 1px solid rgba(37, 49, 108, .5); border-radius: 3px; max-width: 220px; background: #fff; }
.custom-input span { padding: 0 4px 0 14px; color: var(--muted); }
.custom-input input { border: 0; font: inherit; padding: 12px 12px 12px 2px; width: 100%; min-width: 0; background: transparent; color: var(--ink); }
.custom-input:focus-within { outline: 3px solid var(--navy); outline-offset: 2px; }
.custom-input input:focus { outline: none; }
.field-error { color: #a1261b; font-weight: 600; font-size: 1rem; margin: 8px 0 0; }
.summary { font-weight: 600; font-size: 1.25rem; color: var(--navy); margin: 0 0 14px; }
.fine { font-size: .9375rem; color: var(--muted); margin-top: 16px; }
.pays-for { background: var(--sky-wash); padding: 32px 24px; border-top: 4px solid var(--sky); }
.pays-for ul { list-style: none; margin: 0 0 24px; padding: 0; }
.pays-for li { padding: 14px 0; border-bottom: 1px solid var(--rule); color: var(--muted); }
.pays-for li b { color: var(--navy); }
.pays-for .tax { font-size: .9375rem; color: var(--muted); margin: 0; }
@media (min-width: 900px) {

  .amount-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pays-for { padding: 40px; }
}

/* Book sales */
.sales { border-top: 1px solid var(--rule); }
.sales-grid { display: grid; gap: 32px; }
.sales-photo { margin: 0; }
.sales-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 30%; }
.sales-body > p { color: var(--muted); max-width: 54ch; }
.prices { margin: 28px 0; border-top: 2px solid var(--navy); }
.prices div { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.prices dt { font-weight: 600; }
.prices dd { margin: 0 0 0 auto; font-weight: 600; font-size: 1.5rem; color: var(--navy); line-height: 1; white-space: nowrap; }
.prices div:last-child dd { font-size: 1.125rem; }
.sales-note { font-size: 1rem; }
@media (min-width: 900px) {

  .sales-photo img { aspect-ratio: 4 / 5; }
}

/* Library */
.library { background: var(--paper); }
.library-head { max-width: 760px; margin-bottom: 36px; }
.library-head p { color: var(--muted); }
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
.photo-grid figure { margin: 0; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.visit { display: grid; gap: 28px; margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--rule); }
.visit address { margin-bottom: 12px; }
.plain-links { list-style: none; margin: 0; padding: 0; }
.plain-links li { margin: 0 0 6px; }
.plain-links a { display: inline-block; padding: 6px 0; }
.map iframe { display: block; width: 100%; height: 300px; border: 1px solid var(--rule); }
@media (min-width: 700px) { .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; } }


/* Volunteer */
.volunteer-grid { display: grid; gap: 12px; }
.volunteer-grid p { color: var(--muted); max-width: 60ch; }


/* Newsletter */
.newsletter { background: var(--navy); color: #fff; padding: 48px 0; }
.newsletter h2 { color: #fff; margin-bottom: .3em; }
.newsletter p { margin: 0; color: #e3e8f5; }
.newsletter-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.newsletter :focus-visible { outline-color: #fff; }

/* Footer */
.site-footer { background: var(--paper); padding: 56px 0 24px; font-size: 1rem; }
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand img { width: 150px; }
.footer-h { font-family: var(--text); font-weight: 600; font-size: 1rem; color: var(--ink); margin: 0 0 10px; }
.site-footer address { margin-bottom: 8px; color: var(--muted); }
.footer-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); color: var(--muted); font-size: .9375rem; }
.footer-base p { margin: 0 0 6px; }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
.event-empty { padding: 24px 0; color: var(--muted); border-bottom: 1px solid var(--rule); }

/* Reflow at high zoom (WCAG 1.4.10) */
.events-grid, .support-grid, .sales-grid, .volunteer-grid, .visit { grid-template-columns: minmax(0, 1fr); }
.header-row { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
@media (max-width: 300px) {
  .brand { flex-basis: 100%; }
  .event { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .event-date .m, .event-date .d { display: inline; font-size: 1.25rem; }
  .recent-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .photo-grid { grid-template-columns: minmax(0, 1fr); }
  .mode { grid-template-columns: minmax(0, 1fr); }
  .mode label + label { border-left: 0; border-top: 2px solid var(--navy); }
  .amount-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 900px) {
  .events-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); gap: 72px; }
  .support-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
  .sales-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; align-items: center; }
  .visit { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; }
  .map iframe { height: 340px; }
  .volunteer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); gap: 72px; }
}
@media (max-width: 300px) { .prices div { flex-wrap: wrap; } .prices dd { white-space: normal; } }
@media (max-width: 599px) {
  .event { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .event-date .m, .event-date .d { display: inline; font-size: 1.25rem; margin: 0; }
}
