/* Donors Club — site styles (campaign page + institutional pages)
   Tokens: STYLEGUIDE.md. Type family: Figtree (one family, weights 400–800).
   Palette: #037B43 dark green (primary text/buttons) · #03914F emerald (secondary) · #66AA26 lime (accents)
   #BCD295 light green (borders) · #D0DDAF pastel (secondary surfaces) · #FDFDF5 ivory (main background).
   Green is used only for Donate, progress, links, selected states and small accents. */

:root {
  /* palette */
  --red-primary: #037B43;
  --red-dark: #03914F;
  --red-bright: #66AA26;
  --coral: #66AA26;
  --salmon: #BCD295;
  --charcoal: #171A1D;
  --gray-dark: #343434;
  --gray-light: #D0DDAF;
  --border: #BCD295;
  --border-strong: #BCD295;
  --border-light: #D0DDAF;
  --track: #D0DDAF;
  --white: #FDFDF5;
  --muted: #6B6F74;
  --line: rgba(23, 26, 29, .10);
  --soft: rgba(3, 123, 67, .08);
  --tint: #D0DDAF;
  --tint-soft: #D0DDAF;

  /* typography */
  --font: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --fs-h1: 34px;     --lh-h1: 1.15;  --ls-h1: -0.02em;     /* campaign title; 26px mobile */
  --fs-h1-inst: 38px;                                       /* institutional H1; 30px mobile */
  --fs-h2: 26px;     --lh-h2: 1.25;  --ls-h2: -0.015em;    /* section headings; 22px mobile */
  --fs-h3: 17px;     --lh-h3: 26px;
  --fs-amount: 28px; --lh-amount: 34px;                     /* raised amount; 26px mobile */
  --fs-body: 16px;   --lh-body: 26px;
  --fs-story: 15.5px; --lh-story: 1.6;
  --fs-small: 14px;  --lh-small: 20px;
  --fs-xs: 13px;     --lh-xs: 18px;
  --fs-micro: 12px;  --lh-micro: 16px;
  --fs-btn: 16px;

  /* spacing scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-7: 28px; --s-8: 32px; --s-9: 36px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px;

  /* radius */
  --r-image: 16px; --r-card: 20px; --r-modal: 16px; --r-field: 12px; --r-pill: 9999px;

  /* containers */
  --container: 1152px; --title-max: 896px; --sidebar: 380px; --grid-gap: 40px; --prose: 720px; --prose-narrow: 680px;
  --gutter: 20px; --header-h: 72px;

  --shadow-card: 0 12px 32px -20px rgba(23, 26, 29, .25);
  --shadow-float: 0 -6px 24px rgba(23, 26, 29, .12);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-body); line-height: var(--lh-body); font-weight: 400; color: var(--gray-dark); background: var(--white); overflow-x: hidden; }
