/* ============================================================
   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;
}

/* ============================================================
   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); }

/* ============================================================
   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; }
