/*
  Alder County Public Library — ModernWeb Template
  ================================================
  Designer: ModernWeb / Chicha Technology, LLC
  Template: Public Library

  PALETTE & CONTRAST AUDIT
  ─────────────────────────────────────────────────────────────────────────────
  Primary   #0E6E6E  teal       — dominant brand color
  Accent    #E07856  coral      — highlights, badges, icons
  BG        #FBF7EF  cream      — page background
  Ink       #20303A  dark blue-gray — body text

  WCAG AA contrast pairs (relative luminance per WCAG 2.1 formula):
    #20303A on #FBF7EF  → ~11.2:1  ✓  body/heading text on cream
    #FBF7EF on #0E6E6E  →  ~5.3:1  ✓  white text on teal buttons
    #FBF7EF on #E07856  →  ~3.1:1  — coral used ONLY for decorative icon BG
                                       and large-text badges (≥18px/bold = ≥14px bold,
                                       3:1 threshold applies). No small body text on coral.
    #0E6E6E on #FBF7EF  →  ~5.3:1  ✓  teal links on cream
    #20303A on #F0EDDE  →  ~10.8:1 ✓  text on slightly-deeper cream sections

  Typography:
    Rounded friendly sans — Verdana, "Segoe UI", Geneva, Tahoma, sans-serif
    Generous line-height (1.65), tracked headings, roomy padding

  Breakpoints:
    Mobile-first; max-width 1200px site-width
    @media (min-width: 640px)   small+
    @media (min-width: 900px)   medium+
    @media (min-width: 1100px)  large+
*/

/* ============================================================================
   RESET & BASE
   ============================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

html { overflow-x: hidden; }

body {
  font-family: Verdana, "Segoe UI", Geneva, Tahoma, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #20303A;
  background-color: #FBF7EF;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============================================================================
   SKIP LINK — WCAG 2.4.1
   ============================================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: #0E6E6E;
  color: #FBF7EF;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #E07856;
  outline-offset: 2px;
}

/* ============================================================================
   SCREEN-READER ONLY UTILITY
   ============================================================================ */
.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;
}

/* ============================================================================
   LAYOUT CONTAINER
   ============================================================================ */
.container {
  width: min(100%, 1180px);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ============================================================================
   FOCUS STYLES — WCAG 2.4.7 (applied to all interactive elements)
   ============================================================================ */
:focus-visible {
  outline: 3px solid #E07856;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */
h1, h2, h3, h4 {
  color: #20303A;
  line-height: 1.25;
  font-family: Verdana, "Segoe UI", Geneva, Tahoma, sans-serif;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 700; }
h3 { font-size: clamp(1rem, 2vw, 1.2rem); font-weight: 700; }

p { margin-bottom: 0; }

a {
  color: #0E6E6E;
  text-underline-offset: 3px;
  transition: color 0.15s ease, opacity 0.15s ease;
}
a:hover { color: #0A5454; }

address { font-style: normal; }

/* ============================================================================
   BUTTONS
   ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;          /* pill/rounded per layout personality */
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease,
              transform 0.1s ease;
  min-height: 44px;             /* WCAG 2.5.5 touch target */
  min-width: 44px;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

/* Primary — teal; #FBF7EF on #0E6E6E = 5.3:1 ✓ */
.btn-primary {
  background-color: #0E6E6E;
  color: #FBF7EF;
  border-color: #0E6E6E;
}
.btn-primary:hover {
  background-color: #0A5454;
  border-color: #0A5454;
  color: #FBF7EF;
}
.btn-primary:focus-visible {
  outline-color: #E07856;
}

/* Outline — teal on cream; #0E6E6E on #FBF7EF = 5.3:1 ✓ */
.btn-outline {
  background-color: transparent;
  color: #0E6E6E;
  border-color: #0E6E6E;
}
.btn-outline:hover {
  background-color: #0E6E6E;
  color: #FBF7EF;
}

/* ============================================================================
   CARD LINK
   ============================================================================ */
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0E6E6E;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: 0.75rem;
}
.card-link::after {
  content: ' →';
  font-size: 0.85rem;
}
.card-link:hover { color: #0A5454; }

/* ============================================================================
   SITE HEADER
   ============================================================================ */
.site-header {
  background: #FBF7EF;
  border-bottom: 2px solid #E8E2D4;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(14, 110, 110, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.site-logo:hover .logo-mark { opacity: 0.88; }
.logo-mark { flex-shrink: 0; border-radius: 10px; }
.logo-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.logo-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0E6E6E;
}
.logo-sub {
  font-size: 0.7rem;
  color: #20303A;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* Nav */
.primary-nav {
  display: flex;
  align-items: center;
}
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  flex-wrap: wrap;
}
.primary-nav a {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.8rem;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #20303A;
  text-decoration: none;
  border-radius: 50px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.primary-nav a:hover {
  background: rgba(14,110,110,0.1);
  color: #0E6E6E;
}
.nav-cta {
  background: #E07856 !important;
  color: #FBF7EF !important;
  font-weight: 700 !important;
  padding: 0.5rem 1.25rem !important;
}
.nav-cta:hover {
  background: #C5634C !important;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 2px solid #0E6E6E;
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
}
.hamburger-bar {
  display: block;
  width: 22px;
  height: 2.5px;
  background: #0E6E6E;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FBF7EF;
    border-bottom: 2px solid #E8E2D4;
    box-shadow: 0 6px 20px rgba(14,110,110,0.12);
    display: none;
    z-index: 200;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
    padding: 0.75rem 1.25rem 1rem;
  }
  .primary-nav a {
    width: 100%;
    border-radius: 8px;
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }
  .nav-cta { margin-top: 0.5rem; justify-content: center; }
}

/* Hamburger → X when open */
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ============================================================================
   HERO
   ============================================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4rem 0 3rem;
  background: linear-gradient(160deg, #EEF8F5 0%, #FBF7EF 55%, #FEF3EC 100%);
}

.hero-bg-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
}
.hero-bg-art svg {
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding-block: 1rem;
  }
}

.hero-eyebrow {
  display: inline-block;
  background: #E07856;
  color: #FBF7EF;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.hero h1 {
  color: #0E6E6E;
  margin-bottom: 1rem;
}

.hero-subhead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: #20303A;
  max-width: 48ch;
  line-height: 1.7;
}

