/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  --navy:    #111111;
  --navy-md: #333333;
  --gold:    #444444;
  --gold-lt: #666666;
  --cream:   #ffffff;
  --white:   #ffffff;
  --gray-50: #f9fafb;
  --gray-100:#f1f3f6;
  --gray-300:#d0d5dd;
  --gray-500:#6b7280;
  --gray-700:#374151;
  --gray-900:#111827;
  --green:   #15803d;
  --red:     #b91c1c;
  --radius:  6px;
  --shadow:  0 1px 4px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--white);
  color: var(--gray-900);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: #111; text-decoration: underline; }
a:hover { color: #555; }

/* ── Header ────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  color: var(--gray-900);
  border-bottom: 1px solid var(--gray-300);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  line-height: 1.2;
  text-decoration: none;
}
.brand-logo {
  height: 44px;
  width: 44px;
  object-fit: cover;
  object-position: center;
  display: block;
  flex-shrink: 0;
  border-radius: 50%;
}
.brand-sub {
  font-size: 0.7rem;
  color: var(--gray-500);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  color: var(--gray-700);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-link:hover { color: #000; background: var(--gray-100); }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: auto;
  right: 50px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 0.25rem;
  min-width: 240px;
  z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}
.nav-dropdown-menu li { margin: 0; }
.nav-dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--gray-700);
  text-decoration: none;
  font-size: 0.875rem;
  white-space: nowrap;
}
.nav-dropdown-item:hover { background: var(--gray-100); color: #000; }
.nav-form { display: inline; }
.btn-link {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  color: var(--gray-500);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.btn-link:hover { color: #000; background: var(--gray-100); }

/* ── Main ──────────────────────────────────────────────────────────────── */
.site-main { flex: 1; }
.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--gray-500);
  font-size: 0.8rem;
  border-top: 1px solid var(--gray-300);
  margin-top: 3rem;
  background: var(--white);
}
.site-footer .social-links {
  justify-content: center;
  margin-bottom: 0.75rem;
}

.social-links {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
  padding-left: 0.65rem;
  border-left: 1px solid var(--gray-300);
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--gray-600);
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.social-link:hover {
  color: var(--gray-900);
  background: var(--gray-100);
}
.header-social--bar {
  display: none;
  align-items: center;
}
.header-social--bar .social-links {
  margin-left: 0;
  padding-left: 0;
  border-left: none;
}
.header-controls {
  display: none;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
  margin-left: auto;
}

/* ── Flash ─────────────────────────────────────────────────────────────── */
.flash {
  max-width: 1200px;
  margin: 1rem auto 0;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
}
.flash--success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.flash--error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Auth pages ────────────────────────────────────────────────────────── */
.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 2rem 1rem;
}
.auth-wrap--donate {
  min-height: auto;
  padding: 2.5rem 1rem;
}
.auth-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  padding: 2.5rem;
  width: 100%;
  max-width: 505px;
  box-shadow: var(--shadow);
}

/* Wide variant for the register page (holds two columns) */
.auth-wrap--wide { align-items: flex-start; padding-top: 3rem; }
.register-card   { max-width: 860px; }

/* Two-column grid: [fields] [donate]
   On wide screens the submit button sits below the fields column.
   On narrow screens the order is fields → donate → submit.        */
.register-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "fields donate"
    "submit donate";
  gap: 1.5rem 2rem;
  align-items: start;
}
.register-header { margin-bottom: 1.5rem; }
.register-fields { grid-area: fields; }
.register-donate { grid-area: donate; margin-top: 0; }
.register-submit { grid-area: submit; }

@media (max-width: 680px) {
  .register-card  { max-width: 420px; }
  .register-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "fields"
      "donate"
      "submit";
  }
}
.auth-card--center { text-align: center; }
.donate-page-form .field label { text-align: center; }
.auth-logo {
  display: block;
  margin: 0 auto 0;
  height: 250px;
  width: auto;
}
.auth-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.auth-subtitle {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}
.auth-alt {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-500);
}
.pending-icon { font-size: 3rem; margin-bottom: 1rem; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
}
.field-hint { font-weight: 400; color: var(--gray-500); }
.field input, .field textarea, .inline-input {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.field textarea {
  resize: vertical;
  min-height: 8rem;
  line-height: 1.5;
}
.field input:focus, .field textarea:focus, .inline-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,35,64,0.12);
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn--primary:hover { background: var(--navy-md); border-color: var(--navy-md); color: var(--white); }
.btn--outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--success {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn--success:hover { opacity: 0.85; color: var(--white); }
.btn--danger {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn--danger:hover { opacity: 0.85; color: var(--white); }
.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--gray-300);
  font-weight: 500;
}
.btn--ghost:hover { background: var(--gray-100); }
.btn--full { width: 100%; }
.btn--sm { padding: 0.3rem 0.65rem; font-size: 0.8rem; }

