/* Donate page only. Loads after styles.css and css/shared.css, so it may only ADD selectors.
 * Everything here is prefixed with a page-specific class (.give, .where, .receipt, .story-band,
 * .cta-band, .gtile, .alloc, .pay) or scoped under one, so nothing on another page can move.
 *
 *   1. hero trust card      the four-line card over the hero photograph
 *   2. the module shell     .give__wrap / .give__panel / .give__aside
 *   3. frequency toggle     the sliding thumb on the One-time / Monthly radios
 *   4. amount tiles         .gtiles / .gtile with the illustrative impact line
 *   5. allocation chooser   .allocs / .alloc radio cards + the campaign select
 *   6. fund panel           where the chosen gift actually lands
 *   7. gift total + recap   the running summary, shown on every step
 *   8. payment step         .pay, clearly marked simulated
 *   9. where it goes        .where grid around the donut
 *  10. receipt + story + CTA
 */

/* ================================================================== 1. Hero trust card */
.phero__card--trust { max-width: 320px; gap: 12px; }
.phero__card--trust .trust__head { grid-column: 1 / -1; margin: 0; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.phero__card--trust .phero__stat strong { font-size: .95rem; font-weight: 800; letter-spacing: 0; }
.phero__card--trust .phero__stat span span { font-size: .74rem; }
@media (max-width: 899px) {
  .phero__card--trust { max-width: none; }
}

/* ================================================================== 2. The module shell */
.give { scroll-margin-top: var(--header-h); padding-top: clamp(28px, 3.2vw, 52px); }
.give__wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap-lg); align-items: start; }
.give__panel { background: var(--warm-white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(20px, 2.6vw, 34px); min-width: 0; }
.give__head h2 { margin: 0 0 10px; font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.4rem); }
.give__lede { color: var(--muted); margin: 0 0 24px; max-width: 58ch; }
.give__form { min-width: 0; }
.give__stepper { margin-bottom: 26px; }
.give__preset { margin-bottom: 18px; }
.give__preset strong { color: var(--forest); }

.give__aside { display: grid; gap: 18px; min-width: 0; align-self: start; }
@media (min-width: 1200px) { .give__aside { position: sticky; top: calc(var(--header-h) + 20px); } }
.give__aside-img { width: 100%; aspect-ratio: 4 / 3; max-height: 360px; object-fit: cover; border-radius: var(--radius-lg); background: var(--sage); }
.give__why { padding: 22px 24px; }
.give__why > p { margin-bottom: 16px; }
.give__why-list { list-style: none; display: grid; gap: 14px; margin: 0 0 6px; }
.give__why-list li { display: flex; gap: 12px; align-items: flex-start; }
.give__why-list .disc { width: 38px; height: 38px; }
.give__why-list .disc .icon { width: 19px; height: 19px; }
.give__why-list strong { display: block; font-size: .92rem; color: var(--forest); }
.give__why-list small { display: block; font-size: .82rem; color: var(--muted); line-height: 1.4; }

.give__year { padding: 20px 22px; }
.give__year h3 { margin-bottom: 12px; }
.give__year-facts { list-style: none; display: grid; gap: 0; margin: 0 0 12px; }
.give__year-facts li { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--sage-3); font-size: .88rem; color: var(--muted); }
.give__year-facts li:last-child { border-bottom: 0; }
.give__year-facts strong { font-size: 1.05rem; font-weight: 800; color: var(--forest); font-variant-numeric: tabular-nums; white-space: nowrap; }
.give__year > p:last-child { margin: 0; }

@media (max-width: 1399px) { .give__wrap { grid-template-columns: minmax(0, 6.8fr) minmax(0, 5.2fr); } }
@media (max-width: 1099px) {
  .give__wrap { grid-template-columns: 1fr; }
  .give__aside-img { aspect-ratio: 16 / 9; max-height: 300px; }
}

/* ================================================================== 3. Frequency toggle
   Real radios (so the choice still posts with scripts off) wearing the sliding thumb that
   styles.css already draws from --seg-x / --seg-w. The checked pill's own fill is switched
   off here, or the thumb and the pill would both paint the same shape. */
.give__seg { width: 100%; max-width: 340px; }
.give__seg .seg__opt { flex: 1; text-align: center; }
.give__seg .seg__opt span { padding: 10px 16px; }
.give__seg.has-thumb .seg__opt input:checked + span { background: transparent; color: var(--white); }
.give__seg.has-thumb .seg__opt:hover span { background: transparent; }
.give__seg.has-thumb .seg__opt:not(:has(input:checked)):hover span { background: var(--sage-2); color: var(--forest); }

