/* ============================================================
   Zoa Fund — design tokens
   Edit these to change colors / typography / spacing site-wide.
   Brand guide: /Users/johnboland/Desktop/zoafund/brand-assets/Brand Guide/Zoa_Fund_BrandGuide.pdf
   ============================================================ */
:root {
  /* Brand colors (from brand guide) */
  --burgundy:       #4A1C20;
  --berry:          #802D4F;
  --orange:         #D15440;
  --dark-evergreen: #0F2C25;
  --dark-teal:      #295844;
  --moss:           #4D7D3B;
  --oat-milk:       #F6EFDE;

  /* Aliases for semantic use */
  --bg:             var(--oat-milk);
  --bg-dark:        var(--dark-evergreen);
  --text:           var(--burgundy);
  --text-on-dark:   var(--oat-milk);
  --accent:         var(--orange);
  --rule:           rgba(74, 28, 32, 0.12);

  /* Typography */
  --font-body: "Proxima Nova", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Proxima Nova", "Inter", -apple-system, BlinkMacSystemFont, Georgia, serif;

  /* Spacing scale (modular) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Layout */
  --container-max: 64rem;
  --measure: 36rem;          /* line-length cap on body copy */

  /* Type scale */
  --fs-eyebrow: 0.8125rem;
  --fs-body:    1.0625rem;
  --fs-lead:    1.1875rem;
  --fs-h3:      clamp(1.25rem, 1.6vw, 1.5rem);
  --fs-h2:      clamp(1.625rem, 2.4vw, 2rem);
  --fs-h1:      clamp(2rem, 4.5vw, 3.25rem);
  --fs-display: clamp(2.5rem, 6vw, 4.5rem);

  /* Radius */
  --radius: 4px;

  /* Icon sizes (em-based — icons scale with surrounding text) */
  --icon-sm: 1em;       /* inline with body text */
  --icon-md: 1.25em;    /* CTAs, nav */
  --icon-lg: 1.5em;     /* decorative, hero */
}

/* ============================================================
   Icons (Phosphor, regular weight)
   ============================================================ */
.icon {
  display: inline-block;
  vertical-align: -0.15em;
  fill: currentColor;
  flex-shrink: 0;
  line-height: 1;
}
.icon--sm { width: var(--icon-sm); height: var(--icon-sm); }
.icon--md { width: var(--icon-md); height: var(--icon-md); }
.icon--lg { width: var(--icon-lg); height: var(--icon-lg); }

/* Inline icon next to text — adds a small gap. */
a > .icon,
button > .icon { margin-left: 0.25em; }
.icon + * { margin-left: 0.4em; }

.icon-missing {
  display: inline-block;
  padding: 0 0.3em;
  background: var(--accent);
  color: var(--oat-milk);
  font-size: 0.75em;
  border-radius: 2px;
  font-family: monospace;
}

/* ============================================================
   Reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { color: var(--text); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: var(--radius); }

p { margin: 0 0 var(--space-4); max-width: var(--measure); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-4);
  color: var(--text);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); margin-top: var(--space-12); }
h3 { font-size: var(--fs-h3); margin-top: var(--space-6); }

hr { border: 0; border-top: 1px solid var(--rule); margin: var(--space-8) 0; max-width: var(--measure); }

ul, ol { padding-left: 1.25rem; max-width: var(--measure); }
li { margin: var(--space-2) 0; }

strong { font-weight: 700; }

::selection { background: var(--accent); color: var(--bg); }

/* ============================================================
   Utilities
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skiplink {
  position: absolute; top: 0; left: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--text); color: var(--bg);
  transform: translateY(-200%);
  transition: transform 0.15s ease;
  z-index: 100;
}
.skiplink:focus-visible { transform: translateY(0); }

/* ============================================================
   Preview-mode banner (admin-only)
   Hidden by default; shown when JS sets html.is-preview
   ============================================================ */
.preview-banner {
  display: none;
  background: var(--burgundy);
  color: var(--oat-milk);
  text-align: center;
  font-size: 0.8125rem;
  padding: 0.4rem 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}
.preview-banner a { color: var(--oat-milk); text-decoration: underline; }
.is-preview .preview-banner { display: block; }
@media (max-width: 36rem) {
  .preview-banner { font-size: 0.75rem; padding: 0.35rem 0.5rem; }
}