h1, h2, h3 { margin: 0; color: var(--charcoal); }
h1 { font-size: clamp(26px, 4vw, var(--fs-h1)); line-height: var(--lh-h1); font-weight: 800; letter-spacing: var(--ls-h1); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
h2 { font-size: clamp(22px, 2.8vw, var(--fs-h2)); line-height: var(--lh-h2); font-weight: 700; letter-spacing: var(--ls-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 600; }
p { margin: 0; }
a { color: var(--red-primary); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
address { font-style: normal; }
fieldset { border: 0; margin: 0 0 var(--s-5); padding: 0; min-width: 0; }
legend { font-weight: 600; color: var(--charcoal); padding: 0; margin-bottom: var(--s-2); }
:focus-visible { outline: 2px solid var(--red-primary); outline-offset: 3px; }
button:focus-visible, .btn:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
[hidden] { display: none !important; }
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.error { color: var(--red-primary); font-weight: 500; }
.skip-link { position: absolute; left: -9999px; top: 12px; z-index: 100; background: var(--red-primary); color: var(--white); padding: 12px 16px; border-radius: var(--r-field); font-size: var(--fs-small); }
.skip-link:focus { left: 20px; }
.dot { margin: 0 6px; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 48px; padding: 0 var(--s-5); border-radius: var(--r-pill); font-size: var(--fs-btn); font-weight: 600; line-height: 1; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.btn-primary { background: var(--red-primary); color: var(--white); border-color: var(--red-primary); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); }
.btn-dark { background: var(--charcoal); color: var(--white); border-color: var(--charcoal); }
.btn-dark:hover { background: #000; border-color: #000; color: var(--white); }
.btn-secondary { background: var(--white); color: var(--charcoal); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--gray-light); color: var(--charcoal); }
.btn-outline { background: var(--white); color: var(--charcoal); border-color: var(--border-strong); min-height: 44px; font-size: var(--fs-small); font-weight: 500; }
.btn-outline:hover { background: var(--gray-light); color: var(--charcoal); }
.btn-block { display: flex; width: 100%; }
.link-button { background: none; border: 0; padding: 0; min-height: 44px; color: var(--red-primary); font-size: var(--fs-small); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.link-button:hover { color: var(--red-dark); }
.link-button:disabled { color: #8a8a8a; cursor: default; text-decoration: none; }
.link-button-sm { min-height: 0; font-size: var(--fs-micro); font-weight: 500; color: var(--muted); }

/* ---------- Header: sticky · search (left) · logo (centre) · menu (right); nav lives in the dropdown at every width ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { height: var(--header-h); display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: var(--s-3); }
.logo { display: inline-flex; justify-self: center; }
.logo img { height: 46px; width: auto; }
.header-search, .nav-toggle { width: 44px; height: 44px; border: 0; background: transparent; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; color: var(--charcoal); cursor: pointer; }
.header-search:hover, .nav-toggle:hover { background: var(--gray-light); color: var(--charcoal); }
.nav-toggle { flex-direction: column; gap: 5px; }
.nav-toggle-bar { width: 20px; height: 2px; background: var(--charcoal); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
body.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-card); padding: var(--s-2) var(--gutter) var(--s-5); }
body.nav-open .primary-nav { display: block; }
.primary-nav > * { display: block; max-width: var(--container); margin-inline: auto; }
.primary-nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: var(--s-3) 0; border-bottom: 1px solid var(--border-light); }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--charcoal); }

/* ---------- Campaign layout: photo → title → funding block → main (mobile); photo | card, title/main below the photo (desktop) ---------- */
.campaign { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "photo" "head" "card" "main"; padding-top: 0; padding-bottom: var(--s-20); }
.campaign-photo { grid-area: photo; margin-inline: calc(-1 * var(--gutter)); }   /* full-bleed on mobile */
.campaign-head { grid-area: head; max-width: var(--title-max); }
.campaign-head h1 { margin: 16px 0 12px; letter-spacing: -.01em; line-height: 1.2; }
.funding-card { grid-area: card; }
.campaign-main { grid-area: main; }
.carousel { position: relative; overflow: hidden; background: var(--gray-light); }
.carousel::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .18)); pointer-events: none; }
.carousel-track { display: flex; aspect-ratio: 4 / 3; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { position: relative; flex: 0 0 100%; margin: 0; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; }
.hero-photo { width: 100%; height: 100%; object-fit: contain; object-position: 50% 50%; display: block; background: var(--gray-light); }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--charcoal); box-shadow: 0 2px 8px rgba(23, 26, 29, .18); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color .15s ease, opacity .15s ease; }
.carousel-arrow:hover { background: var(--white); }
.carousel-arrow:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-dots { position: absolute; left: 0; right: 0; bottom: 4px; z-index: 1; display: flex; justify-content: center; gap: 2px; pointer-events: none; }
.carousel-dot { position: relative; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; pointer-events: auto; }
.carousel-dot::before { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: rgba(255, 255, 255, .55); box-shadow: 0 0 0 1px rgba(23, 26, 29, .15); transition: background-color .15s ease, transform .15s ease; }
.carousel-dot:hover::before { background: rgba(255, 255, 255, .8); }
.carousel-dot[aria-selected="true"]::before { background: var(--white); transform: scale(1.25); }
.carousel-dot:focus-visible { outline: 3px solid var(--coral); outline-offset: -2px; }
.chip { display: inline-flex; align-items: center; gap: var(--s-1); font-size: var(--fs-xs); line-height: var(--lh-small); font-weight: 600; }
.chip-verified { color: var(--red-primary); }
.chip-pending { color: var(--muted); }

/* ---------- Funding block: ring 48 + stacked figures · Donate/Share grid · trust line.
   Mobile: inline (no border, no shadow, bottom rule). Desktop: 380px card, sticky. ---------- */
.funding-card { padding: 4px 0 16px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; align-self: start; }
.fc-main { display: flex; gap: 14px; align-items: center; }
.ring { position: relative; flex: 0 0 48px; width: 48px; height: 48px; }
.ring svg { width: 100%; height: 100%; display: block; }
.ring-track { stroke: var(--soft); }
.ring-fill { stroke: var(--red-bright); transition: stroke-dasharray 1.2s cubic-bezier(.22, 1, .36, 1); }
.ring-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; font-weight: 700; color: var(--charcoal); }
.fc-stack { min-width: 0; }
.fc-raised { font-size: 22px; line-height: 28px; font-weight: 800; color: var(--charcoal); }
.fc-goal { font-size: 15px; line-height: 20px; font-weight: 500; color: var(--muted); }
.fc-meta { margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--muted); }
.fc-meta strong { font-weight: 600; color: var(--gray-dark); }
.fc-actions { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fc-donate, .fc-share { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 12px; border: 0; border-radius: var(--r-pill); font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer; transition: background-color .15s ease; }
.fc-donate { background: var(--red-primary); color: var(--white); animation: pulse-ring 2s infinite; }
.fc-donate:hover { background: var(--red-dark); animation-play-state: paused; }
.fc-share { background: var(--soft); color: var(--red-primary); }
.fc-share:hover { background: rgba(3, 123, 67, .14); }
.fc-trust { margin: 12px 0 0; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--muted); text-align: center; }
.fc-trust svg { flex: 0 0 14px; }
.fc-trust > span { text-wrap: balance; }
.nowrap { white-space: nowrap; }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(3, 123, 67, .4); } 70% { box-shadow: 0 0 0 10px rgba(3, 123, 67, 0); } 100% { box-shadow: 0 0 0 0 rgba(3, 123, 67, 0); } }
.share-menu { margin-top: 10px; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-2); }
.share-option { min-height: 40px; border: 1px solid var(--border); background: var(--white); border-radius: var(--r-field); color: var(--charcoal); font-size: var(--fs-xs); font-weight: 500; cursor: pointer; }
.share-option:hover { background: var(--gray-light); }

