/* All Nations Initiative — shared site stylesheet
   Every page links to /assets/css/site.css, so a future redesign
   restyles every page (including old newsletters) from this one file.
   No external fonts or libraries: nothing here depends on another company's servers. */

:root {
  --teal: #007D8A;        /* text-safe teal: 4.5:1+ on white, and white on it */
  --teal-bright: #00A0B0; /* brand teal for large shapes and bands only */
  --navy: #003366;
  --ink: #1F2A30;
  --muted: #4A5A62;
  --gold: #D9A42B;        /* decoration only; too light for text on white */
  --deep: #002A3A;
  --paper: #FFFFFF;
  --mist: #EEF6F7;
  --line: #D5E3E6;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--sans); font-size: 18px; line-height: 1.65; color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; }
a { color: var(--teal); }
a:hover { color: var(--navy); }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.2; font-weight: normal; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* Header */
.site-header { border-bottom: 4px solid var(--teal-bright); background: var(--paper); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--navy); }
.brand img { height: 64px; width: auto; }
.brand span { font-family: var(--serif); font-variant: small-caps; letter-spacing: 0.04em; font-size: 1.6rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1rem; display: inline-block; padding: 10px 0; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--teal); }
.site-nav .give, .btn-donate { display: inline-block; background: var(--teal); color: #fff; border: 3px solid var(--gold); border-radius: 999px; padding: 8px 22px; font-family: var(--sans); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; transition: background-color .2s, color .2s; }
.site-nav .give:hover, .site-nav .give:focus-visible, .btn-donate:hover, .btn-donate:focus-visible { background: var(--gold); color: var(--deep); border-color: var(--teal); }

@media (max-width: 959px) {
  .site-nav { flex: 1 1 100%; }
  .site-nav > ul > li:last-child { margin-left: auto; }
}

/* Drop-down submenu (About → Meet the Team): opens on hover, keyboard focus, or the ▾ button */
.site-nav .has-sub { position: relative; display: flex; align-items: center; }
.sub-toggle { font: inherit; font-size: 0.9rem; color: var(--ink); background: none; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; margin-left: 2px; cursor: pointer; line-height: 1; }
.sub-toggle:hover, .sub-toggle:focus-visible { background: var(--mist); border-color: var(--teal); }
.site-nav .sub { display: none; position: absolute; top: 100%; left: -14px; z-index: 50; flex-direction: column; gap: 0; min-width: 210px; padding: 6px 0; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--teal-bright); border-radius: 0 0 10px 10px; box-shadow: 0 10px 24px rgba(0, 42, 58, 0.14); }
.site-nav .has-sub:hover > .sub, .site-nav .has-sub:focus-within > .sub, .site-nav .has-sub.open > .sub { display: flex; }
.site-nav .sub a { display: block; padding: 8px 16px; white-space: nowrap; }
.site-nav .sub a:hover, .site-nav .sub a:focus-visible, .site-nav .sub a[aria-current] { background: var(--mist); text-decoration: underline; }
@media print { .sub-toggle, .site-nav .sub { display: none !important; } }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Footer */
.slogan { background: var(--teal); color: #fff; text-align: center; font-weight: 800; letter-spacing: 0.18em; padding: 18px 12px; font-size: 1.15rem; }
.slogan .dot { color: var(--gold); }
.site-footer { background: var(--deep); color: #C9D8DD; font-size: 0.95rem; padding: 28px 0; }
.site-footer a { color: #fff; }
.site-footer p { margin: 4px 0; }

/* Breadcrumb */
.crumbs { font-size: 0.95rem; color: var(--muted); margin: 24px 0 0; }
.crumbs a { color: var(--muted); }

/* ---------- Newsletter archive ---------- */
.archive h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 12px 0 8px; }
.archive .lede { color: var(--muted); max-width: 700px; margin: 0 0 40px; }
.archive h2 { font-size: 1.5rem; border-bottom: 2px solid var(--line); padding-bottom: 6px; margin-top: 40px; }
.issue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.issue-list li { border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; }
.issue-list h3 { margin: 0 0 6px; font-size: 1.35rem; }
.issue-list h3 a { text-decoration: none; }
.issue-list p { margin: 0; color: var(--muted); }

/* ---------- Newsletter issue ---------- */
.issue-head { padding: 8px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.issue-head .kicker { font-weight: 700; letter-spacing: 0.14em; font-size: 0.85rem; color: var(--teal); margin: 16px 0 4px; text-transform: uppercase; }
.issue-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 12px; }
.issue-head .intro { color: var(--muted); max-width: 720px; margin: 0; }
.issue-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-block; border: 2px solid var(--teal); color: var(--teal); background: none; font: inherit; font-size: 0.95rem; font-weight: 600; padding: 8px 18px; border-radius: 999px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--teal); color: #fff; }

.issue-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-bottom: 64px; }
@media (min-width: 960px) {
  .issue-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 56px; }
}