/* ── Page header ───────────────────────────────────────────────────────── */
.page-header {
  background: var(--white);
  color: var(--gray-900);
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--gray-300);
}
.page-header--library {
  position: relative;
  min-height: 190px;
  max-width: 1036px;
  margin: 0 auto;
}
.library-header-logo {
  position: absolute;
  left: max(1.5rem, calc((100% - 1036px) / 2 + 1.5rem));
  top: 21px;
  width: 180px;
  height: 180px;
  object-fit: contain;
}
.page-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 2.25rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 0.4rem;
}
.page-desc {
  color: var(--gray-500);
  font-size: 0.95rem;
  max-width: 600px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .page-header--library {
    min-height: 0;
  }
  .library-header-logo {
    position: static;
    display: block;
    width: 120px;
    height: 120px;
    margin: -0.5rem auto 0.75rem;
  }
}

/* ── Content wrap ──────────────────────────────────────────────────────── */
.content-wrap {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.content-wrap--narrow {
  max-width: 680px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* ── Library ───────────────────────────────────────────────────────────── */
.library-wrap {
  max-width: 1200px;
  margin: .75rem auto;
  padding: 0 1.5rem;
}
.year-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--gray-300);
  padding-bottom: 0.75rem;
}
.year-tab {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray-700);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.year-tab:hover {
  border-color: var(--navy);
  color: var(--navy);
}
.year-tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.year-tab--complete {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}
.year-tab--issues {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}
.year-tab--complete.active,
.year-tab--issues.active {
  box-shadow: none;
}
.year-tab--complete.active {
  background: #166534;
  border-color: #166534;
  color: var(--white);
}
.year-tab--issues.active {
  background: #991b1b;
  border-color: #991b1b;
  color: var(--white);
}
.year-tab-panel {
  display: none;
}
.year-tab-panel.active {
  display: block;
}
.year-section { margin-bottom: 2.5rem; }
.year-nav {
  display: grid;
  grid-template-columns: 2.5rem auto 2.5rem;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.year-nav--solo {
  grid-template-columns: auto;
}
.year-heading {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.5rem;
  color: var(--navy);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.4rem;
  margin: 0;
  text-align: center;
}
.year-nav-button {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.year-nav-button:hover:not(:disabled) {
  border-color: var(--navy);
  background: var(--gray-50);
}
.year-nav-button:disabled {
  cursor: default;
  opacity: 0.25;
}
.year-layout {
  display: block;
}
.year-layout--with-inventory {
  display: grid;
  grid-template-columns: minmax(320px, 480px) minmax(520px, 600px);
  justify-content: center;
  align-items: start;
  gap: 1.5rem;
}
.year-files-column,
.year-inventory-column {
  min-width: 0;
}
.year-file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pdf-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.4rem;
  align-items: center;
}
.year-file-list .pdf-card {
  width: 100%;
}
.pdf-file-link {
  min-width: 0;
}
.pdf-rename-toggle {
  color: var(--navy);
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.25rem;
}
.pdf-rename-toggle:hover {
  background: transparent;
  color: var(--gold);
  text-decoration: underline;
}
.pdf-rename-form {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.pdf-rename-form[hidden] {
  display: none;
}
.pdf-rename-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.4rem 0.5rem;
  font: inherit;
  font-size: 0.85rem;
  color: var(--gray-900);
  background: var(--white);
}
.pdf-rename-form input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,35,64,0.12);
}
.pdf-delete-form {
  margin: 0;
}
.pdf-delete-button {
  color: var(--red);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.25rem;
}
.pdf-delete-button:hover {
  background: transparent;
  color: var(--red);
  text-decoration: underline;
}
.pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}
.pdf-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.3rem .4rem;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--gray-900);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.pdf-card:hover {
  border-color: #111;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  transform: translateY(-1px);
  color: #111;
}
.pdf-card__icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  color: var(--gold);
}
.pdf-card__icon svg { width: 100%; height: 100%; }
.pdf-card__body { flex: 1; min-width: 0; }
.pdf-card__name {
  font-size: 0.9rem;
  font-weight: 500;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pdf-card__arrow { color: var(--gray-300); font-size: 1rem; flex-shrink: 0; }
.pdf-card:hover .pdf-card__arrow { color: var(--gold); }
.pdf-upload-row {
  display: flex;
  margin-top: 0.75rem;
}
.pdf-upload-card {
  cursor: default;
  width: 100%;
}
.pdf-upload-card:hover {
  transform: none;
}
.pdf-upload-card .btn {
  align-self: flex-end;
}
.pdf-upload-card input[type=file] {
  width: 460px;
  max-width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.4rem 0.5rem;
  font: inherit;
  font-size: 0.8rem;
  background: var(--white);
}

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--gray-100);
}