/* Search card */
.hero-search-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 8px 32px rgba(14,110,110,0.12), 0 2px 8px rgba(32,48,58,0.06);
  border: 1.5px solid #D6F0EE;
}

.search-card-heading {
  font-size: 1.1rem;
  color: #0E6E6E;
  margin-bottom: 1rem;
}

.catalog-form { display: flex; flex-direction: column; gap: 1rem; }

.search-row {
  display: flex;
  gap: 0.5rem;
}
.search-row input[type="search"] {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 2px solid #C8E6E4;
  border-radius: 50px;
  font-family: inherit;
  font-size: 0.95rem;
  color: #20303A;
  background: #FBF7EF;
  min-height: 44px;
  transition: border-color 0.15s ease;
}
.search-row input[type="search"]:focus {
  outline: none;
  border-color: #0E6E6E;
  background: #fff;
}
.search-row input[type="search"]::placeholder { color: #7A9099; }

.search-btn {
  flex-shrink: 0;
  padding: 0.7rem 1.25rem;
  font-size: 0.95rem;
}

/* Filter chips */
.search-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filter-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #5A7480;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.filter-chip input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.filter-chip span {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.85rem;
  min-height: 36px;
  border: 2px solid #C8E6E4;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #20303A;
  background: #FBF7EF;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  cursor: pointer;
}
.filter-chip input:checked + span {
  background: #0E6E6E;
  border-color: #0E6E6E;
  color: #FBF7EF;
}
.filter-chip:hover span {
  border-color: #0E6E6E;
}
.filter-chip input:focus-visible + span {
  outline: 3px solid #E07856;
  outline-offset: 2px;
}

.search-hint-text {
  font-size: 0.82rem;
  color: #5A7480;
  margin-top: 0.25rem;
}
.search-hint-text a { font-weight: 600; }

/* ============================================================================
   STATS BAND
   ============================================================================ */
.stats-band {
  background: #0E6E6E;
  padding: 2.5rem 0;
}

.stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.75rem 2.5rem;
  flex: 1 1 140px;
}

.stat-number {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #FBF7EF;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.82rem;
  color: rgba(251,247,239,0.8);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  max-width: 16ch;
  text-align: center;
}

.stat-divider {
  width: 1.5px;
  height: 48px;
  background: rgba(251,247,239,0.25);
  align-self: center;
}
@media (max-width: 639px) {
  .stat-divider { display: none; }
  .stat-item { border-bottom: 1px solid rgba(251,247,239,0.15); }
  .stat-item:last-child { border-bottom: none; }
}

/* ============================================================================
   SECTION HEADER (shared)
   ============================================================================ */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-header h2 {
  margin-bottom: 0.75rem;
}
.section-subhead {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: #4A6270;
  max-width: 60ch;
  margin-inline: auto;
  line-height: 1.7;
}