/* ============================================================
   Site header (logo + nav)
   ============================================================ */
.site-header {
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}
.site-header__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.site-header__logo {
  height: 44px;
  width: auto;
}
.site-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-6);
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--text);
  font-weight: 600;
  font-size: var(--fs-body);
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a:focus-visible {
  color: var(--accent);
  text-decoration: none;
  border-bottom-color: var(--accent);
}
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--text);
}
@media (max-width: 36rem) {
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
}

/* ============================================================
   Site footer
   ============================================================ */
.site-footer {
  margin-top: var(--space-24);
  border-top: 1px solid var(--rule);
  background: var(--bg);
}
.site-footer__inner {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.site-footer__org { margin-bottom: var(--space-2); max-width: none; }
.site-footer__meta { color: var(--text); opacity: 0.65; margin: 0; max-width: none; }
.site-footer__meta a { color: inherit; }

/* ============================================================
   Hero (used on home)
   ============================================================ */
.hero {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
  text-align: center;
}
.hero__logo {
  width: clamp(14rem, 36vw, 22rem);
  margin: 0 auto var(--space-8);
}
.hero__title {
  font-size: var(--fs-display);
  margin-bottom: var(--space-6);
}
.hero__lead {
  font-size: var(--fs-lead);
  max-width: 38rem;
  margin: 0 auto var(--space-8);
  opacity: 0.9;
}
.hero__cta {
  display: inline-block;
  background: var(--accent);
  color: var(--oat-milk);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, transform 0.15s ease;
}
.hero__cta:hover, .hero__cta:focus-visible {
  background: var(--burgundy);
  color: var(--oat-milk);
  text-decoration: none;
  transform: translateY(-1px);
}
.hero__cta:active { transform: translateY(0); }

/* ============================================================
   Sections (alternating bg per brand guide)
   ============================================================ */
.section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}
.section--dark { background: var(--bg-dark); }
.section--burgundy { background: var(--burgundy); }

.section--dark,
.section--burgundy {
  color: var(--text-on-dark);
}
.section--dark h1, .section--dark h2, .section--dark h3,
.section--burgundy h1, .section--burgundy h3 { color: var(--text-on-dark); }
/* Per brand guide page 6: Burgundy bg + Orange headlines is an approved combo */
.section--burgundy h2,
.section--burgundy .section__title { color: var(--accent); }

.section--dark a, .section--burgundy a { color: var(--accent); }
.section--dark a:hover, .section--burgundy a:hover { color: var(--oat-milk); }

.section--burgundy .lead { opacity: 0.95; }

/* Berry h2 modifier — for sparing accent use on light-bg sections only */
.section__title--berry { color: var(--berry); }

.section__title {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-8);
}
.section__lead {
  font-size: var(--fs-lead);
  margin-bottom: var(--space-12);
  max-width: var(--measure);
}

/* Three-up card grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-8);
  list-style: none;
  padding: 0;
}
.card { margin: 0; }
.card h3 { margin-top: 0; font-size: var(--fs-h3); }
.card p { margin-bottom: 0; }

/* ============================================================
   Article (Markdown content pages)
   ============================================================ */
.article {
  padding-top: var(--space-12);
  padding-bottom: var(--space-16);
}
.article > h1:first-child {
  margin-top: 0;
  margin-bottom: var(--space-8);
}
.article p, .article ul, .article ol {
  font-size: var(--fs-lead);
}

/* ============================================================
   Eyebrows + leads
   ============================================================ */
.eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 var(--space-3);
  color: var(--text);
  opacity: 0.8;
}
.eyebrow--accent { color: var(--accent); opacity: 1; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--accent); text-decoration: underline; }

/* Dark / Burgundy sections need light eyebrows */
.section--dark .eyebrow,
.section--burgundy .eyebrow,
.apply-cta .eyebrow {
  color: var(--oat-milk);
  opacity: 0.85;
}

.lead {
  font-size: var(--fs-lead);
  max-width: var(--measure);
  margin: 0 0 var(--space-8);
  opacity: 0.9;
}

.container--narrow {
  max-width: 42rem;
}

/* ============================================================
   Link arrows + CTAs
   ============================================================ */