/* ---------- Sticky donate bar: slides in when the funding block leaves the viewport (bottom on mobile, under the header on desktop) ---------- */
.sticky-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 10px 16px 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0, 0, 0, .06); transform: translateY(100%); visibility: hidden; transition: transform .3s ease, visibility 0s linear .3s; font-variant-numeric: tabular-nums; }
.sticky-bar.is-visible { transform: translateY(0); visibility: visible; transition: transform .3s ease, visibility 0s; }
.sticky-bar-text { flex: 1; min-width: 0; }
.sticky-bar-text p { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; line-height: 18px; color: var(--muted); }
.sticky-bar-text strong { font-size: 15px; font-weight: 800; color: var(--charcoal); }
.sticky-bar-track { margin-top: 6px; height: 4px; border-radius: 9999px; background: var(--soft); overflow: hidden; }
.sticky-bar-fill { height: 100%; width: 0; border-radius: inherit; background: var(--red-bright); transition: width 1.2s cubic-bezier(.22, 1, .36, 1); }
.sticky-bar-donate { flex: 0 0 auto; height: 42px; padding: 0 22px; border: 0; border-radius: var(--r-pill); background: var(--red-primary); color: var(--white); font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer; animation: pulse-ring 2s infinite; transition: background-color .15s ease; }
.sticky-bar-donate:hover { background: var(--red-dark); animation-play-state: paused; }
body.has-sticky-bar { padding-bottom: 84px; }

/* ---------- Sections ---------- */
.section { margin-top: var(--s-9); padding-top: var(--s-9); border-top: 1px solid var(--border); }
.section-first { border-top: 0; padding: 20px 0 0; margin-top: 0; }
section[id] { scroll-margin-top: var(--s-6); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-1) var(--s-4); }
.section-note { margin-top: var(--s-2); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--muted); }
.section-foot { margin-top: var(--s-5); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--muted); }

/* ---------- Story ---------- */
#story h2 { font-size: 18px; line-height: 24px; letter-spacing: 0; }
.story-lead { margin-top: var(--s-3); font-size: 15.5px; line-height: 1.6; font-weight: 500; color: var(--charcoal); }
.story-clamp { margin-top: var(--s-5); position: relative; overflow: hidden; max-height: 22rem; transition: max-height .35s ease; }
.story-clamp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4rem; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--white)); pointer-events: none; transition: opacity .2s ease; }
.story-clamp.is-expanded::after { opacity: 0; }
.story-section + .story-section { margin-top: var(--s-6); }
.story-section h3 { font-weight: 700; margin-bottom: var(--s-2); }
.story-html { font-size: var(--fs-story); line-height: var(--lh-story); color: var(--gray-dark); }
.story-html p + p, .story-html ul + p, .story-html p + ul { margin-top: var(--s-4); }
.story-html ul { list-style: disc; padding-left: 1.25em; }
.story-html img { border-radius: var(--r-image); margin: var(--s-4) 0; }
.read-more { margin-top: var(--s-4); }