/* ================================================================== 4. Amount tiles */
.gtiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gtile { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 10px; row-gap: 6px; align-items: start; text-align: left; width: 100%; height: 100%; font: inherit; color: var(--ink); cursor: pointer; background: var(--white); border: 2px solid var(--line-2); border-radius: var(--radius-sm); padding: 13px 13px 14px;
  transition: border-color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.gtile__amt { grid-column: 1 / -1; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; color: var(--forest); font-variant-numeric: tabular-nums; line-height: 1.1; }
.gtile__per { font-size: .72rem; font-weight: 700; letter-spacing: 0; color: var(--muted); margin-left: 5px; }
.gtile__icon { width: 32px; height: 32px; border-radius: 9px; background: var(--sage); color: var(--leaf); display: grid; place-items: center; }
.gtile__icon .icon { width: 17px; height: 17px; }
.gtile__body { min-width: 0; }
.gtile__line { display: block; font-size: .8rem; line-height: 1.35; color: var(--muted); }
.gtile__tag { display: block; margin-top: 4px; font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gtile:active { transform: scale(.98); transition-duration: 80ms; }
.gtile[aria-pressed="true"] { border-color: var(--leaf); background: var(--sage-2); box-shadow: inset 0 0 0 1px var(--leaf); }
.gtile[aria-pressed="true"] .gtile__icon { background: var(--leaf); color: var(--white); }
@media (hover: hover) and (pointer: fine) { .gtile:hover { border-color: var(--leaf); } }
.give__custom { margin-top: 16px; }
.give__custom .input-rupee { max-width: 320px; }

/* ================================================================== 5. Allocation chooser */
.give__alloc { margin-top: 26px; }
.allocs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.alloc { position: relative; display: block; min-width: 0; }
.alloc--wide { grid-column: 1 / -1; }
.alloc input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.alloc__body { display: flex; gap: 11px; align-items: flex-start; height: 100%; background: var(--white); border: 2px solid var(--line-2); border-radius: var(--radius-sm); padding: 12px 14px;
  transition: border-color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.alloc__icon { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--sage); color: var(--leaf); display: grid; place-items: center; }
.alloc__icon .icon { width: 17px; height: 17px; }
.alloc__text { min-width: 0; }
.alloc__text strong { display: block; font-size: .95rem; color: var(--forest); line-height: 1.25; }
.alloc__text small { display: block; font-size: .78rem; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.alloc input:checked + .alloc__body { border-color: var(--leaf); background: var(--sage-2); box-shadow: inset 0 0 0 1px var(--leaf); }
.alloc input:checked + .alloc__body .alloc__icon { background: var(--leaf); color: var(--white); }
.alloc input:focus-visible + .alloc__body { outline: 3px solid var(--leaf); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .alloc:hover .alloc__body { border-color: var(--leaf); } }
.give__campaign { margin-top: 12px; }
.give__campaign select { max-width: 460px; }

/* ================================================================== 6. Fund panel */
.give__fund { margin-top: 18px; padding: 16px 18px; }
.give__fund-head { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 800; color: var(--forest); font-size: .98rem; }
.give__fund-head .icon { color: var(--leaf); flex: none; }
.give__fund-text { margin: 0 0 10px; font-size: .86rem; color: var(--muted); }
.give__fund .bar { background: var(--white); margin-bottom: 8px; }
.give__fund-meta { margin: 0; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.give__fund-meta strong { color: var(--forest); }

/* ================================================================== 7. Gift total and recap */
.give__total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 20px; margin-top: 26px; padding: 18px 22px; background: var(--forest); border-radius: var(--radius); }
.give__total-copy { margin: 0; min-width: 0; }
.give__total-label { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--yellow); }
.give__total-amt { display: block; font-size: clamp(1.8rem, 1.3rem + 1.2vw, 2.4rem); font-weight: 800; line-height: 1.1; letter-spacing: -.025em; color: var(--white); font-variant-numeric: tabular-nums; }
.give__total-sub { display: block; font-size: .85rem; color: var(--on-dark); overflow-wrap: anywhere; }
.give__total .btn { flex: none; }
.give__total :focus-visible { outline-color: var(--yellow); }
.give__secure { display: flex; gap: 9px; align-items: flex-start; margin: 12px 0 0; font-size: .8rem; color: var(--muted); }
.give__secure .icon { flex: none; margin-top: 2px; color: var(--leaf); }
.give__secure strong { color: var(--forest); }

.give__recap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 22px; padding: 13px 16px; background: var(--sage-2); border: 1px solid var(--sage-3); border-radius: var(--radius-sm); }
.give__recap-amt { font-size: 1.15rem; font-weight: 800; color: var(--forest); font-variant-numeric: tabular-nums; }
.give__recap-to { flex: 1 1 auto; min-width: 0; font-size: .86rem; color: var(--muted); }
.give__recap-edit { font-size: .84rem; font-weight: 700; flex: none; padding-block: 4px; }
.give__sum-title { margin: 22px 0 10px; }

/* ================================================================== 8. Payment step */
.pay { border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream); padding: 18px 20px; margin-bottom: 4px; }
.pay__flag { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; font-size: .86rem; color: var(--muted); }
.pay__flag .icon { flex: none; margin-top: 2px; color: var(--leaf); }
.pay__flag strong { color: var(--forest); }
.pay__methods { display: flex; flex-wrap: wrap; gap: 8px; }
.pay .field:last-child { margin-bottom: 0; }