.link-arrow {
  font-weight: 600;
  color: var(--accent);
}
.link-arrow:hover { color: var(--text); }
.section--dark .link-arrow:hover { color: var(--oat-milk); }

/* ============================================================
   Section headers
   ============================================================ */
.section__title {
  font-size: var(--fs-h2);
  margin-top: 0;
  margin-bottom: var(--space-8);
}
.section--dark .section__title { color: var(--text-on-dark); }

/* ============================================================
   Cards (general)
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-6);
  list-style: none;
  padding: 0;
  max-width: none;       /* override default ul max-width: var(--measure) */
}
/* 3-up: explicit 3 columns, collapsing predictably. */
.cards--3up { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 56rem) { .cards--3up { grid-template-columns: 1fr 1fr; } }
@media (max-width: 36rem) { .cards--3up { grid-template-columns: 1fr; } }

.cards--people { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.cards--grantees { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.cards--notes { grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr)); }

.card {
  margin: 0;
  padding: var(--space-6);
  background: rgba(255,255,255,0.4);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.section--dark .card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(246, 239, 222, 0.15);
  color: var(--text-on-dark);
}
.section--dark .card a { color: var(--accent); }

.card__link {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  color: inherit;
  text-decoration: none;
}
.card__link:hover { text-decoration: none; }
.card__link:hover .card__title { color: var(--accent); }

.card__title {
  margin: 0;
  font-size: var(--fs-h3);
  line-height: 1.2;
}
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: var(--accent); }
.card__body { margin: 0; font-size: 1rem; line-height: 1.5; }
.card__meta { margin: 0; font-size: 0.875rem; opacity: 0.7; }
.card__cta { margin-top: auto; }
.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
}

/* Cards with a top photo (issue cards) — image is flush to top edges,
   text content sits in .card__inner with the same padding as a normal card. */
.card:has(.card__photo) {
  padding: 0;
  overflow: hidden;
}
.card__photo {
  display: block;
  width: 100%;
  margin: 0;
}
.card__photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.card__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
}
.card:has(.card__photo) .card__link {
  gap: 0;
}
.card__link:hover .card__photo img {
  transform: scale(1.02);
  transition: transform 600ms ease-out;
}
.card__photo img { transition: transform 400ms ease-out; }

/* ============================================================
   Tags
   ============================================================ */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
}
.tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  background: var(--rule);
  color: var(--text);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}
.tag:hover { background: var(--accent); color: var(--oat-milk); }
.tag--small { font-size: 0.75rem; padding: 0.1rem 0.5rem; }
.section--dark .tag {
  background: rgba(246, 239, 222, 0.12);
  color: var(--text-on-dark);
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge--sunset { background: var(--rule); color: var(--text); }

/* ============================================================
   Checklist (used in program "what we fund / what we look for")
   ============================================================ */
.checklist {
  list-style: none;
  padding: 0;
  max-width: var(--measure);
}
.checklist li {
  position: relative;
  padding-left: 1.75rem;
  margin: var(--space-3) 0;
  font-size: var(--fs-body);
}
.checklist li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0.05em;
  color: var(--accent);
  font-weight: 700;
}
.section--dark .checklist li::before { color: var(--accent); }

/* ============================================================
   Article + prose (Markdown body)
   ============================================================ */
.article {
  padding-top: var(--space-12);
  padding-bottom: var(--space-16);
}
.article > h1 + .lead { margin-top: var(--space-2); }

.prose p,
.prose ul,
.prose ol { font-size: var(--fs-body); }
.prose h2 { font-size: var(--fs-h2); margin-top: var(--space-12); }
.prose h3 { font-size: var(--fs-h3); margin-top: var(--space-8); }
.prose ul, .prose ol { margin-bottom: var(--space-4); }
.prose a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ============================================================
   Program hero (program.njk)
   ============================================================ */
.program-hero {
  padding-top: var(--space-16);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--rule);
}
.program-hero h1 {
  font-size: var(--fs-h1);
  max-width: 22ch;
  margin-bottom: var(--space-4);
}
.program-hero .lead {
  margin-bottom: 0;
  max-width: 50ch;
}

/* ============================================================
   Apply CTA (boxed, used on program pages)
   ============================================================ */