/* ---------- Campaign tabs and family updates ---------- */
.campaign-tabs { display: flex; gap: var(--s-4); border-bottom: 1px solid var(--border); }
#story, #updates, .campaign-tabs { scroll-margin-top: calc(var(--header-h) + var(--s-20)); }
.campaign-tab { min-height: 44px; padding: var(--s-3) var(--s-2); border: 0; border-bottom: 3px solid transparent; background: transparent; font-weight: 600; font-size: var(--fs-small); cursor: pointer; }
.campaign-tab[aria-selected="true"] { color: var(--red-primary); border-bottom-color: var(--red-primary); }
.campaign-update { padding: var(--s-6) 0; scroll-margin-top: calc(var(--header-h) + var(--s-20)); }
.campaign-update + .campaign-update { border-top: 1px solid var(--border); }
.campaign-update h3 { font-weight: 700; }
.campaign-update time { display: block; margin-top: var(--s-1); color: var(--muted); font-size: var(--fs-small); }
.update-html { margin-top: var(--s-4); font-size: var(--fs-story); line-height: var(--lh-story); overflow-wrap: anywhere; }
.update-html > * + * { margin-top: var(--s-4); }
.update-html h4 { margin-bottom: 0; color: var(--charcoal); font-size: inherit; }
.update-html ul { list-style: disc; padding-left: 1.25em; }
.update-photos { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); margin-top: var(--s-5); align-items: start; }
.update-photos a { min-width: 0; }
.update-photos img { width: 100%; height: auto; border-radius: var(--r-image); }
@media (min-width: 640px) {
  .update-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Avatars ---------- */
.avatar { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--tint); color: var(--red-primary); font-size: var(--fs-xs); font-weight: 700; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-lg { flex-basis: 44px; width: 44px; height: 44px; font-size: var(--fs-small); font-weight: 600; }
.avatar-logo { background: var(--white); border: 1px solid var(--border); }

/* ---------- Organizer ---------- */
.org { margin-top: var(--s-5); display: flex; gap: var(--s-4); align-items: flex-start; }
.org-body { min-width: 0; }
.org-role { margin-top: var(--s-1); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); font-size: var(--fs-xs); line-height: var(--lh-small); font-weight: 600; color: var(--muted); }
.org-text { margin-top: var(--s-1); font-size: var(--fs-small); line-height: 24px; color: var(--muted); }
.org-legal { margin-top: var(--s-5); font-size: var(--fs-micro); line-height: 20px; color: var(--muted); }

/* ---------- Feed (contributions / words of support) ---------- */
.feed-list { margin-top: var(--s-2); }
.feed-item { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-4) 0; border-bottom: 1px solid var(--border-light); }
.feed-item:last-child { border-bottom: 0; }
.feed-meta { flex: 1; min-width: 0; }
.feed-name { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--charcoal); }
.feed-line { margin-top: 2px; font-size: var(--fs-xs); line-height: var(--lh-xs); color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; }
.feed-line .feed-amount { color: var(--charcoal); font-weight: 600; font-variant-numeric: tabular-nums; }
.feed-line .dot { margin: 0 6px; }
.feed-line .link-button { margin-left: var(--s-3); }
.feed-message { margin-top: var(--s-1); font-size: 15px; line-height: 24px; color: var(--gray-dark); }
.feed-empty { padding: var(--s-4) 0; font-size: var(--fs-small); color: var(--muted); }

/* ---------- Accordion ---------- */
.accordion { margin-top: var(--s-4); }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-item h3 { font-weight: 400; }
.accordion-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-5) 0; background: none; border: 0; text-align: left; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--charcoal); cursor: pointer; }
.accordion-trigger:hover { color: var(--red-primary); }
.accordion-icon { position: relative; flex: 0 0 16px; width: 16px; height: 16px; color: var(--muted); transition: transform .2s ease; }
.accordion-icon::before { content: ""; position: absolute; left: 3px; top: 2px; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); border-radius: 1px; }
.accordion-trigger[aria-expanded="true"] .accordion-icon { transform: rotate(180deg); }
.accordion-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.accordion-panel.is-open { grid-template-rows: 1fr; }
.accordion-body { overflow: hidden; min-height: 0; visibility: hidden; transition: visibility 0s .25s; font-size: 15px; line-height: 24px; color: var(--muted); }
.accordion-panel.is-open .accordion-body { visibility: visible; transition-delay: 0s; }
.accordion-body p { padding-bottom: var(--s-5); }