/* ── Stats ─────────────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: var(--shadow);
}
.stat-card--alert { border-left: 4px solid var(--gold); }
.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: 'EB Garamond', Georgia, serif;
  color: var(--navy);
  line-height: 1;
}
.stat-label { color: var(--gray-500); font-size: 0.85rem; }
.stat-link { font-size: 0.85rem; font-weight: 600; color: var(--gold); text-decoration: none; margin-top: 0.5rem; }
.stat-link:hover { color: var(--navy); }

/* ── Tables ────────────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  background: var(--gray-50);
  color: var(--gray-700);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--gray-300);
}
.data-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--gray-50); }
.row--inactive { opacity: 0.5; }
.text-muted { color: var(--gray-500); }
.text-sm { font-size: 0.8rem; }
.text-center { text-align: center; }

/* ── Issue inventory ───────────────────────────────────────────────────── */
.inventory-card {
  padding: 0;
  overflow: hidden;
}
.inventory-year-panel {
  margin: 1rem auto 0;
  width: min(600px, 100%);
  border: 1px solid #eab308;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff7bf;
  box-shadow: 0 4px 14px rgba(133, 77, 14, 0.12);
}
.year-inventory-column .inventory-year-panel {
  margin-top: 0;
  width: 100%;
}
.inventory-meta {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
}
.inventory-status-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(234, 179, 8, 0.35);
  color: #854d0e;
  font-size: 0.75rem;
  font-weight: 600;
}
.inventory-status-select {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.35rem 0.5rem;
  font: inherit;
  font-size: 0.8rem;
  color: var(--gray-900);
  background: var(--white);
}
.inventory-status-select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,35,64,0.12);
}
.inventory-table-wrap {
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.5);
}
.inventory-table {
  width: max-content;
  min-width: 0;
  table-layout: fixed;
}
.inventory-table th,
.inventory-table td {
  vertical-align: top;
}
.inventory-table th {
  padding: 0.45rem 0.5rem;
}
.inventory-table td {
  padding: 0.45rem 0.5rem;
}
.inventory-year {
  white-space: nowrap;
  font-weight: 500;
  color: var(--gray-700);
}
.inventory-issue-heading {
  width: 4.35rem;
  min-width: 4.35rem;
  max-width: 4.35rem;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
  white-space: nowrap;
}
.inventory-marker-cell {
  width: 4.35rem;
  min-width: 4.35rem;
  max-width: 4.35rem;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}