.apply-cta {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}
.apply-cta h2 { color: var(--text-on-dark); margin-top: 0; }
.apply-cta a { color: var(--accent); }
.apply-cta a:hover { color: var(--oat-milk); }

/* ============================================================
   Responsive photo figure (partials/photo.njk)
   ============================================================ */
.photo {
  margin: var(--space-10) auto;
  max-width: 1200px;
  padding: 0 var(--space-6);
}
.photo--full { max-width: none; padding: 0; }
.photo--hero { margin-top: var(--space-6); margin-bottom: var(--space-12); }
.photo picture { display: block; }
.photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--photo-ratio, 16/9);
  object-fit: cover;
  border-radius: 4px;
}
.photo figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: var(--space-2);
  text-align: right;
  font-style: italic;
}
.photo figcaption a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
@media (max-width: 720px) {
  .photo { padding: 0 var(--space-4); }
  .photo img { border-radius: 2px; }
}

/* Side-by-side photo strip — use for grids of related portraits */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  max-width: 1400px;
  margin: var(--space-10) auto;
  padding: 0 var(--space-6);
}
.photo-grid .photo {
  margin: 0;
  padding: 0;
  max-width: none;
}
.photo-grid .photo img { aspect-ratio: 1/1; }

/* ============================================================
   Note article (note.njk)
   ============================================================ */
.note__header {
  padding-top: var(--space-16);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--rule);
}
.note__header h1 { font-size: var(--fs-h1); margin-bottom: var(--space-4); }
.note__header .lead { margin-bottom: var(--space-4); }
.note .prose { padding-top: var(--space-12); padding-bottom: var(--space-16); }

.draft-flag {
  display: inline-block;
  background: var(--accent);
  color: var(--oat-milk);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.875rem;
  margin-top: var(--space-4);
}

/* ============================================================
   Grantee profile (grantee.njk)
   ============================================================ */
.grantee {
  padding-top: var(--space-12);
  padding-bottom: var(--space-16);
}
.grantee h1 {
  /* Tame the h1 size on long org names at desktop widths */
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.1;
}
.grantee__header {
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
  margin: var(--space-6) 0 var(--space-8);
  flex-wrap: wrap;
}
.grantee__header h1 { margin: 0 0 var(--space-2); }
.grantee__logo {
  width: 7rem;
  height: 7rem;
  object-fit: contain;
  flex: 0 0 auto;
}
.grantee__meta {
  font-size: 0.9375rem;
  opacity: 0.75;
  margin: 0 0 var(--space-3);
}
.grantee__grants,
.grantee__links,
.grantee__notes { margin-top: var(--space-12); }

.grants-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-4);
}
.grants-table th,
.grants-table td {
  text-align: left;
  padding: var(--space-3) var(--space-3) var(--space-3) 0;
  border-bottom: 1px solid var(--rule);
}
.grants-table th { font-size: var(--fs-eyebrow); text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.75; }

/* ============================================================
   Filter bar (grantees directory)
   ============================================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-8) 0 var(--space-6);
  align-items: center;
}
.filter-bar__label {
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-right: var(--space-3);
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--text);
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ============================================================
   Team page — person cards (large square photo on top)
   ============================================================ */
.cards--people {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 40rem) {
  .cards--people { grid-template-columns: 1fr; gap: var(--space-6); }
}

.card--person {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card--person .card__link {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
}
.card--person .card__link:hover .card__title { color: var(--accent); }

.person-card__photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.person-card__photo--placeholder {
  background: var(--burgundy);
  color: var(--oat-milk);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 6rem;
  letter-spacing: -0.02em;
  aspect-ratio: 1;
  width: 100%;
}

.person-card__body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}
.person-card__body .card__title { margin: 0; }
.person-card__body .card__meta { margin: 0; }
.person-card__body .card__body { margin: 0; max-width: none; }
.person-card__body .card__cta { margin-top: auto; }
.person-card__links {
  margin: 0;
  font-size: 0.9375rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}
.person-card__links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.person-card__links a:hover { text-decoration: underline; }

/* Person detail page (/team/<slug>/) */
.person {
  padding-top: var(--space-12);
  padding-bottom: var(--space-16);
}
.person__hero-photo {
  width: 100%;
  max-width: 22rem;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  margin: var(--space-8) 0 var(--space-6);
  border-radius: var(--radius);
}
.person__links {
  margin: 0 0 var(--space-8);
  font-size: 1rem;
}
.person__links a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.person__links a:hover { text-decoration: underline; }