/* ---------- Institutional pages ---------- */
.page-intro { padding: var(--s-10) 0 var(--s-8); border-bottom: 1px solid var(--border); }
.eyebrow { display: block; font-size: var(--fs-micro); line-height: var(--lh-micro); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red-primary); margin-bottom: var(--s-3); }
.page-intro h1 { font-size: clamp(30px, 4.5vw, var(--fs-h1-inst)); }
.lede { margin-top: var(--s-4); font-size: 18px; line-height: 30px; color: var(--muted); max-width: 60ch; }
.page-meta { margin-top: var(--s-3); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--muted); }
.prose { max-width: var(--prose); }
.prose-narrow { max-width: var(--prose-narrow); }
.prose > section { padding: var(--s-8) 0; border-bottom: 1px solid var(--border); scroll-margin-top: var(--s-6); }
.prose > section:last-child { border-bottom: 0; }
.prose h2 { margin-bottom: var(--s-3); }
.prose h3 { margin-top: var(--s-5); margin-bottom: var(--s-2); }
.prose p { margin-top: var(--s-3); }
.prose p:first-child, .prose h2 + p, .prose h3 + p { margin-top: 0; }
.prose ul { list-style: disc; padding-left: 1.25em; margin-top: var(--s-3); }
.prose li + li { margin-top: var(--s-2); }
.prose .lead { font-size: 17px; line-height: 28px; color: var(--charcoal); }
.two-col { display: grid; gap: var(--s-6); }
.steps { counter-reset: step; margin-top: var(--s-5); }
.steps li { position: relative; padding-left: 52px; }
.steps li + li { margin-top: var(--s-5); }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--tint-soft); color: var(--red-primary); font-size: var(--fs-small); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.steps h3 { margin: 4px 0 2px; }
.steps p { margin-top: 0; color: var(--muted); }
.pillars { display: grid; gap: var(--s-5); margin-top: var(--s-5); }
.pillars h3 { margin: 0 0 var(--s-1); }
.pillars p { margin: 0; color: var(--muted); }
.commitments { margin-top: var(--s-4); }
.commitments li { display: flex; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--border-light); font-size: 15px; line-height: 24px; color: var(--gray-dark); }
.commitments li:last-child { border-bottom: 0; }
.commitments svg { flex: 0 0 20px; margin-top: 2px; color: var(--red-primary); }
.contact-block { margin-top: var(--s-5); padding-left: var(--s-4); border-left: 3px solid var(--tint); font-size: 15px; line-height: 24px; color: var(--gray-dark); }
.contact-block strong { color: var(--charcoal); }
.contact-block a { font-weight: 500; }
.note-box { margin-top: var(--s-4); padding: var(--s-3) var(--s-4); border: 1px solid var(--border); border-radius: var(--r-field); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--muted); }
.cta-panel { margin: var(--s-12) 0 var(--s-20); padding: var(--s-6); border: 1px solid var(--border); border-radius: var(--r-card); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); }
.cta-panel h2 { font-size: 20px; line-height: 28px; }
.cta-panel p { margin-top: var(--s-1); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.legal-layout { display: grid; gap: var(--s-8); padding-bottom: var(--s-20); }
.toc { padding: var(--s-4) 0; border-bottom: 1px solid var(--border); }
.toc h2 { font-size: var(--fs-micro); line-height: var(--lh-micro); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-3); }
.toc ol { counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: var(--s-2); padding: 6px 0; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--muted); text-decoration: none; }
.toc a::before { content: counter(toc) "."; color: var(--border-strong); min-width: 1.6em; font-variant-numeric: tabular-nums; }
.toc a:hover, .toc a.is-current { color: var(--charcoal); }
.toc a.is-current { font-weight: 600; }
.toc a.is-current::before { color: var(--red-primary); }
.legal-section h2 { display: flex; gap: var(--s-2); align-items: baseline; }
.legal-section h2 .num { color: var(--red-primary); font-variant-numeric: tabular-nums; }
.form { margin-top: var(--s-5); display: grid; gap: var(--s-4); }
.form label { display: block; font-size: var(--fs-small); font-weight: 600; color: var(--charcoal); }
.form input, .form textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--r-field); font: inherit; font-size: var(--fs-body); color: var(--charcoal); background: var(--white); }
.form input:focus, .form textarea:focus { outline: 2px solid var(--red-primary); outline-offset: 1px; border-color: var(--red-primary); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.form-hint { font-size: var(--fs-xs); line-height: var(--lh-xs); color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--red-primary); color: var(--white); padding-block: var(--s-12) var(--s-6); font-size: var(--fs-small); line-height: var(--lh-small); }
.footer-grid { display: grid; gap: var(--s-8); }
.footer-brand img { height: 52px; width: auto; }
.footer-tagline { margin-top: var(--s-4); max-width: 40ch; color: rgba(255, 255, 255, .85); }
.footer-address { margin-top: var(--s-4); color: rgba(255, 255, 255, .85); }
.footer-address strong { color: var(--white); font-weight: 600; }
.footer-line { margin-top: var(--s-3); color: rgba(255, 255, 255, .7); font-size: var(--fs-xs); }
.footer-heading { font-size: var(--fs-micro); line-height: var(--lh-micro); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--white); margin-bottom: var(--s-3); }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: rgba(255, 255, 255, .92); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid rgba(255, 255, 255, .15); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-6); font-size: var(--fs-micro); line-height: var(--lh-micro); color: rgba(255, 255, 255, .8); }