/* Table of contents: a list at the top on phones, a floating sidebar on wide screens */
.toc { background: var(--mist); border-radius: 12px; padding: 18px 20px; font-size: 0.97rem; }
.toc h2 { font-family: var(--sans); font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy); margin: 0 0 10px; font-weight: 700; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 6px 0; }
.toc li li { font-size: 0.93rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
@media (min-width: 960px) {
  .toc { position: sticky; top: 20px; align-self: start; max-height: calc(100vh - 40px); overflow-y: auto; }
}

.issue-body section { padding-top: 8px; margin-bottom: 48px; scroll-margin-top: 20px; }
.issue-body .program { font-weight: 700; letter-spacing: 0.12em; font-size: 0.8rem; color: var(--teal); text-transform: uppercase; margin: 0 0 4px; }
.issue-body h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 14px; }
.issue-body figure { margin: 24px 0; }
.issue-body figcaption { font-size: 0.92rem; color: var(--muted); margin-top: 6px; }
.issue-body blockquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--gold); font-family: var(--serif); font-size: 1.15rem; color: var(--navy); }
.issue-body section:target { animation: flash 2.4s ease-out; border-radius: 8px; }
@keyframes flash { from { background: #FFF4D6; } to { background: transparent; } }
.to-top { font-size: 0.92rem; font-weight: 600; }
.give-box { background: var(--mist); border-radius: 12px; padding: 24px; }

.placeholder { background: repeating-linear-gradient(45deg, #F3F7F8, #F3F7F8 10px, #E8F0F2 10px, #E8F0F2 20px); border: 2px dashed #9FB7BE; border-radius: 10px; color: var(--muted); padding: 40px 16px; text-align: center; font-size: 0.95rem; }

/* ---------- Print: the same page prints as a clean newsletter ---------- */
.print-only { display: none; }
@media print {
  @page { margin: 0.6in; }
  body { font-size: 11pt; line-height: 1.45; color: #000; }
  .site-nav, .to-top, .issue-tools, .skip-link, .crumbs { display: none !important; }
  .print-only { display: block; }
  .site-header { border-bottom: 2px solid #000; }
  .brand img { height: 48px; }
  .issue-layout { display: block; }
  .toc { position: static; background: none; border: 1px solid #999; page-break-after: avoid; margin-bottom: 18pt; }
  .issue-body section { page-break-inside: auto; margin-bottom: 18pt; }
  .issue-body h2, .issue-body .program { page-break-after: avoid; break-after: avoid; }
  .slogan .dot { color: #000; }
  figure, blockquote { page-break-inside: avoid; }
  .issue-body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #333; word-break: break-all; }
  .slogan { background: none; color: #000; border-top: 1px solid #000; padding: 8pt 0; font-size: 10pt; }
  .site-footer { background: none; color: #000; padding: 6pt 0; font-size: 9pt; }
  .site-footer a { color: #000; }
  .placeholder { background: none; }
  a { color: #000; text-decoration: none; }
}

/* ---------- Home (holding page) ---------- */
.hero { background: var(--deep); color: #fff; }
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 56px; padding-top: 72px; padding-bottom: 72px; }
.hero-logo { flex: 0 0 auto; }
.hero-logo img { width: 200px; height: auto; display: block; }
.hero-text { flex: 1 1 480px; min-width: 0; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0 0 20px; }
.hero blockquote { margin: 0; font-family: var(--serif); font-size: 1.2rem; color: #D7E6EA; font-style: italic; max-width: 640px; }
.hero cite { display: block; margin-top: 8px; font-style: normal; font-family: var(--sans); font-size: 0.95rem; color: var(--gold); }
.notice { background: var(--mist); border-bottom: 1px solid var(--line); font-size: 0.98rem; }
.notice .wrap { padding-top: 12px; padding-bottom: 12px; }
.band { padding: 72px 0; }
.band.alt { background: var(--mist); }
.band h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin: 0 0 18px; }
.eyebrow { font-weight: 700; letter-spacing: 0.14em; font-size: 0.82rem; color: var(--teal); text-transform: uppercase; margin: 0 0 8px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 760px; }
.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 32px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 24px 26px; }
.band.alt .card { border-color: #CFE2E6; }
.card h3 { margin: 0 0 8px; font-size: 1.3rem; }
.card p { margin: 0; color: var(--muted); }
.ways { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.ways li { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--teal-bright); border-radius: 10px; padding: 22px 24px; }
.ways strong { display: block; font-size: 1.1rem; color: var(--navy); margin-bottom: 6px; }
.ways .tag { display: inline-block; font-size: 0.8rem; font-weight: 700; color: var(--teal); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.btn-solid { display: inline-block; background: var(--teal); color: #fff; text-decoration: none; font-weight: 700; padding: 12px 24px; border-radius: 999px; }
.btn-solid:hover { background: var(--navy); color: #fff; }
.fine { font-size: 0.95rem; color: var(--muted); margin-top: 24px; }

/* ---------- Simple content pages (policies, etc.) ---------- */
/* Text pages line up with the logo (full .wrap width); each block is capped at 820px so lines stay readable */
.page { padding-top: 8px; padding-bottom: 72px; }
.page > * { max-width: 820px; }
.page.page-wide > * { max-width: none; }
.page h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 16px 0 12px; }
.page h2 { font-size: 1.6rem; margin: 40px 0 12px; }
.page h3 { font-size: 1.2rem; margin: 24px 0 6px; }
.policy { border-left: 4px solid var(--teal-bright); padding: 4px 0 4px 20px; margin: 16px 0; }
.page dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 12px 0; }
.page dt { font-weight: 700; color: var(--navy); }
.page dd { margin: 0; }
@media (max-width: 560px) { .page dl { grid-template-columns: 1fr; } .page dd { margin-bottom: 8px; } }

@media print {
  .hero { background: none; color: #000; }
  .hero h1, .hero blockquote { color: #000; }
  .band { padding: 12pt 0; }
}

/* Document list (policies page) */
.doc-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.doc-list li { border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.doc-list a { font-weight: 700; }
.doc-list span { display: block; font-size: 0.93rem; color: var(--muted); }
.doc-grid { grid-template-columns: 1fr 1fr; }
.doc-grid .full { grid-column: 1 / -1; }
.doc-note { font-size: 0.9rem; color: var(--muted); margin-top: 12px; }
@media (max-width: 560px) { .doc-grid { grid-template-columns: 1fr; } }

/* Contact form */
.contact-form { margin-top: 20px; background: var(--paper); border: 1px solid #CFE2E6; border-radius: 12px; padding: 24px 26px; }
.contact-form h3 { margin: 0 0 16px; font-size: 1.3rem; }
.contact-form .row { gap: 0 20px; }
.contact-form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 20px; }
.contact-form .field { margin-bottom: 16px; }
.contact-form label { display: block; font-weight: 600; font-size: 0.95rem; color: var(--navy); margin-bottom: 6px; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; font: inherit; font-size: 1rem; padding: 10px 12px; border: 1px solid #9FB7BE; border-radius: 8px; background: #fff; color: var(--ink); min-height: 44px; }
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 3px solid rgba(0,125,138,.3); border-color: var(--teal); }
.contact-form button { border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 20px; padding: 16px 20px; border-radius: 10px; font-weight: 600; }
.form-status.ok { background: #E3F4EA; color: #1D5B36; border: 1px solid #A8D5B8; }
.form-status.warn { background: #FFF4D6; color: #6B4E00; border: 1px solid #E8CD80; }
@media print { .contact-form, .form-status { display: none; } }

/* Hero fading headline */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fader { display: flex; flex-direction: column; justify-content: center; }
.fader-text { display: block; transition: opacity 1s ease-in-out; opacity: 1; }
.fader.out .fader-text { opacity: 0; }
.fader em { font-style: italic; color: #F2D27A; }
@media (prefers-reduced-motion: reduce) { .fader-text { transition: none; } }
@media print { .fader { min-height: 0 !important; } }

/* Card / PayPal button: deliberately different from the gold-and-teal Donate button */
.btn-card { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; background: #fff; color: var(--navy); border: 2px solid var(--navy); border-radius: 8px; padding: 10px 16px; font-weight: 700; text-decoration: none; min-height: 44px; }
.btn-card svg { width: 22px; height: 22px; flex: 0 0 auto; }
.btn-card:hover, .btn-card:focus-visible { background: var(--navy); color: #fff; }
.card-note { display: block; font-size: 0.88rem; color: var(--muted); margin-top: 8px; }

/* Sections copied in from the home page on other pages */
.borrowed { border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.borrowed h2:focus { outline: none; }

/* Donation fine print under Ways to give */
.give-notes { margin-top: 28px; font-size: 0.95rem; color: var(--muted); }
.give-notes-title { margin: 0 0 6px; font-weight: 700; color: var(--navy); }
.give-notes ul { margin: 0; padding-left: 20px; }
.give-notes li { margin: 2px 0; }

@media print { .notice { display: none; } }

/* Collapsible sections (pol-disc) */
.section-fold { border: 1px solid var(--line); border-radius: 12px; margin: 16px 0; background: #fff; }
.section-fold > summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 20px; position: relative; border-radius: 12px; }
.section-fold > summary::-webkit-details-marker { display: none; }
.section-fold > summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.8rem; font-weight: 700; color: var(--teal); line-height: 1; }
.section-fold[open] > summary::after { content: "\2212"; }
.section-fold > summary:hover, .section-fold > summary:focus-visible { background: var(--mist); }
.section-fold > summary h2 { display: inline; margin: 0; font-size: 1.45rem; }
.section-fold[open] > summary { border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; }
.fold-body { padding: 4px 20px 20px; }
.fold-body h3:first-child { margin-top: 16px; }
.pending-note { font-style: italic; color: var(--muted); }
@media print {
  .section-fold { border: 0; }
  .section-fold > summary { padding: 0; }
  .section-fold > summary::after { content: none; }
  .fold-body { padding: 0; }
}

/* ---------- Meet the Team ---------- */
/* Cards like the Sitejet design: a portrait photo with a white caption box overlapping its bottom edge */
.team-intro { color: var(--muted); max-width: 720px; }
.team-h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 40px 0 6px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
/* Cards wrap in rows (3 across on wide screens, 2 on tablets, 1 on phones). A short last row is centered,
   with the leftover space split evenly: [space][card][space][card][space]. */
.team-list { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; row-gap: 44px; }
.member { flex: 0 0 auto; width: 100%; max-width: 420px; margin: 0 auto; }
@media (min-width: 601px) and (max-width: 899px) {
  .member { width: calc((100% - 32px) / 2); max-width: none; margin: 0; }
  .member:nth-child(2n) { margin-left: 32px; }
  .member:nth-child(2n+1):last-child { margin-left: calc((100% + 32px) / 4); }
}
@media (min-width: 900px) {
  .member { width: calc((100% - 64px) / 3); max-width: none; margin: 0; }
  .member:not(:nth-child(3n+1)) { margin-left: 32px; }
  .member:nth-child(3n+1):nth-last-child(2),
  .member:nth-child(3n+1):nth-last-child(2) + .member { margin-left: calc((100% + 128px) / 9); }
  .member:nth-child(3n+1):last-child { margin-left: calc((100% + 32px) / 3); }
}
.member img { display: block; width: 100%; height: auto; aspect-ratio: 7 / 8; object-fit: cover; }
.member .card-text { position: relative; background: #fff; margin: -64px 7% 0; padding: 16px 18px 0; }
.page .member h3 { margin: 0; font-size: 1.45rem; text-align: center; }
.member .role, .member .staff-role { margin: 4px 0 0; text-align: center; font-size: 0.97rem; line-height: 1.4; }
.member .role { font-weight: 700; color: var(--ink); }
.member .staff-role { font-weight: 600; color: var(--muted); }
.member .bio { margin: 14px 0 0; padding-top: 14px; border-top: 2px solid var(--gold); font-size: 1rem; }
@media print { .member { break-inside: avoid; } .member .card-text { margin-top: 0; } }
.nowrap { white-space: nowrap; }