/* ============================================================
   Card variants — small overrides
   ============================================================ */
.card--note .card__meta { font-weight: 600; }
.card--grantee .card__logo {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
}
.card--grantee .card__logo--placeholder {
  background: var(--bg-dark);
  color: var(--oat-milk);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  border-radius: var(--radius);
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   Admin page color swatches
   ============================================================ */
.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--space-3);
  margin: var(--space-6) 0 var(--space-8);
  max-width: none;
}
.swatch {
  padding: var(--space-6) var(--space-4);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  line-height: 1.4;
}
.swatch code {
  font-size: 0.8125rem;
  opacity: 0.8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ============================================================
   Admin dashboard
   ============================================================ */
.admin {
  padding-top: var(--space-12);
  padding-bottom: var(--space-16);
}
.admin__header { margin-bottom: var(--space-12); }
.admin__section {
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 1px solid var(--rule);
}
.admin__hint {
  font-size: 0.875rem;
  opacity: 0.65;
  margin-top: var(--space-3);
}
.admin__hint code { font-size: 0.85em; }

.admin__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: var(--space-3);
  margin: var(--space-8) 0;
  max-width: none;
}
.stat {
  background: rgba(255,255,255,0.4);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
}
.stat__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
}
.stat__num code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.25rem;
  font-weight: 600;
}
.stat__sub {
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0.55;
  margin-left: 0.25rem;
}
.stat__label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-top: var(--space-2);
}

.admin-table {
  width: 100%;
  max-width: none;
  border-collapse: collapse;
  margin: var(--space-4) 0;
  font-size: 0.9375rem;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: var(--space-2) var(--space-3) var(--space-2) 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.admin-table th {
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.75;
  font-weight: 700;
}
.admin-table code {
  font-size: 0.85em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  opacity: 0.75;
}

.health-list {
  list-style: none;
  padding-left: 0;
  max-width: none;
}
.health-list > li {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  margin-bottom: var(--space-2);
  background: rgba(255,255,255,0.5);
  border-left: 3px solid var(--rule);
}
.health-list__warn { border-left-color: var(--accent) !important; }
.health-list__ok   { border-left-color: var(--moss) !important; }
.health-list ul { margin-top: var(--space-2); padding-left: 1.25rem; max-width: none; }
.health-list code { font-size: 0.85em; }

.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0;
  list-style: none;
  padding: 0;
  max-width: none;
}
.logo-cell {
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.logo-cell img {
  width: 100%;
  height: auto;
  padding: var(--space-6);
  display: block;
}
.logo-cell--light img { background: var(--oat-milk); }
.logo-cell--dark  img { background: var(--bg-dark); }
.logo-cell figcaption {
  padding: var(--space-3) var(--space-4);
  font-size: 0.875rem;
  border-top: 1px solid var(--rule);
  background: rgba(255,255,255,0.4);
}

.admin pre {
  background: var(--bg-dark);
  color: var(--oat-milk);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: var(--space-3) 0 var(--space-6);
  max-width: none;
}
.admin pre code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: inherit;
  background: none;
  color: inherit;
  opacity: 1;
  padding: 0;
}
.admin code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(74,28,32,0.08);
  padding: 0.1em 0.3em;
  border-radius: 3px;
  font-size: 0.875em;
}

/* ============================================================
   Decorative patterns — burgundy bg + berry animals tessellated.
   Per brand guide: use sparingly, never put text directly on top.
   Apply on a <section> with .section + .pattern--<name>.
   ============================================================ */
.pattern--rat,
.pattern--duck,
.pattern--mink,
.pattern--pig {
  background-color: var(--burgundy);
  background-repeat: repeat;
  background-size: 480px 280px;
  color: var(--text-on-dark);
}
.pattern--rat  { background-image: url('/assets/patterns/rat-tile.svg'); }
.pattern--duck { background-image: url('/assets/patterns/duck-tile.svg'); }
.pattern--mink { background-image: url('/assets/patterns/mink-tile.svg'); }
.pattern--pig  { background-image: url('/assets/patterns/pig-tile.svg'); }