/* ============================================================================
   PROGRAMS
   ============================================================================ */
.programs-section {
  padding: 5rem 0;
}

.programs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .programs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.program-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  border: 1.5px solid #E8E2D4;
  box-shadow: 0 3px 12px rgba(32,48,58,0.05);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.program-card:hover {
  box-shadow: 0 8px 28px rgba(14,110,110,0.14);
  transform: translateY(-3px);
}
.program-card h3 {
  margin: 1rem 0 0.6rem;
}
.program-card p {
  color: #4A6270;
  font-size: 0.92rem;
  flex: 1;
}

.card-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-icon-teal { background: #0E6E6E; }
.card-icon-coral { background: #E07856; }

/* ============================================================================
   EVENTS STRIP
   ============================================================================ */
.events-section {
  background: #F0EDDE;
  padding: 5rem 0;
}

.events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.events-header h2 { margin-bottom: 0; }

.events-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .events-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .events-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.event-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1.5px solid #E8E2D4;
  box-shadow: 0 2px 8px rgba(32,48,58,0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.event-card:hover {
  box-shadow: 0 6px 20px rgba(14,110,110,0.12);
  transform: translateY(-2px);
}

.event-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: #0E6E6E;
  color: #FBF7EF;
  border-radius: 12px;
  flex-shrink: 0;
}
.event-month {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
}
.event-day {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.event-branch {
  font-size: 0.78rem;
  font-weight: 700;
  color: #E07856;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}
.event-title {
  font-size: 0.98rem;
  margin-bottom: 0.4rem;
}
.event-desc {
  font-size: 0.87rem;
  color: #4A6270;
  flex: 1;
}

/* ============================================================================
   DIGITAL RESOURCES GRID
   ============================================================================ */
.digital-section {
  padding: 5rem 0;
  background: #FBF7EF;
}

.digital-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .digital-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .digital-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.digital-resource-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1.5px solid #E8E2D4;
  box-shadow: 0 2px 8px rgba(32,48,58,0.04);
  transition: box-shadow 0.2s ease;
}
.digital-resource-card:hover {
  box-shadow: 0 6px 18px rgba(14,110,110,0.11);
}

.dr-icon-wrap {
  flex-shrink: 0;
  border-radius: 12px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.digital-resource-card h3 {
  font-size: 0.98rem;
  margin-bottom: 0.35rem;
  color: #20303A;
}
.digital-resource-card p {
  font-size: 0.87rem;
  color: #4A6270;
  line-height: 1.55;
}

/* ============================================================================
   BRANCHES & HOURS
   ============================================================================ */
.branches-section {
  background: #EEF8F5;
  padding: 5rem 0;
}

.branches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .branches-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .branches-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.branch-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  border: 1.5px solid #C8E6E4;
  box-shadow: 0 3px 12px rgba(14,110,110,0.07);
  position: relative;
}

.branch-main {
  border-color: #0E6E6E;
  box-shadow: 0 4px 20px rgba(14,110,110,0.14);
}

.branch-badge {
  position: absolute;
  top: -12px;
  left: 1.5rem;
  background: #E07856;
  color: #FBF7EF;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
}

.branch-card h3 {
  color: #0E6E6E;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.branch-card address {
  font-size: 0.9rem;
  color: #4A6270;
  line-height: 1.65;
  margin-bottom: 1rem;
}
.branch-card address a {
  font-weight: 700;
}

/* Hours table */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}
.hours-table th {
  text-align: left;
  color: #5A7480;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.5rem 0.3rem 0;
  border-bottom: 1.5px solid #E8E2D4;
}
.hours-table td {
  padding: 0.35rem 0.5rem 0.35rem 0;
  color: #20303A;
  border-bottom: 1px solid #F0EDDE;
}
.hours-table td:last-child {
  text-align: right;
  color: #0E6E6E;
  font-weight: 600;
}
.hours-table tbody tr:last-child td { border-bottom: none; }

/* ============================================================================
   CONTACT / CARD APPLICATION
   ============================================================================ */
.contact-section {
  padding: 5rem 0;
  background: #FBF7EF;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

.contact-intro h2 {
  margin-bottom: 1rem;
  color: #0E6E6E;
}
.contact-intro p {
  color: #4A6270;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.contact-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.contact-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.93rem;
  color: #20303A;
  line-height: 1.5;
}
.contact-features svg { flex-shrink: 0; margin-top: 1px; }

/* Form */
.contact-form-wrap {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 2rem 1.75rem;
  border: 1.5px solid #E8E2D4;
  box-shadow: 0 4px 20px rgba(14,110,110,0.08);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.87rem;
  font-weight: 700;
  color: #20303A;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.65rem 0.9rem;
  border: 2px solid #C8E6E4;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.93rem;
  color: #20303A;
  background: #FBF7EF;
  min-height: 44px;
  transition: border-color 0.15s ease;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0E6E6E;
  background: #fff;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230E6E6E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}

.form-submit-btn {
  width: 100%;
  margin-top: 0.25rem;
  font-size: 1rem;
}

/* ============================================================================
   FOOTER
   ============================================================================ */
.site-footer {
  background: #20303A;
  color: rgba(251,247,239,0.85);
  padding-top: 4rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1.5px solid rgba(251,247,239,0.1);
}

@media (min-width: 640px) {
  .footer-inner {
    grid-template-columns: 1.4fr 2fr;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #FBF7EF;
  margin-bottom: 0.75rem;
  width: fit-content;
}
.footer-brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FBF7EF;
}
.footer-tagline {
  font-size: 0.9rem;
  color: rgba(251,247,239,0.75);
  margin-bottom: 1rem;
  max-width: 32ch;
  line-height: 1.6;
}
.footer-address {
  font-size: 0.87rem;
  line-height: 1.7;
  color: rgba(251,247,239,0.7);
}
.footer-address a {
  color: #88D4C8;
  font-weight: 600;
  text-underline-offset: 3px;
}
.footer-address a:hover { color: #FBF7EF; }

/* Footer nav */
.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  flex-wrap: wrap;
}
@media (max-width: 639px) {
  .footer-nav {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}
@media (max-width: 360px) {
  .footer-nav {
    grid-template-columns: 1fr;
  }
}

.footer-nav-col h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #88D4C8;
  margin-bottom: 0.75rem;
}
.footer-nav-col ul { list-style: none; }
.footer-nav-col li + li { margin-top: 0.5rem; }
.footer-nav-col a {
  font-size: 0.9rem;
  color: rgba(251,247,239,0.8);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-nav-col a:hover { color: #FBF7EF; }

/* Footer bottom */
.footer-bottom {
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-inline: 1.25rem;
  max-width: 1180px;
  margin-inline: auto;
}
.footer-bottom p {
  font-size: 0.78rem;
  color: rgba(251,247,239,0.5);
}
.footer-bottom a {
  color: rgba(251,247,239,0.6);
  font-size: 0.78rem;
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-bottom a:hover { color: rgba(251,247,239,0.9); }
.footer-bottom p:last-child {
  display: flex;
  gap: 1rem;
}

/* ============================================================================
   RESPONSIVE 320px CHECK
   ============================================================================ */
@media (max-width: 360px) {
  .container {
    padding-inline: 1rem;
  }
  .search-row {
    flex-direction: column;
  }
  .search-btn { width: 100%; }
  .hero-search-card { padding: 1.25rem 1rem; }
  .contact-form-wrap { padding: 1.25rem 1rem; }
  .stat-item { padding: 0.5rem 1rem; }
}


/* ============================================================================
   2026-11 POLISH LAYER
   Fonts: Fraunces (headings) + Atkinson Hyperlegible (body), both SIL OFL,
   self-hosted in /templates/public-library/fonts/.
   Contrast (measured, WCAG relative luminance):
     #FFFFFF on #B8452A 5.35:1 (buttons)   #B8452A on #FFFFFF 5.35:1 (small caps)
     #FBF7EF on #0B5555 7.9:1 (hero text)  #E3F1EE on #0E6E6E 5.20:1 (stat labels)
   ============================================================================ */
@font-face{font-family:"Fraunces";src:url("/templates/public-library/fonts/fraunces-latin-wght-normal.woff2") format("woff2");font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:"Fraunces";src:url("/templates/public-library/fonts/fraunces-latin-wght-italic.woff2") format("woff2");font-weight:100 900;font-style:italic;font-display:swap}
@font-face{font-family:"Atkinson Hyperlegible";src:url("/templates/public-library/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Atkinson Hyperlegible";src:url("/templates/public-library/fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"Atkinson Hyperlegible";src:url("/templates/public-library/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}

:root{
  --lib-serif:"Fraunces","Iowan Old Style",Georgia,serif;
  --lib-sans:"Atkinson Hyperlegible",Verdana,"Segoe UI",sans-serif;
  --lib-deep:#0B5555;
  --lib-terra:#B8452A;
  --lib-gold:#F2C14E;
}
body{font-family:var(--lib-sans);font-size:1.0625rem;line-height:1.7}
h1,h2,h3,h4,.logo-name,.stat-number,.footer-brand-name,.event-title{font-family:var(--lib-serif);text-wrap:balance}
h1{font-weight:650;letter-spacing:-.015em;line-height:1.08}
h2{font-weight:650;letter-spacing:-.01em}
h3{font-weight:650}
.btn,.primary-nav a,.card-link,.filter-chip span,.stat-label,.hero-eyebrow,.event-branch,.event-month,.footer-nav-col h3{font-family:var(--lib-sans)}

/* header */
.site-header{background:#FBF7EF;border-bottom:1px solid #E8E2D4;box-shadow:none}
.logo-name{font-size:1.3rem;color:var(--lib-deep);letter-spacing:-.01em}
.primary-nav a{font-size:.95rem;font-weight:700}
.nav-cta{background:var(--lib-terra)!important;color:#fff!important}
.nav-cta:hover{background:#9C3A22!important}
:focus-visible{outline-color:#0055CC}

/* hero: deep teal with a shelf of book spines */
.hero{background:radial-gradient(120% 90% at 85% 0%,#12807F 0%,var(--lib-deep) 55%,#094646 100%);padding:4.5rem 0 11rem}
.hero-bg-art{inset:auto 0 0 0;height:150px}
.hero-bg-art svg{height:100%}
.hero h1{color:#FBF7EF;font-size:clamp(2.4rem,5.4vw,4rem)}
.hero-subhead{color:#E3F1EE;font-size:1.2rem}
.hero-eyebrow{background:var(--lib-gold);color:#20303A;letter-spacing:.08em}
.hero-search-card{border:0;box-shadow:0 24px 48px rgba(3,30,30,.35)}
.search-card-heading{font-family:var(--lib-serif);font-size:1.35rem}
.search-hint-text{color:#44606C}
.search-row input[type="search"]::placeholder{color:#5A7480}

/* stats band overlaps the shelf */
.stats-band{background:#07403F;position:relative}
.stat-number{font-weight:650;color:#fff}
.stat-label{color:#E3F1EE}

/* sections */
.programs-section{background:#FBF7EF}
.program-card{border:1px solid #E8E2D4;box-shadow:0 1px 0 rgba(32,48,58,.04)}
.program-card h3{font-size:1.25rem}
.card-icon-coral{background:var(--lib-terra)}
.events-section{background:#F2EEDF}
.event-branch{color:var(--lib-terra);letter-spacing:.06em}
.event-date-badge{background:var(--lib-deep)}
.event-card{border:1px solid #E8E2D4}
.card-link{color:#0B5555}
.digital-resource-card{border:1px solid #E8E2D4}
.branch-card{border:1px solid #E8E2D4}
.branch-badge{background:var(--lib-terra);color:#fff}
.section-subhead{color:#44606C}
.contact-section{background:#F2EEDF}
.form-submit-btn{background:var(--lib-deep)}
.footer-brand-name{font-size:1.25rem}
.site-footer{background:#102B2B}
.footer-tagline,.footer-address,.footer-nav-col a{color:rgba(251,247,239,.88)}

@media (max-width:899px){.hero{padding:3rem 0 9rem}}

/* ============================================================================
   ROUND 2 (E2a): sample-form notes, visible field errors, focus rings,
   event year. Palette: teal #0B5555, error red #A12622, cream #FBF7EF.
   ============================================================================ */
.form-note {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #0B5555;
  background: #E6F3F1;
  border-left: 4px solid #0B5555;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
}
.field-error {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  color: #A12622;
}
.field-error[hidden], .form-success[hidden] { display: none; }
.search-row input[type="search"][aria-invalid="true"],
.form-group input[aria-invalid="true"],
.form-group select[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
  border-color: #A12622;
  border-width: 3px;
  background: #FFF6F5;
}
/* Keep a visible focus ring on form controls (border color alone is too faint) */
.search-row input[type="search"]:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 3px solid #0055CC;
  outline-offset: 2px;
}
.form-success {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: #E6F3F1;
  border: 2px solid #0B5555;
  border-radius: 12px;
  color: #20303A;
}
.form-success:focus { outline: 3px solid #0055CC; outline-offset: 2px; }
.form-success-title { font-size: 1.1rem; margin: 0 0 0.3rem; color: #0B5555; }
.form-success p { margin: 0; }
.event-date-badge { width: 56px; height: auto; min-height: 56px; padding: 0.3rem 0; gap: 2px; }
.event-year { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.04em; line-height: 1; }