.inventory-marker-input {
  display: block;
  width: 100%;
  margin: 0;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  padding: 0.35rem 0;
  font: inherit;
  font-size: 1rem;
  text-align: center;
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.inventory-marker-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,35,64,0.12);
}
.inventory-input--dirty {
  background: #fff7ed;
}
.inventory-input--error {
  border-color: var(--red);
}
.inventory-notes {
  min-width: 360px;
  width: 42%;
}
.inventory-notes--full {
  width: auto;
  min-width: 0;
  padding: 1rem;
  border-top: 1px solid rgba(234, 179, 8, 0.35);
  background: #fff7bf;
}
.diary-panel .inventory-notes--full {
  border-top: none;
}
.diary-title {
  margin: 0 0 0.75rem;
  color: #854d0e;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.25rem;
}
.inventory-upload {
  min-width: 420px;
  width: 39%;
}
.inventory-upload-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.inventory-upload-form input[type=file],
.inventory-upload-form textarea,
.inventory-upload-form select {
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.45rem 0.55rem;
  font: inherit;
  font-size: 0.8rem;
  color: var(--gray-900);
  background: var(--white);
}
.inventory-upload-form textarea {
  min-height: 4.5rem;
  resize: vertical;
}
.inventory-upload-form input[type=file]:focus,
.inventory-upload-form textarea:focus,
.inventory-upload-form select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,35,64,0.12);
}
.inventory-note-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}
.inventory-note {
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: var(--radius);
  background: #fffbea;
}
.inventory-note--seed {
  border-color: rgba(234, 179, 8, 0.55);
  background: #fef3c7;
}
.inventory-note--closed {
  opacity: 0.55;
}
.inventory-note__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  color: var(--gray-500);
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}
.inventory-note__meta strong {
  color: var(--gray-900);
}
.inventory-note-closed-control {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  color: var(--gray-700);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
}
.inventory-note-closed-control input {
  cursor: pointer;
}
.inventory-note-edit-toggle {
  padding: 0;
  color: var(--navy);
  font-size: 0.9rem;
  line-height: 1;
}
.inventory-note-edit-toggle:hover {
  background: transparent;
  color: var(--gold);
  text-decoration: underline;
}
.inventory-note-text {
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 0;
  white-space: pre-wrap;
}
.inventory-note-replies {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.65rem;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(234, 179, 8, 0.35);
}
.inventory-note-reply {
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.55);
}
.inventory-reply-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.65rem;
}
.inventory-reply-input {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.45rem 0.55rem;
  font: inherit;
  font-size: 0.8rem;
  color: var(--gray-900);
  resize: vertical;
}
.inventory-reply-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,35,64,0.12);
}
.inventory-reply-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.inventory-author-picker {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  color: var(--gray-500);
  font-size: 0.75rem;
  font-weight: 600;
}
.inventory-author-select {
  width: 320px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.45rem 0.55rem;
  font: inherit;
  font-size: 0.8rem;
  color: var(--gray-900);
  background: var(--white);
}
.inventory-author-name {
  color: var(--gray-900);
  font-size: 0.85rem;
  font-weight: 500;
}
.inventory-author-select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,35,64,0.12);
}
.inventory-note-edit,
.inventory-note-input,
.diary-note-input {
  width: 100%;
  min-height: 3.5rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.5rem 0.6rem;
  font: inherit;
  font-size: 0.85rem;
  color: var(--gray-900);
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.inventory-note-edit:focus,
.inventory-note-input:focus,
.diary-note-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,35,64,0.12);
}
.inventory-note-edit {
  height: 150px;
  min-height: 150px;
}
.inventory-note-status {
  display: block;
  min-height: 1rem;
  margin-top: 0.3rem;
}