/* Admin pattern showcase tiles */
.patterns-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0 var(--space-8);
  list-style: none;
  padding: 0;
  max-width: none;
}
.pattern-tile {
  height: 12rem;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  margin: 0;
  background-color: var(--burgundy);
  background-size: 320px auto;
  background-repeat: repeat;
}
.pattern-tile__caption {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  color: var(--oat-milk);
  font-size: 0.9375rem;
  margin: 0;
}
.pattern-tile__caption strong { display: block; font-size: 1.0625rem; margin-bottom: 0.1em; }
.pattern-tile__caption code { font-size: 0.8125rem; opacity: 0.85; background: none; padding: 0; }

/* ============================================================
   Design system / styleguide page (/admin/design-system/)
   ============================================================ */
.ds {
  padding-top: var(--space-12);
  padding-bottom: var(--space-16);
}
.ds__header { margin-bottom: var(--space-16); }
.ds__section {
  margin-top: var(--space-16);
  padding-top: var(--space-12);
  border-top: 1px solid var(--rule);
  scroll-margin-top: var(--space-8);
}
.ds__section h2 { margin-top: 0; }
.ds__section h3 { margin-top: var(--space-12); }

.ds__toc {
  background: rgba(74,28,32,0.05);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-6);
  margin-top: var(--space-8);
  max-width: none;
}
.ds__toc ol {
  columns: 2;
  column-gap: var(--space-8);
  list-style: decimal;
  padding-left: 1.25rem;
  margin: 0;
  max-width: none;
}
.ds__toc li { margin: 0.2rem 0; break-inside: avoid; }
.ds__toc a { color: var(--text); font-weight: 600; }
.ds__toc a:hover { color: var(--accent); }

.ds__type {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-6) 0 var(--space-8);
}
.ds__type-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: var(--space-6);
  align-items: baseline;
  padding: var(--space-3) 0;
  border-bottom: 1px dashed var(--rule);
  font-size: 0.875rem;
  opacity: 0.85;
}
.ds__type-row .ds__sample { opacity: 1; }
.ds__type-row code { font-size: 0.8em; }
@media (max-width: 36rem) {
  .ds__type-row { grid-template-columns: 1fr; }
}

.ds__combos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--space-3);
  margin: var(--space-6) 0;
  max-width: none;
}
.ds__combo {
  padding: var(--space-5);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.ds__spacing {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-6) 0;
  font-size: 0.875rem;
}
.ds__spacing > div {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.ds__spacing-bar {
  height: 1.25rem;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.ds__demo {
  display: flex;
  justify-content: center;
  margin: var(--space-4) 0;
  background: rgba(74,28,32,0.05);
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.ds__demo-box {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--space-4);
  text-align: center;
  font-size: 0.875rem;
}
.ds__demo-box--wide {
  width: 100%;
  max-width: 64rem;
}
.ds__demo-box--narrow {
  width: 100%;
  max-width: 42rem;
}

.ds__sample-stack {
  margin: var(--space-6) 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.ds__sample-stack > section { margin: 0; }
.ds__sample-stack code {
  display: inline-block;
  margin-top: var(--space-2);
  font-size: 0.8125rem;
}

.ds__icons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: var(--space-3);
  margin: var(--space-6) 0;
  max-width: none;
}
.ds__icons > div {
  text-align: center;
  padding: var(--space-3);
  background: rgba(74,28,32,0.04);
  border-radius: var(--radius);
}
.ds__icon {
  display: block;
  font-size: 2rem;
  margin-bottom: var(--space-2);
  color: var(--text);
}
.ds__icons code { font-size: 0.8125rem; opacity: 0.85; }

/* ============================================================
   FOOTER (Dark Evergreen, 3-column)
   Replaces the previous oat-milk minimal footer.
   ============================================================ */
.site-footer {
  margin-top: var(--space-24);
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-top: none;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: var(--space-12);
  padding-top: var(--space-16);
  padding-bottom: var(--space-12);
  align-items: start;
}
@media (max-width: 56rem) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 36rem) {
  .site-footer__inner { grid-template-columns: 1fr; gap: var(--space-8); }
}

.site-footer__brand .site-footer__logo-link { display: inline-block; line-height: 0; }
.site-footer__logo {
  height: 48px; width: auto;
  display: block;
  margin-bottom: var(--space-4);
}
.site-footer__tagline {
  margin: 0;
  font-size: 1rem;
  opacity: 0.85;
  max-width: 22rem;
}

.site-footer__col { font-size: 0.9375rem; }
.site-footer__col .eyebrow {
  color: var(--oat-milk);
  opacity: 0.6;
  margin-bottom: var(--space-3);
}
.site-footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
}
.site-footer__col li { margin: var(--space-2) 0; }
.site-footer__col a {
  color: var(--oat-milk);
  text-decoration: none;
  opacity: 0.92;
}
.site-footer__col a:hover {
  color: var(--accent);
  opacity: 1;
  text-decoration: none;
}