/* ---------- Donate modal (checkout): sheet com seletor de valores em tickets ---------- */
body.donate-open { overflow: hidden; }
.donate-modal {
  --m-text: #171A1D; --m-text-2: #6B6F74; --m-border: #DADADA; --m-border-subtle: #DADADA; --m-error: #b42318;
  --m-green: var(--red-primary); --m-green-hover: var(--red-dark); --m-focus: var(--red-bright); --m-on-green: #fff; --m-tint: var(--soft); --m-tint-strong: var(--tint); --m-surface: #fff;
  width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: var(--m-surface); color: var(--m-text); overflow-y: auto; overscroll-behavior: contain;
}
.donate-modal[open] { animation: modalFadeIn .22s ease-out both; }
@keyframes modalFadeIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.donate-modal::backdrop { background: rgba(23, 26, 29, .45); backdrop-filter: blur(6px); }
.donate-modal :focus-visible { outline: 3px solid var(--m-focus); outline-offset: 3px; }
.donate-modal-body { padding-bottom: env(safe-area-inset-bottom); }
.sheet-header { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; padding: 12px 12px 0; padding-top: calc(12px + env(safe-area-inset-top)); }
.sheet-header > :first-child { grid-column: 1; }
.sheet-logo { grid-column: 2; justify-self: center; width: auto; height: 28px; }
.sheet-header > :last-child { grid-column: 3; }
.sheet-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--m-text); cursor: pointer; transition: background-color .15s ease; }
.sheet-icon:hover { background: #F2F2F2; }
.sheet-icon:disabled { opacity: .4; cursor: not-allowed; }
.sheet-body { padding: 20px 20px 24px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
#donate-title { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.25; letter-spacing: -0.015em; text-align: center; overflow-wrap: anywhere; color: var(--m-text); }
.donate-remaining { margin: 8px 0 0; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--m-text-2); text-align: center; font-variant-numeric: tabular-nums; }
#checkout-error { margin: 16px 0 0; }
.donation-amounts { min-width: 0; margin: 24px 0 16px; padding: 0; border: 0; }
.donation-amounts legend { margin-bottom: 16px; padding: 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--m-text); }
.amount-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
.amount-btn { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; height: 56px; padding: 0; border: 1px solid var(--m-border); border-radius: 12px; background: var(--m-surface); color: var(--m-text); font-family: inherit; font-size: 17px; font-weight: 700; cursor: pointer; transition: transform .1s ease-out, color .15s ease, background-color .15s ease, border-color .15s ease; }
.amount-btn:hover { border-color: var(--m-green); }
.amount-btn:active { transform: scale(.97); }
.amount-btn[aria-pressed="true"] { background: var(--m-green); border-color: var(--m-green); color: var(--m-on-green); }
.amount-btn:disabled { opacity: .5; cursor: default; }
.amount-btn:disabled:hover { border-color: var(--m-border); }
.amount-btn-custom { padding: 0 8px; font-size: 14px; line-height: 20px; text-align: center; }
.suggested-badge { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); padding: 0 8px; border-radius: 999px; background: linear-gradient(var(--m-tint), var(--m-tint)), #fff; color: var(--m-green); font-size: 12px; font-weight: 700; line-height: 18px; white-space: nowrap; }
.donation-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 80px; padding: 12px 16px; border: 1px solid var(--m-border); border-radius: 16px; color: var(--m-text); font-variant-numeric: tabular-nums; }
.donation-total:focus-within { outline: 3px solid var(--m-focus); outline-offset: 3px; }
.donation-total.is-invalid { border-color: var(--m-error); }
.amount-currency { display: flex; flex-direction: column; font-size: 14px; line-height: 20px; font-weight: 600; }
.amount-currency > :first-child { font-size: 17px; }
.amount-currency > :last-child { color: var(--m-text-2); font-size: 12px; line-height: 18px; }
.amount-number { display: inline-block; font-size: 40px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; text-align: right; }
.amount-custom-input { flex: 1; width: 0; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font-family: inherit; }
.amount-custom-input::placeholder { color: var(--m-text-2); opacity: .6; }
.donate-modal .amount-custom-input:focus-visible { outline: none; }
.amount-help { margin-top: 8px; }
.amount-error { margin-top: 8px; color: var(--m-error); font-size: 14px; line-height: 20px; }
@media (max-width: 359px) { .amount-custom-input { font-size: 26px; } }
@media (min-width: 360px) { .amount-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 640px) {
  .donate-modal { width: calc(100% - 32px); max-width: 560px; height: fit-content; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); margin: auto; border-radius: 20px; box-shadow: 0 24px 80px rgba(23, 26, 29, .24); }
  .sheet-body { padding: 20px 32px 28px; }
}
.checkout-payment-amount { margin: 24px 0 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--m-text-2); text-align: center; }
.checkout-payment-title { margin: 8px 0 16px; font-size: 17px; font-weight: 800; line-height: 1.3; color: var(--m-text); outline: none; }
.payment-methods-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.payment-method-card { background: #fff; border: 2px solid var(--m-border-subtle); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; cursor: pointer; height: 80px; transition: all .2s ease; font-family: inherit; color: var(--m-text); }
.payment-method-card:hover { border-color: var(--m-green); }
.payment-method-card img { width: auto; max-width: 90%; }
#method-mbway img { height: 28px; }
#method-multibanco img { height: 32px; }
.voucher-logo { height: 40px; }
.payment-method-name { font-size: 13px; line-height: 16px; font-weight: 700; }
.payment-method-card[aria-pressed="true"] { border-color: var(--m-green); background: var(--m-tint); }
.form-group { margin-bottom: 12px; }
.form-label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 4px; color: var(--m-text); }
.form-input { width: 100%; height: 44px; border: 1px solid var(--m-border); border-radius: 8px; padding: 0 12px; font-size: .95rem; font-family: inherit; outline: none; background: #fff; color: var(--m-text); }
.form-input:focus { border-color: var(--m-green); }
.form-help { font-size: .78rem; color: var(--m-text-2); margin-top: 3px; line-height: 1.4; }
.modal-submit-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; padding: 0 20px; border-radius: 999px; background: var(--m-green); color: var(--m-on-green); font-size: 16px; font-weight: 700; line-height: 1.25; border: 0; cursor: pointer; margin-top: 20px; font-family: inherit; }
.modal-submit-btn:hover { background: var(--m-green-hover); }
.modal-submit-btn:disabled { opacity: .6; cursor: not-allowed; }
.modal-submit-btn:disabled:hover { background: var(--m-green); }
.modal-submit-lime { background: var(--m-tint-strong); color: var(--m-text); }
.modal-submit-lime:hover { background: var(--gray-light); }
.btn-outline-modal { width: 100%; min-height: 44px; margin-top: 10px; background: #fff; border: 1px solid var(--m-border); border-radius: 999px; font-weight: 700; cursor: pointer; font-family: inherit; color: var(--m-text); }
.alert-error { background: #fde8e8; border: 1px solid #f8b4b4; color: #9b1c1c; padding: 10px 12px; border-radius: 8px; font-size: .88rem; margin-bottom: 12px; line-height: 1.4; }
.checkout-state-screen { text-align: center; padding: 10px 0; }
.checkout-state-screen h3 { font-size: 1.25rem; font-weight: 800; margin: 0 0 8px; line-height: 1.3; outline: none; }
.state-text { font-size: .95rem; color: var(--m-text-2); margin: 0 0 14px; line-height: 1.5; }
.state-note { font-size: .82rem; color: var(--m-text-2); margin: 0 0 16px; line-height: 1.4; }
.voucher-logo { margin: 0 auto 12px; }
.success-heart { font-size: 3rem; margin-bottom: 10px; line-height: 1; }
.success-title { color: var(--m-green); font-size: 1.35rem; }
.mbway-wait-box { background: var(--m-surface); border: 1px solid var(--m-border-subtle); border-radius: 14px; padding: 20px; margin: 14px 0; font-size: .85rem; color: var(--m-text-2); }
.mbway-wait-box p { margin: 0; }
.spinner { width: 44px; height: 44px; border: 4px solid var(--track); border-top-color: var(--m-green); border-radius: 50%; animation: spin .9s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.multibanco-voucher { background: #fff; border: 2px dashed #b7b7b6; border-radius: 12px; padding: 18px; margin: 14px 0; text-align: left; }
.voucher-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: .95rem; }
.voucher-row:last-child { border-bottom: 0; }
.voucher-label { color: var(--m-text-2); font-weight: 600; }
.voucher-val { font-weight: 800; font-size: 1.05rem; letter-spacing: .03em; color: var(--m-text); }
.voucher-val-date { font-size: .92rem; }
.btn-copy-code { background: #f3f3f3; border: 1px solid var(--m-border); border-radius: 6px; padding: 2px 8px; font-size: .75rem; cursor: pointer; font-weight: 700; margin-left: 6px; font-family: inherit; color: var(--m-text); }
.btn-copy-code:hover { background: #e8e8e8; }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } .donate-modal[open] { animation: none; } .amount-btn:active { transform: none; } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: var(--s-6); transform: translate(-50%, 16px); background: var(--charcoal); color: var(--white); padding: var(--s-3) var(--s-5); border-radius: var(--r-pill); font-size: var(--fs-small); box-shadow: var(--shadow-card); opacity: 0; pointer-events: none; z-index: 100; max-width: 92vw; text-align: center; transition: opacity .25s ease, transform .25s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
body.has-sticky-bar .toast { bottom: 96px; }

/* ---------- Breakpoints ---------- */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .share-menu { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr 1fr; gap: var(--s-10); }
  .pillars { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 769px) {
  .campaign { padding-top: var(--s-6); }
  .campaign-photo { margin-inline: 0; max-width: 800px; }
  .carousel { border-radius: var(--r-image); }
  .funding-card { padding: 24px; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 24px rgba(23, 26, 29, .07); }
  .sticky-bar { top: var(--header-h); bottom: auto; padding: 10px 16px 12px; border-top: 0; border-bottom: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0, 0, 0, .06); transform: translateY(-100%); }
  .sticky-bar > * { max-width: var(--container); }
  body.has-sticky-bar { padding-bottom: 0; }
}

@media (min-width: 1024px) {
  .campaign { grid-template-columns: minmax(0, 1fr) var(--sidebar); column-gap: var(--grid-gap); grid-template-areas: "photo card" "head card" "main card"; }
  .campaign-head h1 { margin-top: 16px; }
  .funding-card { position: sticky; top: calc(var(--header-h) + 16px); }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .legal-layout { grid-template-columns: 240px minmax(0, var(--prose-narrow)); gap: var(--s-16); }
  .toc { position: sticky; top: var(--s-8); align-self: start; padding: 0; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .fc-donate, .sticky-bar-donate { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Checkout: telemóvel com +351 fixo, estados inválidos ---------- */
.phone-field { display: flex; align-items: stretch; border: 1px solid var(--m-border); border-radius: 8px; background: #fff; overflow: hidden; }
.phone-field:focus-within { border-color: var(--m-green); }
.phone-prefix { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; background: #F3F4F1; color: var(--m-text-2); font-weight: 600; font-size: .95rem; border-right: 1px solid var(--m-border); user-select: none; white-space: nowrap; }
.phone-flag { display: block; border-radius: 2px; }
.phone-field .form-input { border: 0; border-radius: 0; flex: 1; min-width: 0; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.phone-field .form-input:focus { border: 0; }
.form-input-invalid, .phone-field:has(.form-input-invalid) { border-color: #C62828 !important; }
.form-input[aria-invalid="true"] + .form-help { color: #C62828; }