@media (max-width: 980px) {
  .year-layout--with-inventory {
    grid-template-columns: 1fr;
  }
}

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}
.badge--approved { background: #dcfce7; color: #166534; }
.badge--pending  { background: #fef9c3; color: #854d0e; }
.badge--denied   { background: #fee2e2; color: #991b1b; }
.badge--admin     { background: #ede9fe; color: #5b21b6; }
.badge--developer { background: #111; color: #fff; }
.badge--user     { background: var(--gray-100); color: var(--gray-700); }
.badge--unauthorized { background: #fee2e2; color: #991b1b; }

/* ── Filter bar ────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-700);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.filter-btn:hover { border-color: var(--navy); color: var(--navy); }
.filter-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ── Action row ────────────────────────────────────────────────────────── */
.action-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Rename form ───────────────────────────────────────────────────────── */
.rename-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.rename-form .inline-input {
  font-size: 0.875rem;
  padding: 0.35rem 0.6rem;
  width: auto;
  flex: 1;
}

/* ── Info list ─────────────────────────────────────────────────────────── */
.info-list {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0.6rem 1rem;
}
.info-list dt {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
}
.info-list dd { display: flex; align-items: center; }

/* ── Search ────────────────────────────────────────────────────────────── */
.search-form { margin-top: 1.25rem; }
.search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 580px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  padding: 0.35rem 0.35rem 0.35rem 1rem;
}
.search-icon { width: 1.1rem; height: 1.1rem; color: var(--gray-500); flex-shrink: 0; }
.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--gray-900);
  font: inherit;
  font-size: 0.95rem;
  min-width: 0;
}
.search-input::placeholder { color: var(--gray-500); }
.search-clear {
  color: var(--gray-500);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0 0.25rem;
  line-height: 1;
}
.search-clear:hover { color: var(--navy); }
.btn--gold {
  background: #111;
  color: #fff;
  border-color: #111;
  border-radius: 999px;
  font-weight: 700;
  padding: 0.45rem 1.1rem;
}
.btn--gold:hover { background: #333; border-color: #333; color: #fff; }

.search-meta { margin-bottom: 1.25rem; }
.search-count { color: var(--gray-700); font-size: 0.95rem; }
.search-none { color: var(--gray-700); font-size: 0.95rem; margin-bottom: 0.5rem; }
.search-hint { color: var(--gray-500); font-size: 0.85rem; }

/* ── Search results ────────────────────────────────────────────────────── */
.result-list { display: flex; flex-direction: column; gap: 0.75rem; }
.result-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--gray-900);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.result-card:hover {
  border-color: #111;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  color: #111;
}
.result-card__icon { flex-shrink: 0; width: 1.75rem; height: 1.75rem; color: var(--gold); margin-top: 0.1rem; }
.result-card__icon svg { width: 100%; height: 100%; }
.result-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.result-card__name { font-weight: 600; font-size: 1rem; }
.result-card__snippet {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.result-card__snippet--none { font-style: italic; }
.result-card__year {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  align-self: flex-start;
}

/* ── PDF card description ──────────────────────────────────────────────── */
.pdf-card__desc {
  font-size: 0.75rem;
  color: var(--gray-500);
  display: block;
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Admin edit form ───────────────────────────────────────────────────── */
.edit-form { display: flex; flex-direction: column; gap: 0.4rem; }
.inline-textarea {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  font: inherit;
  font-size: 0.8rem;
  color: var(--gray-900);
  background: var(--white);
  resize: vertical;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.inline-textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,35,64,0.12);
}

/* ── Member checklist ──────────────────────────────────────────────────── */
.member-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
}
.member-check-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  border-radius: calc(var(--radius) - 1px);
  transition: background 0.1s;
}
.member-check-row:hover { background: var(--gray-50); }
.member-check-row input[type=checkbox] { width: 1rem; height: 1rem; flex-shrink: 0; accent-color: var(--navy); }
.member-check-name { font-weight: 500; font-size: 0.9rem; flex-shrink: 0; }
.member-check-email { color: var(--gray-500); font-size: 0.82rem; flex: 1; }

/* ── Donate box ────────────────────────────────────────────────────────── */
/* ── Inline field errors ───────────────────────────────────────────────── */
.field-error {
  display: none;
  font-size: 0.8rem;
  color: #c0392b;
  margin-top: 0.25rem;
  font-weight: 500;
}

/* ── Donate box ────────────────────────────────────────────────────────── */
.donate-box {
  padding: 1.5rem;
  background: #f0f7f4;
  border: 1px solid #b2d8c8;
  border-radius: var(--radius);
  text-align: center;
}
.donate-box__icon { font-size: 1.6rem; color: #c0392b; margin-bottom: 0.5rem; }
.donate-box__title { font-size: 1.1rem; color: var(--navy); margin: 0 0 0.5rem; }
.donate-box__body {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0 0 1.25rem;
}
.donate-form { text-align: left; }
.donate-amount-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.donate-amount-label { font-size: 0.88rem; font-weight: 600; color: var(--gray-700); white-space: nowrap; }
.donate-amount-input-wrap { position: relative; flex: 1; }
.donate-amount-symbol {
  position: absolute; left: 0.6rem; top: 50%; transform: translateY(-50%);
  font-weight: 700; color: var(--gray-500); pointer-events: none;
}
.donate-amount-input {
  width: 100%; padding: 0.5rem 0.6rem 0.5rem 1.4rem;
  border: 1px solid var(--gray-300); border-radius: var(--radius);
  font: inherit; font-size: 1rem; color: var(--gray-900);
}
.donate-amount-input:focus {
  outline: none; border-color: #0070ba; box-shadow: 0 0 0 3px rgba(0,112,186,0.15);
}
.btn--paypal {
  background: #0070ba; color: #fff; font-weight: 700;
  border: none; border-radius: var(--radius); padding: 0.7rem 1.25rem;
  cursor: pointer; font-size: 0.95rem; transition: background 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 0.35rem;
}
.btn--paypal:hover { background: #005ea6; }
.donate-thanks {
  margin-top: 1rem; font-size: 0.88rem; color: #1a7a4a;
  font-weight: 600; text-align: center;
}

/* ── Donate page ───────────────────────────────────────────────────────── */
.donate-page-form { text-align: left; }
.donate-suggestions {
  display: flex; gap: 0.5rem; justify-content: center;
  flex-wrap: wrap; margin-top: 0.75rem;
}
.suggest-btn {
  padding: 0.35rem 0.85rem; border: 2px solid var(--gray-300);
  border-radius: 999px; background: #fff; cursor: pointer;
  font: inherit; font-size: 0.88rem; font-weight: 600;
  color: var(--gray-700); transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.suggest-btn:hover { border-color: #111; color: #111; }
.suggest-btn--active { background: #111; color: #fff; border-color: #111; }

/* ── Nav donate button ─────────────────────────────────────────────────── */
.nav-donate-btn {
  background: #111; color: #fff; border: none;
  border-radius: 999px; font-weight: 600;
  padding: 0.3rem 0.85rem; font-size: 0.82rem;
  cursor: pointer; transition: background 0.15s;
}
.nav-donate-btn:hover { background: #333; }
.btn--outline-dark {
  background: transparent; color: var(--gray-900);
  border: 1.5px solid var(--gray-900); border-radius: 999px;
  font-weight: 600; padding: 0.3rem 0.85rem; font-size: 0.82rem;
  cursor: pointer; transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.btn--outline-dark:hover { background: var(--gray-900); color: #fff; }

/* ── Invite bar ────────────────────────────────────────────────────────── */
.invite-bar { margin-bottom: 1rem; }
.invite-inline { margin-top: 0.6rem; }
.invite-fields {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  padding: 0.75rem 1rem;
  background: var(--gray-50); border: 1px solid var(--gray-300);
  border-radius: var(--radius);
}
.invite-input {
  padding: 0.4rem 0.75rem; border: 1px solid var(--gray-300);
  border-radius: var(--radius); font: inherit; font-size: 0.88rem;
  flex: 1; min-width: 160px;
}
.invite-input:focus { outline: none; border-color: #111; box-shadow: 0 0 0 2px rgba(0,0,0,0.1); }

/* ── Inline name editor ────────────────────────────────────────────────── */
.name-cell { display: flex; align-items: center; gap: 0.4rem; }
.name-edit-btn {
  background: none; border: none; cursor: pointer;
  color: var(--gray-500); font-size: 0.85rem; padding: 0 0.2rem;
  opacity: 0; transition: opacity 0.15s;
}
.name-cell:hover .name-edit-btn { opacity: 1; }
.name-edit-form { display: flex; align-items: center; gap: 0.25rem; }
.name-edit-input {
  padding: 0.2rem 0.4rem; border: 1px solid var(--gray-300);
  border-radius: var(--radius); font: inherit; font-size: 0.9rem;
  width: 140px;
}
.name-edit-input:focus { outline: none; border-color: #111; box-shadow: 0 0 0 2px rgba(0,0,0,0.1); }
.name-save-btn, .name-cancel-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1rem; padding: 0.1rem 0.25rem; border-radius: 3px;
}
.name-save-btn { color: var(--green); }
.name-save-btn:hover { background: #dcfce7; }
.name-cancel-btn { color: var(--red); }
.name-cancel-btn:hover { background: #fee2e2; }

/* ── User access editor ────────────────────────────────────────────────── */
.action-col { display: flex; flex-direction: column; gap: 0.35rem; }
.access-inline-form {
  margin-top: 0.25rem;
  padding: 0.75rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  min-width: 240px;
}
.access-type-row { display: flex; gap: 1rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.access-radio { display: flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; cursor: pointer; }
.access-radio input { accent-color: #111; }
.year-picker-wrap { margin-bottom: 0.4rem; }
.year-chips {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  margin-bottom: 0.4rem; min-height: 1rem;
}
.year-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: #111; color: #fff;
  font-size: 0.8rem; font-weight: 600;
  padding: 0.2rem 0.5rem; border-radius: 999px;
}
.chip-remove {
  background: none; border: none; color: #fff;
  cursor: pointer; font-size: 0.9rem; line-height: 1;
  padding: 0; margin: 0; opacity: 0.7;
}
.chip-remove:hover { opacity: 1; }
.year-typeahead-wrap { position: relative; }
.year-typeahead {
  width: 100%; padding: 0.35rem 0.6rem;
  border: 1px solid var(--gray-300); border-radius: var(--radius);
  font: inherit; font-size: 0.85rem;
}
.year-typeahead:focus { outline: none; border-color: #111; box-shadow: 0 0 0 2px rgba(0,0,0,0.1); }
.year-dropdown {
  display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
  background: #fff; border: 1px solid var(--gray-300);
  border-radius: var(--radius); list-style: none;
  margin: 2px 0 0; padding: 0.25rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-height: 180px; overflow-y: auto;
}
.year-dropdown li {
  padding: 0.35rem 0.75rem; cursor: pointer; font-size: 0.88rem;
}
.year-dropdown li:hover { background: var(--gray-100); }
.access-years-label { font-size: 0.82rem; color: #333; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .header-inner { padding: 0 1rem; }
  .pdf-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .data-table { font-size: 0.8rem; }
  .data-table th, .data-table td { padding: 0.5rem; }
  .rename-form { flex-direction: column; align-items: stretch; }
}

/* ── Public site nav updates ───────────────────────────────────────────── */
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111;
}
.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.nav-toggle-label {
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.55rem;
  z-index: 60;
  flex-shrink: 0;
  min-width: 40px;
  min-height: 40px;
  box-sizing: border-box;
  color: #111;
}
.nav-toggle-icon {
  display: block;
  width: 22px;
  height: 16px;
  fill: currentColor;
}
.nav-toggle-bar {
  transform-origin: center;
  transition: transform 0.2s, opacity 0.2s;
}
.header-inner:has(.nav-toggle:checked) .nav-toggle-bar--1 {
  transform: translateY(7px) rotate(45deg);
}
.header-inner:has(.nav-toggle:checked) .nav-toggle-bar--2 {
  opacity: 0;
}
.header-inner:has(.nav-toggle:checked) .nav-toggle-bar--3 {
  transform: translateY(-7px) rotate(-45deg);
}
@media (max-width: 1120px) {
  .header-controls { display: flex; }
  .nav-toggle-label { display: flex; }
  .header-social--bar { display: flex; }
  .header-social--nav { display: none; }
  .hero h1 { font-size: clamp(1.4rem, 6vw, 2.4rem); }
  .hero .tagline { font-size: clamp(0.85rem, 2.5vw, 1.15rem); }
  .hero-break { display: inline; }
  .tagline-break { display: none; }
  .hero-logo { height: 220px; width: 220px; }
  .header-inner {
    gap: 0.5rem;
    padding: 0 1rem;
    position: relative;
  }
  .site-brand {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }
  .brand-text {
    min-width: 0;
    overflow: hidden;
  }
  /* Long club name forces controls off-screen on tablets */
  .brand-sub {
    display: none;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    right: 1rem;
    left: auto;
    width: fit-content;
    max-width: calc(100vw - 2rem);
    background: #fff;
    border: 1px solid var(--gray-300);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    box-shadow: var(--shadow);
    z-index: 55;
  }
  .header-inner:has(.nav-toggle:checked) .site-nav,
  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }
}

/* ── Public site styles ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #3d3d3d 100%);
  color: #fff;
  padding: 5rem 1.5rem;
  text-align: center;
}
.hero-inner {
  max-width: 900px;
  margin: 0 auto;
}
.hero-logo {
  height: 400px;
  width: 400px;
  max-width: 90vw;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}
.hero-break {
  display: none;
}
.hero h1 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(1.6rem, 5vw, 3.5rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.hero .tagline {
  font-size: 1.15rem;
  color: #fff;
  max-width: 680px;
  margin: 0 auto 2rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.hero-actions .btn {
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
}
.hero-actions .btn--outline {
  border-color: #fff;
  color: #fff;
}
.hero-actions .btn--outline:hover {
  background: #fff;
  color: #111;
}
.section {
  padding: 4rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}
.section--alt {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-300);
  border-bottom: 1px solid var(--gray-300);
}
.section--centered {
  text-align: center;
}
.section--centered .section-lead,
.section--centered .contact-info {
  margin-left: auto;
  margin-right: auto;
}
.section-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 1rem;
  color: #111;
}
.section-lead {
  font-size: 1.15rem;
  color: var(--gray-700);
  max-width: 760px;
  margin-bottom: 2rem;
}
.section-lead--full {
  max-width: none;
}
.article-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem;
  line-height: 1.75;
  color: var(--gray-700);
}
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  font-family: 'EB Garamond', Georgia, serif;
  color: #111;
  margin: 1.75rem 0 0.5rem;
}
.article-content p { margin-bottom: 1rem; }
.article-content ul,
.article-content ol { margin: 0 0 1rem 1.5rem; }
.article-content blockquote {
  border-left: 3px solid var(--gray-300);
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  color: var(--gray-600);
  font-style: italic;
}
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem 0;
}
.article-content a { color: var(--blue); }
.article-content a:hover { text-decoration: underline; }
.article-content table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.article-content th,
.article-content td {
  border: 1px solid var(--gray-300);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.goal-card {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.goal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-color: var(--gray-400);
}
.goal-card h3 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #111;
}
.goal-card p {
  font-size: 0.95rem;
  color: var(--gray-700);
}

/* ── Rescue stories ─────────────────────────────────────────────────────── */
.rescue-intro {
  max-width: 46rem;
  margin-bottom: 2rem;
}
.rescue-intro p {
  margin: 0 0 1rem;
  line-height: 1.6;
}
.rescue-intro p:last-child {
  margin-bottom: 0;
}
.rescue-intro a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rescue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-auto-rows: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.rescue-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.rescue-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.rescue-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.rescue-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  overflow: hidden;
  z-index: 2;
  pointer-events: none;
}

.rescue-ribbon span {
  position: absolute;
  top: 18px;
  right: -28px;
  width: 140px;
  background: #c41e3a;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 0.35rem 0;
  transform: rotate(45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.rescue-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  height: 100%;
}

.rescue-card-text {
  flex: 0 0 auto;
  margin-bottom: 1rem;
}

.rescue-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.25;
  margin-bottom: 0.25rem;
  color: #111;
}

.rescue-date {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin: 0;
}

.rescue-image-wrap {
  flex: 0 0 auto;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 360px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--gray-100);
  min-height: 0;
}

.rescue-image {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
}

/* Modal (desktop only) */
.rescue-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
}

.rescue-modal[hidden] {
  display: none;
}

.rescue-modal-dialog {
  background: #fff;
  border-radius: 12px;
  max-width: 760px;
  width: 100%;
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.rescue-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-300);
  flex: 0 0 auto;
}

.rescue-modal-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0;
  color: #111;
}

.rescue-modal-close {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--gray-600);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.rescue-modal-close:hover {
  color: #111;
  background: var(--gray-100);
}

.rescue-modal-body {
  overflow-y: auto;
  padding: 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.rescue-modal-body img,
.rescue-modal-body .ratio-wrap img {
  max-width: 100%;
  height: auto;
}

.rescue-modal-body iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
  border: none;
}

/* Detail page (mobile/tablet) */
.rescue-detail {
  max-width: 780px;
  margin: 0 auto;
}

.rescue-detail-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.8rem;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  color: #111;
}

.rescue-detail-date {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 1.25rem;
}

.rescue-detail-image-wrap {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  border-radius: 8px;
  overflow: hidden;
}

.rescue-detail-image {
  width: 100%;
  height: auto;
  display: block;
}

.rescue-detail-content {
  font-size: 1rem;
  color: var(--gray-700);
  margin-bottom: 1.5rem;
}

.rescue-detail-content p {
  margin-bottom: 0.75rem;
}

.rescue-detail-content iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
  border: none;
}

.rescue-detail-content .ratio-wrap {
  max-width: 100%;
  margin: 0 auto 1rem;
  overflow: hidden;
}

.rescue-detail-content .ratio-box {
  position: relative;
  height: 0;
  /* padding-bottom is set inline by the imported WordPress HTML */
}

.rescue-detail-content .ratio-box img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rescue-detail-success {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800);
  padding: 1rem 0;
  border-top: 1px solid var(--gray-300);
}

.link-back {
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
}

.link-back:hover {
  text-decoration: underline;
}

.page-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  font-size: 1.05rem;
}
.page-content h2 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.6rem;
  margin: 2.5rem 0 1rem;
  color: #111;
}
.page-content h3 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.25rem;
  margin: 1.75rem 0 0.75rem;
  color: #111;
}
.page-content p + p {
  margin-top: 1.25rem;
}
.page-content ul {
  margin: 1.25rem 0 1.25rem 1.25rem;
}
.page-content li {
  margin-bottom: 0.75rem;
}
.cta-band {
  background: #111;
  color: #fff;
  text-align: center;
  padding: 3rem 1.5rem;
}
.cta-band h2 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.cta-band p {
  color: #d4d4d4;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}
.contact-block {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}
.contact-info {
  flex: 1;
  min-width: 260px;
}
.contact-info a {
  color: #111;
  font-weight: 500;
}
.contact-email {
  font-size: 1.25rem;
  margin-top: 0.5rem;
}
.contact-form-wrap {
  flex: 1;
  min-width: 280px;
  max-width: 420px;
  text-align: left;
}