.site-footer__base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding-top: var(--space-6);
  padding-bottom: var(--space-8);
  border-top: 1px solid rgba(246, 239, 222, 0.12);
  font-size: 0.875rem;
  opacity: 0.7;
}
.site-footer__org { margin: 0; max-width: none; }
.site-footer__copy { margin: 0; max-width: none; white-space: nowrap; }
.site-footer__base a { color: inherit; }
.site-footer__base a:hover { color: var(--accent); opacity: 1; }
.site-footer__base strong { font-weight: 700; }
@media (max-width: 36rem) {
  .site-footer__base { flex-direction: column; align-items: flex-start; }
}


/* ============================================================
   PAGE HERO — for sub-pages (smaller than the home hero)
   Use on About, Programs/<slug>, etc. when you want a strong
   page-introductory block before content sections.
   ============================================================ */
.page-hero {
  padding-top: var(--space-16);
  padding-bottom: var(--space-12);
}
.page-hero .eyebrow { margin-bottom: var(--space-4); }
.page-hero h1 {
  font-size: var(--fs-h1);
  margin-bottom: var(--space-4);
  max-width: 22ch;
}
.page-hero .lead {
  margin: 0;
  max-width: 50ch;
}
.page-hero--centered { text-align: center; }
.page-hero--centered h1, .page-hero--centered .lead { margin-left: auto; margin-right: auto; }
.page-hero--dark { background: var(--bg-dark); color: var(--text-on-dark); }
.page-hero--dark h1, .page-hero--dark .eyebrow { color: var(--text-on-dark); opacity: 1; }
.page-hero--dark .eyebrow { opacity: 0.85; }


/* ============================================================
   FORMS
   .field             — wrapper for label + control + helper
   .field__label      — text label above the control
   .field__control    — input/textarea/select wrapper
   .field__helper     — hint/description below
   .field__error      — error message below (replaces helper when shown)
   .field--required label::after { content: " *"; color: var(--accent); }
   ============================================================ */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  max-width: var(--measure);
}
.field__label {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
}
.field--required .field__label::after {
  content: " *";
  color: var(--accent);
}
.field__helper {
  font-size: 0.875rem;
  opacity: 0.7;
  margin: 0;
}
.field__error {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0;
}

/* Inputs, textareas, selects share base styles */
.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="search"],
.field textarea,
.field select {
  font: inherit;
  font-size: var(--fs-body);
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.55rem 0.875rem;
  width: 100%;
  transition: border-color 0.15s ease, background 0.15s ease;
  font-family: var(--font-body);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--oat-milk);
}
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.field textarea {
  min-height: 7rem;
  resize: vertical;
  line-height: 1.5;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'><path fill='%234A1C20' d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.1em;
  padding-right: 2.5rem;
}

.field--invalid input,
.field--invalid textarea,
.field--invalid select {
  border-color: var(--accent);
  background: rgba(209, 84, 64, 0.05);
}