/* styles.css lets .form__note wrap, which on a line this long drops the text under the icon */
.give__form .form__note > span:not(.form__demo) { flex: 1 1 220px; min-width: 0; }

/* the confirmation panel core.js inserts sits in the same column as the form */
.give__panel .confirm { padding: 0; border: 0; background: transparent; }
.give__panel .confirm + * { margin-top: 0; }

/* ================================================================== 9. Where your donation goes */
.where__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); gap: var(--gap-lg); align-items: center; }
.where__copy h2 { margin-bottom: 14px; }
.where__copy p { color: var(--muted); }
.where__copy .btn { margin-top: 6px; }
.where__chart { padding: clamp(18px, 2.2vw, 28px); }
.where__note .card { padding: 20px 22px; }
.where__note p { margin: 0 0 16px; color: var(--muted); }
@media (max-width: 1199px) {
  .where__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .where__copy { grid-column: 1 / -1; }
}
@media (max-width: 767px) { .where__grid { grid-template-columns: 1fr; } }

/* ================================================================== 10. Receipt, story, CTA */
.receipt__copy .disc { margin-bottom: 16px; }
.receipt__copy h2 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem); }
.receipt__copy > p { color: var(--muted); }
.receipt__copy .notice { margin: 18px 0; }
.receipt__trans-title { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); margin: 0 0 10px; color: var(--forest); }
.receipt__trans > p { margin-bottom: 20px; }
.receipt__trans .tiles-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 479px) { .receipt__trans .tiles-mini { grid-template-columns: 1fr; } }

.story-band { position: relative; overflow: hidden; }
.story-band__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.story-band__media { align-self: stretch; background: var(--forest-2); }
.story-band__media img { width: 100%; height: 100%; min-height: 330px; object-fit: cover; }
.story-band__copy { padding: clamp(36px, 4.4vw, 68px) clamp(24px, 3.4vw, 64px); max-width: 62ch; }
.story-band__copy h2 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); margin-bottom: 14px; }
.story-band__copy .btn { margin-bottom: 16px; }
.story-band__copy > p:last-child { margin-bottom: 0; }
@media (max-width: 899px) {
  .story-band__inner { grid-template-columns: 1fr; }
  .story-band__media img { min-height: 0; aspect-ratio: 16 / 9; }
}

.cta-band__inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap-lg); align-items: center; }
.cta-band__inner h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); max-width: 18ch; margin-bottom: 12px; }
.cta-band__inner > div > p { max-width: 52ch; margin: 0; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
@media (max-width: 899px) {
  .cta-band__inner { grid-template-columns: 1fr; }
  .cta-band__actions { justify-content: flex-start; }
}

/* ================================================================== narrow viewports */
/* Three tiles only fit while the form column is wide. Below that the row drops to two, so the
   impact line never breaks into four-word slivers. */
@media (max-width: 1279px) {
  .gtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  /* on a phone the tile is only ~155px wide, so the icon column would squeeze the impact line
     into four words a row: the line takes the whole tile instead and the icon steps aside */
  .gtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gtile { grid-template-columns: minmax(0, 1fr); row-gap: 4px; padding: 12px 12px 13px; }
  .gtile__icon { display: none; }
  .gtile__amt { font-size: 1.15rem; }
  .gtile__line { font-size: .78rem; }
  /* four labels across a 390px screen squeezes "Confirmation" out of its tile, so the rail
     becomes a 2x2 grid and each step gets its number and its whole word on one line */
  .give__stepper { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .give__stepper li { flex-direction: row; text-align: left; padding: 10px 12px; font-size: .8rem; }
  .give__panel { padding: 18px 16px 22px; border-radius: var(--radius); }
  .give__total { padding: 16px; }
  .give__total .btn { width: 100%; }
  .give__seg { max-width: none; }
  .allocs { grid-template-columns: 1fr; }
  .give__recap { gap: 4px 10px; }
  .give__recap-to { flex-basis: 100%; }
}
@media (max-width: 359px) {
  .gtiles { grid-template-columns: 1fr; }
}