/* Checkboxes & radios */
.field--check {
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-3);
}
.field--check input {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.2rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.field--check .field__label {
  font-weight: 500;
  cursor: pointer;
}
.field--check .field__helper { margin-left: 1.625rem; }

/* Submit / form-level button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: var(--accent);
  color: var(--oat-milk);
  font-weight: 700;
  font-size: 1.0625rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover, .btn:focus-visible {
  background: var(--burgundy);
  color: var(--oat-milk);
  transform: translateY(-1px);
  text-decoration: none;
}
.btn:active { transform: translateY(0); }
.btn--secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--text);
}
.btn--secondary:hover, .btn--secondary:focus-visible {
  background: var(--text);
  color: var(--oat-milk);
}

.form {
  max-width: var(--measure);
}
.form__actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-8);
  flex-wrap: wrap;
}


/* ============================================================
   CALLOUT — inline notice in body content
   .callout, .callout--info | --tip | --warn | --success
   ============================================================ */
.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3) var(--space-4);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-6) 0;
  border-radius: var(--radius);
  border-left: 4px solid var(--rule);
  background: rgba(74, 28, 32, 0.04);
  max-width: var(--measure);
}
.callout__icon {
  font-size: 1.25em;
  color: var(--text);
  opacity: 0.8;
}
.callout__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 var(--space-1);
}
.callout__body {
  margin: 0;
  font-size: var(--fs-body);
}
.callout__body p:last-child { margin-bottom: 0; }
.callout__body > :first-child { margin-top: 0; }

.callout--info    { border-left-color: var(--berry);     background: rgba(128, 45, 79, 0.06); }
.callout--tip     { border-left-color: var(--moss);      background: rgba(77, 125, 59, 0.06); }
.callout--warn    { border-left-color: var(--accent);    background: rgba(209, 84, 64, 0.06); }
.callout--success { border-left-color: var(--dark-teal); background: rgba(41, 88, 68, 0.06); }


/* ============================================================
   PULLQUOTE — emphasized quote in articles
   <figure class="pullquote">
     <blockquote>...</blockquote>
     <figcaption>— Attribution</figcaption>
   </figure>
   ============================================================ */
.pullquote {
  margin: var(--space-12) 0;
  padding: var(--space-8) 0 var(--space-8) var(--space-8);
  border-left: 4px solid var(--accent);
  max-width: 38rem;
}
.pullquote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.6vw, 1.75rem);
  line-height: 1.3;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.pullquote figcaption {
  margin-top: var(--space-4);
  font-size: 0.9375rem;
  color: var(--text);
  opacity: 0.7;
}


/* ============================================================
   FIGURE / IMAGE WITH CAPTION
   <figure class="figure">
     <img src="..." alt="...">
     <figcaption>Caption text</figcaption>
   </figure>
   ============================================================ */
.figure {
  margin: var(--space-8) 0;
  max-width: none;
}
.figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.figure figcaption {
  margin-top: var(--space-3);
  font-size: 0.875rem;
  opacity: 0.7;
  text-align: left;
  max-width: var(--measure);
}
.figure--full { /* span the container */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
}
.figure--full img { border-radius: 0; }
.figure--full figcaption {
  padding-left: var(--space-6);
  padding-right: var(--space-6);
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
}


/* ============================================================
   BREADCRUMB
   <nav class="breadcrumb" aria-label="Breadcrumb">
     <a href="/">Home</a> <span>/</span>
     <a href="/about/">About</a> <span>/</span>
     <span aria-current="page">Team</span>
   </nav>
   ============================================================ */
.breadcrumb {
  font-size: 0.875rem;
  margin-bottom: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  opacity: 0.85;
}
.breadcrumb a { color: var(--text); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb span { opacity: 0.5; }
.breadcrumb [aria-current="page"] { font-weight: 600; opacity: 1; }


/* ============================================================
   DEFINITION LIST (meta-pairs)
   <dl class="meta-list">
     <dt>Founded</dt><dd>2020</dd>
     <dt>Location</dt><dd>Brooklyn, NY</dd>
   </dl>
   Used on grantee profiles, person profiles, etc.
   ============================================================ */
.meta-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-2) var(--space-6);
  margin: var(--space-6) 0;
  font-size: 0.9375rem;
  max-width: var(--measure);
}
.meta-list dt {
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.75;
  margin: 0;
}
.meta-list dd { margin: 0; }
@media (max-width: 30rem) {
  .meta-list { grid-template-columns: 1fr; gap: 0; }
  .meta-list dd { margin-bottom: var(--space-3); }
}


/* ============================================================
   404 PAGE
   ============================================================ */
.error-page {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
  text-align: center;
}
.error-page__code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(5rem, 14vw, 9rem);
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0 0 var(--space-4);
}
.error-page h1 {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-4);
}
.error-page .lead { max-width: 32rem; margin: 0 auto var(--space-8); }
