  /* ── Scope ───────────────────────────────────────────────────────────────
     The real donate page no longer has a shadow root. Therefore this file and
     the website's own static/site/site.css share one namespace. Two rules keep
     them apart. Both rules control what THIS file reaches out to. site.css
     reaching into the form is the purpose of the change.

       1. A class in this file is either the form's own (.calc, .amount-grid,
          .impact, .tip-*, .pmt-*) or the site's, used as site.css defines it
          (.btn, .input, .label, .select, .textarea, .hint, .badge). A class
          must never be a THIRD thing with a name that site.css has already
          given to something else. The order the stylesheets load then decides
          which rule wins, and that is not a design.

          This rule used to read "none of them appears in site.css", and three
          of them did. `.split` was the one somebody saw. The .split class in
          site.css is a two-column grid, so a donor who chose "split my
          donation" saw the charity list in two columns.
          tests/test_stylesheets.py now checks this, instead of this comment
          stating it.
       2. Anything that is NOT a class has the .eaa-form prefix. This covers
          the reset and the bare element rules under it. Without the prefix,
          `* { margin: 0 }` would remove the spacing from every page that
          loaded this file, which on the website is every page.

     The long-term direction is the opposite. As site.css primitives (.btn,
     .card, .input) replace the form's components, rules leave this file and do
     not come back. */
  /* The form used to have its own palette here: sixteen tokens, its own teal,
     its own greys and its own shadows. site.css already gives a value for each
     one. Two answers to "what colour is the brand?" is one too many. The form's
     teal was #0a7378 and the brand's teal is #0c869b, so the form nearly
     matched the site it sat on, but not exactly. The palette is gone, and every
     rule below uses the site's tokens.

     Two tokens stay, because the design system has no value for them yet. Each
     one has a name instead of a repeated hex value, so there is one place to
     change it. */
  .eaa-form {
    display: block;
    /* This is the colour of the figure on the teal-700 impact panel. It must
       be lighter than the panel, and it must differ from the white text beside
       it. site.css has no semantic token for an accent on a dark band. Its
       accent is bronze, which is for warm light bands. Therefore this token
       points directly at one step of the teal ramp.

       It is --teal-100 and not --teal-200, because it is the lighter of the
       two. The small links and labels in the panel use this colour too, so
       they need 4.5:1, not only the 3:1 for large text. On the panel's 80%
       ground over white, which is the worst case, teal-100 measures 3.3:1 and
       teal-200 measures 2.7:1. Neither meets 4.5:1. See .impact::before. */
    --impact-accent: var(--teal-100);
    /* site.css has --color-danger, but it has no light version of it to put
       behind text. */
    --error-soft: #fee2e2;
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: var(--leading-normal);
  }
  .eaa-form, .eaa-form * { box-sizing: border-box; }
  /* The reset must not change a site component. `.eaa-form *` and `.input` have
     the same specificity, and this file loads second. Therefore `padding: 0`
     won. Every .input, .select, .textarea and .btn in the form lost its
     padding, and the donate button became 18px tall. An element that uses a
     site.css class must keep what site.css gives it.

     The :not() is inside a :where(), so it adds no specificity of its own.
     Without the :where(), the reset was stronger than a single class. The
     form's OWN components, .amount-card and .choice, then lost their padding
     instead.

     It resets padding only. site.css already sets `* { margin: 0 }`, and every
     shell loads site.css. That rule has no specificity, so a spacing class
     such as .mt-4 still wins over it. A `margin: 0` here had the specificity of
     one class and came later, so it cancelled every .mt-4 and .mb-4 in the
     form. */
  .eaa-form,
  .eaa-form *:where(:not(.btn, .input, .select, .textarea, .label, .hint, .badge, .callout)) {
    padding: 0;
  }
  .eaa-form button { font-family: inherit; cursor: pointer; }
  .eaa-form input, .eaa-form select, .eaa-form textarea { font-family: inherit; }

  /* ── The donate band ─────────────────────────────────────────────────────
     The band is brand teal, with the selected charity's photograph in the top
     right corner. Thus the person the donation reaches is behind part of the
     decision, but not behind all of it. When the donor changes charity, the
     form writes the picture into --charity-photo-a or --charity-photo-b. There
     are two properties, so that one picture can fade over the other. Not every
     charity has a photograph. With no photograph the band is plain, which is
     what the impact panel used to do.

     The photograph is a pseudo-element, not a background layer on the band.
     There is one reason. The photograph must fade out on its left side and its
     lower side, and a fade needs a mask. A mask on the band itself would fade
     the form as well. A fade painted as another background layer can only be
     sized against the band, and the band is as tall as the form. The same
     gradient would then be correct at one height and wrong at every other
     height. On the pseudo-element, each percentage is a percentage of the
     photograph. */
  .donate-band {
    position: relative;
    /* This makes the band a stacking context. The z-index: -1 below then puts
       the photograph between the band's own background and its content.
       Without this, the photograph would go behind the background-color and
       nobody would see it. */
    isolation: isolate;
    /* The photograph hangs below a sticky box that has no height. At the foot
       of the band, the photograph would therefore cover part of the white
       section below it. Use `clip`, NOT `hidden`. `hidden` makes a scroll
       container, and a scroll-clipping ancestor cancels position:sticky. That
       would stop both the photograph and the impact panel working. `clip` only
       clips. */
    overflow: clip;
    background-color: var(--donate-band-bg);
    background-image: var(--donate-band-ground);
    /* This leaves space under the form card, so that the band does not end at
       the Continue button. */
    padding-bottom: clamp(72px, 9vw, 160px);
  }

  /* This is the foot of the band. The photograph stays at the top of the
     screen. Therefore the band always ends part way down the picture, and that
     looked like a horizontal cut through the middle of a photograph. This rule
     fades the last part of the band back to the page's own background. Thus the
     picture ends smoothly instead of stopping.

     This is an ::after, not another background layer on the band, because it
     must paint OVER the photograph. It has the same z-index as .donate-photo
     and comes later in the document, and that is what puts it on top. */
  .donate-band::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 0;
    right: 0;
    bottom: 0;
    height: clamp(180px, 26vh, 320px);
    /* This fades in the band's own background. It is not a gradient of one
       colour, because the background is not one colour. It runs from a tint on
       the left into white. A flat fade to the tint would have put tint over the
       white side.

       The rule repeats the background here, which puts it in exactly the same
       place. This is the easy case: the background is a horizontal gradient
       only, so it is the same at every height and nothing must line up
       vertically.

       A mask does the fade. A background of one flat colour could fade its own
       colour instead. In a browser with no mask support, this comes out as a
       block of the background with a hard edge. That is worse than the fault it
       replaces. The photograph above it already needs a mask to have an edge at
       all, so this adds no new requirement. */
    background-color: var(--donate-band-bg);
    background-image: var(--donate-band-ground);
    mask-image: linear-gradient(180deg, transparent 0%, #000 82%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 82%);
  }

  /* This box has no height. It stays at the top of the screen for as long as
     the band is on screen. It uses position:sticky, so the browser holds it in
     place and no script watches the scroll. The picture hangs below this box,
     which is why the box itself must take up no height. */
  .donate-photo {
    position: sticky;
    z-index: -1;
    top: var(--sticky-top);
    height: 0;
  }
  /* This is the frame of the picture. It sets the position, the size and the
     fade at the edges. The two photographs are this element's ::before and
     ::after, and they fill it.

     THE MASK IS HERE, ON THE FRAME, AND THAT IS THE ONLY REASON FOR THE EXTRA
     ELEMENT. The mask used to be on each of the two picture layers. That made a
     visible jump at the end of every cross-fade. The gradient runs from 25% to
     60%, so the mask is partly transparent over most of the picture. Where a
     layer is masked to `m`, whatever is under it shows through at `1 - m`.
     Thus the outgoing photograph was still visible across the whole fade area
     after the incoming photograph had fully arrived. Removing the outgoing
     layer at that moment was a sudden change on screen.

     A mask on the frame applies one time, to the two layers after the browser
     composites them. Under that mask the layers are plain opaque rectangles.
     Therefore the front layer at full strength covers the back layer
     completely, and the browser can remove the back layer with no visible
     change.

     One radial gradient from the top right corner does both fades. It is opaque
     at the corner and fully transparent before the left edge and the lower
     edge. Two masks, one for each side, would need `mask-composite: intersect`
     to avoid a hard edge in an L shape, and Safari spells that property
     differently.

     The numbers are calculated, not chosen by eye. The purpose is that no edge
     of the photograph is visible as an edge. The radii are 1.6 times the box.
     The furthest point of the left and lower edges is then at 0.62 of the
     gradient. That value is sqrt(1 + 0.25) / 1.6, which is the middle of the
     left edge. Therefore the last stop is at 0.60, and each of those edges is
     fully transparent before the box ends. Only the top edge is hard, and the
     top edge is either the top of the band or the top of the screen.

     In a browser with no mask support, the photograph shows with a hard edge.
     That is the correct way to fail. */
  .donate-photo-frame {
    position: absolute;
    top: 0;
    right: 0;
    /* This is one number, and it is a proportion of the screen, not a size. On
       a large monitor the picture used to come out at 1020px on a 1920px
       screen, from a width of 74% with a maximum of 1020px. 53.125% is that
       same composition, held at every screen width instead of at one width.
       Below the maximum, the picture used to GROW as a share of the screen
       while the window became narrower. That is the wrong way round: a narrower
       window has less room to give to a photograph.

       The aspect-ratio applies the same rule to the height. Thus the whole
       picture is the same fraction of the screen at 1100px as at 2560px. */
    width: 53.125%;
    aspect-ratio: 4 / 3;
    mask-image: radial-gradient(160% 160% at 100% 0%, #000 25%, transparent 60%);
    -webkit-mask-image: radial-gradient(160% 160% at 100% 0%, #000 25%, transparent 60%);
  }

  /* There are TWO picture layers, not one, because the picture changes. The
     donor selects a different charity, and a different photograph must arrive.
     A change to one element's background-image is an instant cut. An instant
     cut between two photographs, on a band the donor is not looking at, looks
     like a fault.

     Therefore each layer has its own variable, --charity-photo-a and
     --charity-photo-b. The controller writes the new picture into the variable
     of the layer that is NOT visible. It then adds or removes `.photo-b` on the
     form. One of the two layers is always the front layer, and the front layer
     is the one that fades in.

     The transition on the back layer is what makes this a cross-fade and not a
     dip. `0s linear var(--duration-slow)` holds the back layer at full strength
     for exactly as long as the new picture needs to fade in over it. Only then
     does the browser remove it. If both layers faded at the same time, both
     would be at half strength in the middle of the fade. Half of one photograph
     over half of another shows the band between them, so the picture becomes
     pale and then recovers. With this rule, nothing is ever covered by
     something that has not arrived yet. */
  .donate-photo-frame::before,
  .donate-photo-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0s linear var(--duration-slow);
    background-position: center, center 30%;
    background-repeat: no-repeat;
    background-size: cover, cover;
  }
  .donate-photo-frame::before { background-image: var(--donate-band-wash), var(--charity-photo-a, none); }
  .donate-photo-frame::after  { background-image: var(--donate-band-wash), var(--charity-photo-b, none); }
  /* This is the front layer. It is on top and it fades in. The `.photo-b` class
     says which layer is in front. With no class, layer A is in front. That is
     the state the form starts in, and it is why the first photograph fades in
     over the plain band. */
  .eaa-form:not(.photo-b) .donate-photo-frame::before,
  .eaa-form.photo-b .donate-photo-frame::after {
    opacity: 1;
    z-index: 1;
    transition: opacity var(--duration-slow) var(--ease);
  }
  /* On a phone the picture takes the whole width of the top of the band, and it
     fades downward only. The corner fade needs space to the left for the
     picture to fade into. A 400px screen has no such space, and the same
     gradient removed all of the picture except one corner. With one direction
     to fade in, a plain linear gradient is enough. The left and right edges of
     the picture are the edges of the screen. */
  @media (max-width: 1040px) {
    .donate-photo-frame {
      width: 100%;
      mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
      -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
      /* This keeps the blurred layers below inside this box. Use `clip`, not
         `hidden`. The reason on the band applies here as well: `hidden` makes a
         scroll container, and this element is inside the sticky box that
         carries the picture. */
      overflow: clip;
    }
    /* The blur applies to narrow screens only. Above the breakpoint the
       picture is a small part of the top right corner with no text over it, so
       it must look like a photograph. Below the breakpoint the picture is the
       full width of the top of the band, with the heading and the introduction
       over it. The blur is what makes that text readable. It removes the fine
       detail, so no letter sits half on a bright area and half on a dark one.

       For a short time the blur changed with the screen width: none at 1920px
       and the full 9px at 1040px. The purpose was to give each window width the
       amount of blur it needed. That idea is reasonable, but it was wrong here.
       It put four or five pixels of blur on a 1400px laptop, which is the most
       common desktop width, to smooth text that is nowhere near the picture at
       that width. The blur exists for the narrow layout, so it belongs to the
       narrow layout. The step at the breakpoint is acceptable, because the
       shape of the picture steps there in any case: a corner detail above the
       breakpoint, and the whole top of the band below it.

       The bleed stops the blur showing its own edges. A blur samples outside
       the box and finds nothing there, so the picture would fade out along its
       top and sides as a pale halo. The rule makes the layers larger than the
       frame, and the frame clips them. That puts the soft edge outside the area
       the browser paints. 28px is three times the radius, which is past the
       point where a Gaussian blur of this width adds anything. */
    .donate-photo-frame::before,
    .donate-photo-frame::after {
      inset: -28px;
      filter: blur(9px);
    }
  }
  .eaa-form {
    /* This is how far down the screen a sticky element must start. It is the
       height of the host page's fixed header, or 0 where the host page has no
       header. Everything that sticks to the TOP reads it. That is the
       photograph. Thus a host page
       states one time where its own header ends.

       0 is the correct default for a page with no header. form.html sets this
       value from site.css's --header-height.
       Without it, the top 80px of the photograph sat
       under the site's navigation bar. */
    --sticky-top: 0px;
    /* This is the colour of the band. It is one declaration, because three
       things must use the same value: the band, the fade at the foot of the
       band, and the wash over the photograph.

       The value is white, and the warm tint goes on top of it, not under it.
       Thus the right-hand side of the band, where the photograph is, ends on
       the page's own background. The picture's mask then fades the photograph
       into white, and there is nothing for the edge of the mask to show
       against.

       Two stronger colours came before this one. The site's full warm off-white
       needed white added at a corner, or the join into the white page below
       looked like two blocks pushed together. The faint tint that replaced it
       still put a colour behind the photograph, which the mask then showed. */
    --donate-band-bg: var(--white);
    /* This is the layer over the band colour. It is the faintest warm tint in
       the design system. It is at full strength on the left and is gone two
       thirds of the way across. It runs in the same direction as the page: the
       heading, the introduction and the form all start on the left, and the
       photograph is on the right. Thus the band carries its colour where the
       text is, and it is white where the picture must fade into it.

       The gradient is horizontal only, which is what makes it cheap to paint. A
       gradient with no vertical component is the same at every height.
       Therefore it does not matter that the band is as tall as the donor has
       made the form, and the foot fade above can repeat it with no geometry to
       match. */
    --donate-band-ground: linear-gradient(
      90deg,
      var(--color-surface-soft) 0%,
      color-mix(in srgb, var(--color-surface-soft) 40%, transparent) 38%,
      transparent 66%);
    /* This wash goes over the photograph, not over the band. It is painted in
       the band's own colour. Thus the picture fades into the band instead of
       sitting on it as a separate panel, and the heading over it stays
       readable. On a phone the photograph is the full width of the top of the
       band, and the h1 is on top of it.

       This was a dark teal wash while the band was dark, for the same reason in
       the other direction. Change the band and this wash follows it. That is
       why the rule names the token instead of a colour. */
    --donate-band-wash: linear-gradient(
      180deg,
      color-mix(in srgb, var(--donate-band-bg) 45%, transparent) 0%,
      color-mix(in srgb, var(--donate-band-bg) 28%, transparent) 45%,
      color-mix(in srgb, var(--donate-band-bg) 55%, transparent) 100%);
    /* The strong wash. A phone uses it on the band, for the reason below, and
       the thank-you screen uses it at every width. */
    --donate-band-wash-strong: linear-gradient(
      180deg,
      color-mix(in srgb, var(--donate-band-bg) 86%, transparent) 0%,
      color-mix(in srgb, var(--donate-band-bg) 79%, transparent) 45%,
      color-mix(in srgb, var(--donate-band-bg) 89%, transparent) 100%);
  }
  /* The wash is stronger on a narrow screen. There the heading and the
     introduction are ON the picture, not beside it, because the photograph is
     the full width of the top of the band. On a wide screen the picture is in
     the right-hand corner with the text clear of it, so the wash only has to
     settle the picture into the band. Here the wash must also hold dark text
     over any bright part of the photograph.

     This block must come after the block above, and not inside the mask's own
     media query. The selectors and their specificity are the same, so the
     order in the file decides which rule wins. */
  /* The wash does NOT change gradually with the screen width, as the blur once
     did. Plain CSS cannot do that, because you cannot calculate a percentage
     from a viewport width. The wash steps at the breakpoint. The shape of the
     picture steps there in any case: above the breakpoint the picture is a
     corner detail with no text on it, and below it the picture is the whole top
     of the band with the heading on top.

     The wash and the blur do two different jobs. The wash makes the whole
     picture lighter, which separates all of it from the dark text. The blur
     removes the local variation, so no bright edge is left for a letter to sit
     half on. Both are much stronger at phone width, and together they change
     what the picture IS. On a wide screen it is a photograph of the person the
     donation reaches. On a phone, with a wash near 85% and nine pixels of blur,
     it is atmosphere behind a heading. It shows the shape of a person, in the
     colours of the place, and you could not describe it as a picture. That is
     the correct choice, because the alternative is a heading on top of a
     face. */
  @media (max-width: 1040px) {
    .eaa-form { --donate-band-wash: var(--donate-band-wash-strong); }
  }

  /* This is aligned to the left and is the same width as .calc-wrap below it.
     Thus the heading starts at the left edge of the form card, and it does not
     sit over the card. */
  .form-hero { max-width: 720px; margin: 0 auto; padding: 80px 18px 28px; color: var(--color-text); }
  .form-hero h1 { font-family: var(--font-heading); font-size: var(--text-5xl); font-weight: var(--weight-bold); letter-spacing: var(--tracking-tight); line-height: var(--leading-tight); }
  .form-hero h1 em { font-style: normal; background: linear-gradient(180deg, transparent 62%, color-mix(in srgb, var(--color-accent) 35%, transparent) 62%); padding: 0 4px; }
  /* This holds the text to a readable line length. On a wide screen the band is
     1140px wide. */
  .form-hero-lede { max-width: 62ch; margin-top: 14px; font-size: var(--text-base); line-height: var(--leading-normal); color: var(--color-text-muted); }
  /* The (i) icon is at the end of the sentence it explains. Therefore it must
     not move onto a line of its own. */
  .form-hero-info { display: inline-flex; vertical-align: -0.15em; margin-left: 6px; color: inherit; }
  .form-hero-info .icon { width: 1.1em; height: 1.1em; }
  .form-hero-info:hover { color: var(--color-primary); }
  /* The introduction is supporting text under a large heading. At 18px on a
     phone it takes four or five lines, and it then competes with the h1. */
  @media (max-width: 600px) {
    .form-hero { padding: 52px 18px 20px; }
    .form-hero-lede { font-size: var(--text-sm); }
  }

  .calc-wrap { max-width: 720px; margin: 36px auto 0; padding: 0 18px; }

  /* ── The two columns ─────────────────────────────────────────────────────
     The narrow layout is the default. It is one column, and the script moves
     the impact panel into the form card (placeImpactPanel()). A min-width
     query below adds the wide layout. Thus nothing on a phone depends on a
     rule written for a desktop.

     .calc-aside uses display:contents, so that the question card in it can be
     ordered after the form by .calc-grid's flex `order`. */
  /* This is a flex column, not a plain block, so that `order` works. The
     sidebar comes first in the markup (see form.html), and the question card
     must end up after the form, not between the impact panel and the form. */
  .calc-grid { display: flex; flex-direction: column; }
  .calc-aside { display: contents; }
  .calc { order: 1; }
  .aside-card { order: 2; }
  /* This is the site embed, which is an iframe in the real /donate/ page. The
     host card supplies the heading and the padding. Therefore hide the form's
     own hero and let the form fill the column. */
  .eaa-form.site-embed .form-hero { display: none; }
  .eaa-form.site-embed .calc-wrap { max-width: none; margin-top: 0; padding: 0; }
  /* The host card supplies the surface, the border, the shadow AND the rounded
     corners, through overflow:hidden. Removing the form's own versions stops
     the look of a box inside a box. It also removes the thin white line that
     the form's own 18px radius left at the top corners of the card. The
     simulator sets the card's padding to zero to match. */
  .eaa-form.site-embed .calc { border: 0; box-shadow: none; border-radius: 0; }

  /* ── Embedded-only treatment ──────────────────────────────────────────
     The host page used to insert these rules into the shadow root. That worked
     only because both were on the same web address. An embed from a different
     origin could not reach in, and the form would then have shown its
     standalone styles inside the site. The rules are here now, so the form
     styles itself and the host page needs no access. */
  /* Make the gap between sections smaller. */
  .eaa-form.site-embed .calc-section { padding-top: 16px; padding-bottom: 16px; }
  /* Keep the space at the top of the step. */
  .eaa-form.site-embed #step-1 > .calc-section:first-child { padding-top: 30px; }
  @media (max-width: 540px) {
    .eaa-form.site-embed #step-1 > .calc-section:first-child { padding-top: 24px; }
  }
  /* "Multiply your impact" has no card in an embed. The card's 16px of inner
     padding moved the two tip buttons 17px to the right of the amount cards
     above. With the card gone, they line up on the form's one left edge, and
     the heading becomes one of the section labels rather than a card
     heading. */
  .eaa-form.site-embed .tip-feature,
  .eaa-form.site-embed .tip-feature.is-open {
    border: 0; box-shadow: none; background: transparent; padding: 0; border-radius: 0;
  }
  .eaa-form.site-embed .tip-feature-title {
    font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--color-heading);
  }
  .eaa-form.site-embed .tip-feature-head { gap: 5px; }
  .eaa-form.site-embed .tip-feature-sub { font-size: 12px; }
  .eaa-form.site-embed .impact { border-radius: 0; }
  /* Use `clip`, NOT `hidden`. Both clip the children to the rounded corners,
     which is the purpose of this rule. `hidden` also makes a scroll container,
     and a scroll-clipping ancestor cancels position:sticky for everything
     inside it. Nothing inside the card is sticky now, but `clip` costs
     nothing and keeps that trap shut.

     Without this rule, the last section in the card is white with square
     corners, and it sits on top of the card's rounded bottom corners and makes
     them square. */
  .calc { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: clip; }
  .calc-section { padding: 22px 24px; }

  /* This replaces the whole form when the form cannot load the charity list.
     See showLoadFailure(): there is no safe part of the form to show. */
  .load-failure { padding: 40px 28px; text-align: center; }
  .load-failure h2 { margin: 0 0 12px; font-size: 20px; }
  .load-failure p { margin: 0 0 10px; color: var(--color-text-muted); line-height: 1.6; }
  .load-failure p:last-child { margin-bottom: 0; }
  @media (max-width: 540px) { .calc-section { padding: 18px 16px; } }

  /* The text uses EAA's own first-person voice, from the live form. It is the
     heading of each section, so it is in sentence case, as the style guide
     asks of a heading. It used to be an 11px label in capitals. */
  .calc-label { display: block; font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--color-heading); margin-bottom: 12px; }
  /* ── "Where it goes": segmented buckets (compact vertical footprint) ─────
     One control names all three groups: Funds, Recommended charities and
     Other. The picker draws the options of the selected group only, so it shows
     one group at a time instead of all three. The evidence for the selected
     charity is behind "Why we recommend this fund" (or "this charity") on the impact panel. */
  .seg { display: grid; grid-auto-flow: column; gap: 4px; background: var(--color-surface-soft); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 4px; margin-top: 16px; }
  .seg button { border: 0; background: transparent; border-radius: var(--radius-sm); padding: 9px 8px; font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); cursor: pointer; transition: all .12s ease; line-height: 1.2; }
  .seg button.active { background: var(--color-surface); color: var(--color-primary); box-shadow: var(--shadow-sm); }
  /* ── One selectable tile, seven controls ───────────────────────────────
     .amount-card, .freq-btn, .tip-opt, .tip-pct, .fc and .other-pill were six
     copies of the same declarations. Each was a white tile with a grey border,
     and the border became teal when the donor chose it. The rule below already
     holds the selected state in one place. This rule holds the other half, and
     the hover state with it. Four of the six hovered to grey and two hovered to
     teal, which is what happens with six copies of one thing.

     .pmt-wallet was the seventh. It is gone: Stripe's Express Checkout Element
     draws the Apple Pay, Google Pay and Link buttons now, because each wallet's
     owner sets rules about how its own button may look.

     site.css has no component for this, and it should not have one. A .btn is
     an action, and these controls are a choice between options. They are nearer
     to a radio button than to a button. */
  .choice {
    background: var(--white);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease, color .12s ease, transform .12s ease;
  }
  .choice:hover { border-color: var(--color-border-strong); }
  /* The press. It replaces Chrome's blue tap flash, which site.css turns off. */
  .choice:active { transform: scale(0.98); }

  /* The funds and the recommended charities are a grid of two columns of
     selectable cards. On a phone they are one column, because two columns
     leave each name and description only a few words wide. 540px is the same
     breakpoint as .amount-grid, so every phone gets one column. */
  .two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch; grid-auto-rows: 1fr; }
  @media (max-width: 540px) { .two-up { grid-template-columns: 1fr; } }
  .fc { position: relative; width: 100%; text-align: left; }
  /* ── The canonical selected state ──────────────────────────────────────
     The selected state is a light teal background and a 1.5px teal border. Six
     controls used to declare this separately, and .tip-pct declared the same
     properties in a different order. That is the drift CLAUDE.md warns about
     twice. There is one rule now. Add a selector here instead of copying the
     three declarations again.
     .fc is the one deliberate exception. It is a card with a subheading, and
     colouring the body text with --primary-dark makes that subheading harder to
     read. Therefore .fc takes the border and the background only. */
  .choice.selected { border-color: var(--color-primary); background: var(--color-primary-soft); }
  /* The label also becomes dark teal. .fc is the exception: it is a card with a
     subheading under the name, and colouring that text makes it harder to
     read. */
  .amount-card.selected,
  .freq-btn.selected,
  .tip-opt-yes.selected,
  .tip-opt-no.selected,
  .tip-pct.selected { color: var(--color-dark); }
  .fc-in { display: flex; gap: 11px; align-items: flex-start; padding: 13px 14px; }
  .fc-radio { flex-shrink: 0; width: 17px; height: 17px; border: 2px solid var(--color-border-strong); border-radius: var(--radius-full); margin-top: 1px; display: grid; place-items: center; }
  .fc.selected .fc-radio { border-color: var(--color-primary); }
  .fc.selected .fc-radio::after { content: ''; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--color-primary); }
  .fc-name { font-size: 14.5px; font-weight: 800; color: var(--color-text); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
  .fc-rec { font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--color-primary); color: white; padding: 2px 6px; border-radius: var(--radius-sm); }
  .fc-sub { font-size: 12px; color: var(--color-text-muted); line-height: 1.4; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  /* The shared rows and controls of the evidence panel. */
  .fund-card-row { margin: 0 0 9px; }
  .fund-card-row:last-child { margin-bottom: 0; }
  .fund-card-row-label { display: block; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-heading); margin-bottom: 2px; }
  .cause-show-link { background: none; border: 0; padding: 4px 0; font-family: inherit; font-size: 13px; font-weight: 700; color: var(--color-primary); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
  .cause-show-link:hover { color: var(--color-dark); }
  .cause-show-link .caret svg { width: 14px; height: 14px; }
  .other-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
  .other-pill { border-radius: var(--radius-pill); padding: 8px 14px; font-size: 13px; font-weight: 600; }
  .other-pill.selected { border-color: var(--color-primary); background: var(--color-primary); color: white; }
  .other-pills[hidden] { display: none; }
  /* On a phone or a small tablet the pills stack, one to a row, so the long
     names do not wrap into ragged two-line pills. 768px is site.css's
     breakpoint. */
  @media (max-width: 768px) {
    .other-pills { flex-direction: column; }
    .other-pill { width: 100%; }
  }

  /* "Where it goes", exploration #2. This is the control below the two
     funds. */
  /* This accordion is one card: plain white, with no tint. One card with a border holds the heading row AND the
     body. The chevron points right when the accordion is closed, and it turns
     to point down when the accordion is open. */
  .cause-disclose-wrap { margin-top: 12px; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); background: white; transition: border-color .12s ease; }
  .cause-disclose-wrap:hover { border-color: var(--color-border-strong); }
  .cause-disclose-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: none; border: 0; padding: 14px; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--color-text); cursor: pointer; text-align: left; }
  .caret { display: inline-flex; color: var(--color-primary); transition: transform .15s ease; }
  .caret svg { width: 16px; height: 16px; }
  .cause-disclose-btn.open .caret, .cause-show-link.open .caret { transform: rotate(90deg); }
  .cause-disclose-body { padding: 2px 14px 14px; }
  .cause-disclose-body[hidden] { display: none; }
  /* The impact figure goes under each charity name. It is not a cost to the
     right of the name. */
  .fc-impact { font-size: 12px; font-weight: 800; color: var(--color-primary); margin-top: 6px; }
  .fc-impact:empty { display: none; }

  .amount-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
  @media (max-width: 540px) { .amount-grid { grid-template-columns: repeat(3, 1fr); } }
  .amount-card { position: relative; width: 100%; padding: 13px 8px; text-align: center; }
  .amount-value { font-size: 16px; letter-spacing: -0.01em; }
  /* The "Most popular" badge marks one preset amount. NextAfter found that this
     raises revenue by 94%. The badge sits above the top edge of the pill, so
     that it does not compete with the amount label. It is centred over the
     amount. */
  .amount-popular-badge { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); background: var(--color-primary); color: white; font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 7px; border-radius: var(--radius-sm); white-space: nowrap; pointer-events: none; box-shadow: 0 1px 3px rgba(10,115,120,.3); }
  /* The cards are narrow on a phone, where the grid has three columns. Make the
     badge smaller, so that "Average gift" fits on one line. It used to wrap and
     then extend outside the card. */
  @media (max-width: 540px) { .amount-popular-badge { font-size: 8px; letter-spacing: .03em; padding: 2px 5px; } }

  /* The "Other" cell shows a button. After a tap it becomes a dollar input in
     the same grid cell. This saves the row that the separate custom-amount box
     used to take. */
  .amount-other { position: relative; }
  .amount-other-input { display: flex; align-items: center; gap: 2px; height: 100%; background: white; border: 1.5px solid var(--color-primary); border-radius: var(--radius-md); padding: 0 10px; }
  .amount-other-input[hidden] { display: none; }   /* The `display` above is explicit, so it beats the plain [hidden] rule. */
  .amount-other-prefix { color: var(--color-text-muted); font-weight: 700; font-size: 14px; }
  /* Every field the donor types into is 16px or more. iOS Safari zooms in on a
     smaller field when it gets focus, and it does not zoom back out.
     test_no_zoom_on_focus.py checks this. */
  .amount-other-input input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; font-weight: 700; color: var(--color-dark); padding: 12px 0; text-align: center; }
  /* The environment form has no "Other" button. Its box is always open, so it
     sits in the row as a card. It is a grey card while it is empty, and a
     selected card once it holds an amount. The `$` appears with the amount, so
     the empty box reads "Other" like the button on the main form. The main
     form's box has no .choice, so these rules do not apply to it. */
  .amount-other-input.choice:has(input:placeholder-shown) { border-color: var(--color-border); background: var(--white); }
  .amount-other-input.choice:has(input:placeholder-shown) .amount-other-prefix { display: none; }

  /* Three places put a plain input inside a box with a border and rounded
     corners: this one, the "Other" cell of the tip, and each row of the split
     ledger. site.css draws the focus ring on the element that has focus. In all
     three places that element is the square input inside the box, so the ring
     was a rectangle inside a rounded outline. Therefore the input gives up the
     ring and the box draws it, on the shape a person reads as the control.
     These declarations are the same as site.css's own :focus-visible rule,
     because moving focus between a field and the button beside it must not
     change how focus looks. */
  .amount-other-input input:focus-visible,
  .tip-other-input input:focus-visible,
  .split-amt input:focus-visible { box-shadow: none; animation: none; }
  .amount-other-input:focus-within,
  .tip-other-input:focus-within,
  .split-amt:focus-within {
    box-shadow: 0 0 0 var(--focus-width) var(--focus-color);
    animation: focus-ring-in var(--duration-base) var(--ease-out);
  }

  /* The split between charities. The whole "How
     much" section closes, and the ledger below holds the dollars for each
     charity. */
  /* "Show other programs" on the left and the split link on the right share one
     row. Thus the split link is one level higher. The donor sees it as soon as
     "Specific programs" opens, on the right of the other link. */
  .disc-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
  .disc-actions .cause-show-link { margin: 0; }
  .split-link { background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--color-primary); display: inline-flex; align-items: center; gap: 5px; }
  .split-link svg { width: 13px; height: 13px; }
  .split-link:hover { color: var(--color-dark); text-decoration: underline; }
  /* In split mode the radio buttons look like checkboxes. The well is square,
     and it holds a tick when the charity is selected. */
  /* In split mode the cards keep the square checkbox well. It is empty, and it
     shows a tick when the donor adds the charity. The "+" mark is on the pills
     only, where it lines up correctly. In the small
     well on a card it was off centre, so it is not there. */
  .cause-list.is-split .fc-radio { border-radius: var(--radius-xs); }
  .cause-list.is-split .fc.selected .fc-radio::after { content: '✓'; width: auto; height: auto; border-radius: 0; background: none; color: var(--color-primary); font-size: 11px; font-weight: 900; line-height: 1; }
  /* The other-programs pills use "+" and tick marks. */
  .cause-list.is-split .other-pill::before { content: '+'; font-weight: 800; margin-right: 5px; color: var(--color-text-subtle); }
  .cause-list.is-split .other-pill.selected::before { content: '✓'; color: var(--white); }
  .split-ledger { margin-top: 12px; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); padding: 12px 14px; background: white; }
  .split-cap { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-heading); margin-bottom: 4px; }
  .split-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
  .split-row + .split-row { border-top: 1px solid var(--color-border); }
  .split-name { flex: 1; font-size: 13px; font-weight: 700; color: var(--color-text); }
  .split-amt { display: flex; align-items: center; gap: 2px; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); padding: 4px 8px; background: white; }
  .split-amt:focus-within { border-color: var(--color-primary); }
  .split-amt span { color: var(--color-text-muted); font-weight: 700; font-size: 13px; }
  .split-amt input { width: 64px; border: 0; outline: none; background: transparent; font-family: inherit; font-size: 16px; font-weight: 700; color: var(--color-dark); text-align: right; }
  .split-remove { background: none; border: 0; cursor: pointer; color: var(--color-text-subtle); font-size: 17px; line-height: 1; padding: 2px 4px; }
  .split-remove:hover { color: var(--color-text); }
  .split-total-row { display: flex; justify-content: space-between; padding-top: 10px; margin-top: 4px; border-top: 1.5px solid var(--color-border-strong); font-size: 13.5px; font-weight: 800; color: var(--color-text); }
  .split-hint { font-size: 12px; color: var(--color-text-muted); margin-top: 6px; }
  /* site.css's .btn:disabled draws the disabled state, with a lower opacity and
     a not-allowed cursor. It does not cover the hover colour, because the
     browser still applies :hover to a button disabled with aria-disabled. */
  .continue-btn[aria-disabled="true"]:hover { background: var(--color-primary); }
  .continue-hint { margin-top: 10px; font-size: 12.5px; color: var(--color-warning); text-align: center; }
  .continue-hint[hidden] { display: none; }
  /* This fades the picker in after a rebuild, when the browser runs no view
     transition. */
  .cause-list.fade-in { animation: causeFade .18s ease; }
  @keyframes causeFade { from { opacity: 0; } }

  .custom-amount { position: relative; flex: 1; }
  .custom-amount input { width: 100%; padding: 10px 14px 10px 28px; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); font-size: 14px; background: white; }
  .custom-amount input:focus { outline: none; border-color: var(--color-primary); }

  /* Two cards, with exactly the style of the amount cards. They are white with
     a grey outline at rest, and they get a teal outline and a teal tint when
     selected. There is no track or switch styling. */
  .freq-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  /* Extra space above. The two frequency cards were too close to the
     amount grid, and a donor read the two as one choice. This space separates
     "how often" from the dollar amounts, and it needs no divider line, so
     they stay in the same block. */
  .freq-inline { margin-top: 20px; }
  .freq-inline[hidden] { display: none; }
  .freq-btn { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 12px; font-size: 13px; }
  /* "Cancel anytime" reassures the donor. It is not a claim that sells the
     option. Therefore it is in brackets beside the label, and quiet. It is not
     in a badge, because a teal pill is louder than the word it describes. */
  .freq-note { font-size: 11px; font-weight: 400; color: var(--color-text-muted); white-space: nowrap; }
  /* On a phone, two cards are about 140px each. That is not enough width for
     the label and the note side by side. One above the other, each line
     fits. */
  @media (max-width: 480px) {
    .freq-btn { flex-direction: column; gap: 1px; }
  }

  /* The narrow "Support EAA's operations" row. The tip is sent as an
     eaa-amplify partner_charity row. This form does not use the dark
     pattern the live form uses, which selects 5% in advance. The default here
     is Skip. The row holds three small pills. */
  /* Grey box at rest (matches the consent box below); a border appears on tick. */
  .tip-block { margin: 22px 0 14px; background: var(--color-surface-soft); border: 1.5px solid transparent; border-radius: var(--radius-md); padding: 11px 12px; transition: border-color .12s ease; }
  .tip-block.is-open { border-color: var(--color-border-strong); }
  /* The multiplier is a feature card. It moved to step 1, where a
     grey row with a checkbox was too easy to miss. A white card with a border
     and a small shadow makes it a clear choice that the donor must decide on.
     The card becomes teal when the donor selects it. It is still off by
     default, the donor must opt in, and the text is neutral. It is not a dark
     pattern. */
  .tip-section { padding-top: 18px; padding-bottom: 18px; }
  .tip-feature { margin: 0; background: var(--white); border: 1.5px solid var(--color-border-strong); border-radius: var(--radius-md); padding: 15px 16px; }
  .tip-feature.is-open { border-color: var(--color-primary); background: var(--color-primary-soft); }
  /* The active choice. A heading, then two options of equal weight. Nothing
     is selected in advance. */
  .tip-feature-head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 12px; }
  .tip-feature-title { font-weight: 700; font-size: 14px; color: var(--color-text); }
  .tip-feature-sub { font-size: 11.5px; color: var(--color-text-muted); line-height: 1.4; }
  .tip-emph { color: var(--color-primary); font-weight: 700; }
  .tip-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .tip-opt { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; font-size: 13.5px; }
  .tip-heart { width: 17px; height: 17px; flex: none; color: var(--color-border-strong); transition: transform .15s ease, color .15s ease; }
  .tip-opt-yes:hover .tip-heart { color: #e8788a; }
  .tip-opt-yes.selected .tip-heart { color: #e23b5a; animation: heart-pop .28s ease; }
  /* On a phone the two options are about 170px wide. "Add a little extra" is
     wider than that at 13.5px, so the yes button wrapped onto two lines and the
     two buttons were different heights. One above the other, each button is the
     full width of the card, and the heart stays on the same line as its
     label. */
  @media (max-width: 540px) {
    .tip-choice { grid-template-columns: 1fr; }
  }
  @keyframes heart-pop { 0% { transform: scale(.7); } 50% { transform: scale(1.25); } 100% { transform: scale(1); } }
  .tip-amounts { margin-top: 10px; }
  .tip-amounts[hidden] { display: none; }
  .tip-anchor-note { font-size: 11px; color: var(--color-text-muted); margin-top: 8px; text-align: center; }
  /* The "Add" choice shows these amount options. They are full-width segments
     with large tap targets. */
  .tip-pcts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 0; }
  .tip-pcts[hidden] { display: none; }
  .tip-pct { width: 100%; min-height: 44px; padding: 0 4px; font-size: 13.5px; color: var(--color-text-muted); }
  .tip-pct:hover { border-color: var(--color-primary); color: var(--color-primary); }
  /* One selected state for all of these: a light teal background
     and a 1.5px teal border. It matches .amount-card, .freq-btn, .tip-opt-yes
     and .fc. It used to be a dark teal fill. */
  /* The custom dollar amount. It replaces the cell contents, in the same way as
     "Other" in the amount grid. */
  .tip-other { position: relative; }
  .tip-other-btn { width: 100%; }
  .tip-other-input { display: flex; align-items: center; gap: 2px; height: 100%; min-height: 44px; background: white; border: 1.5px solid var(--color-primary); border-radius: var(--radius-md); padding: 0 8px; }
  .tip-other-input[hidden] { display: none; }
  .tip-other-prefix { color: var(--color-text-muted); font-weight: 700; font-size: 13px; }
  .tip-other-input input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; font-weight: 700; color: var(--color-dark); padding: 10px 0; text-align: center; }
  /* Five buttons across gives about 64px for each button on a phone. The four
     percentages have a row of their own, and Custom takes the row below. That
     is also the better shape for the input the cell becomes. */
  @media (max-width: 540px) {
    .tip-pcts { grid-template-columns: repeat(4, 1fr); }
    .tip-other { grid-column: 1 / -1; }
  }

  /* The impact panel is an ordinary card at every width. It is not sticky.
     It used to pin across the top of a phone screen while the form scrolled
     under it, and a script pushed it off the screen at "Multiply your impact".
     A pinned panel covered part of the form for the whole scroll, so now it
     scrolls with the page like everything else.

     The panel is frosted, not solid. In the wide layout it sits over the
     charity's photograph, and a solid block of teal would hide the one thing
     the band exists to show. The ground is 80% of --teal-700. It is not
     site.css's --glass-tint (80% of --teal-950), on purpose: the deeper teal
     looked too heavy over the charity's photograph. The blur and the edge are
     site.css's (--glass-filter, 16px, and --glass-edge). It is not the `.glass`
     class, because the frost must be on a layer of its own (see
     .impact::before).

     THIS DOES NOT MEET THE CONTRAST MINIMUM, and that is a known decision. The
     minimum is 4.5:1, because the smallest text in the panel is a 12.5px
     sentence. The worst case behind the panel is white: in the wide layout the
     panel hangs below the photograph, and on a narrow screen it sits inside the
     white form card. Over white, 80% gives:

       white text                        3.8:1
       .impact-alts (white at 92%)       3.5:1
       the --teal-100 figure and links   3.3:1

     Over the photograph the figures are better. --glass-tint would give 6.9:1,
     5.9:1 for the figure. If you change the ground, measure again.

     `position: relative`, NOT `static`. The frost in ::before is absolutely
     positioned, and it must take this panel's rounded corners.

     This rule sets no height. .impact-desc reserves its own two lines, which
     is what keeps the height steady while the donor changes the amount. */
  .impact { color: white; padding: 28px 24px; position: relative; overflow: hidden; border: 1px solid var(--glass-edge); border-radius: var(--radius-lg); }

  /* THE FROST IS ON A LAYER OF ITS OWN, AND NO TEXT IS ON THAT LAYER. That is
     the rule, and it is not a preference. Safari does not always redraw text
     that is painted INSIDE an element with a backdrop-filter when only the
     characters change. The old figure stayed on screen next to the new one
     until something else forced a full repaint. That is why it looked correct
     whenever the panel changed height, because the browser redraws a box that
     resizes, and it showed both figures whenever the height stayed the same.

     We found the cause by bisection in Safari 26.6.2, against the real page. We
     did not guess it. With the frost off, the panel was clean. With the frost
     on the panel itself, both figures showed. With the frost moved to this
     layer, the panel was clean. `will-change: backdrop-filter` changed nothing,
     and stopping the photograph's cross-fade underneath changed nothing.
     Therefore the cause is text and backdrop-filter in one element, and not the
     moving backdrop.

     Nothing else about the panel changes. It has the same ground and the same
     blur, and the ::before samples the same backdrop the panel did, so the
     picture is identical. `border-radius: inherit` keeps this layer the same
     shape as the two rules that give the panel corners. `inset: 0` is the
     padding box, so the 1px border the wide layout adds still belongs to the
     panel itself.

     `transform: translateZ(0)` on .impact-body also fixes the fault, by putting
     the text on its own composited layer. That is one line against the six
     here, and it is the wrong answer. It asks the browser for a layer and hopes
     the browser gives one. This rule removes the combination that causes the
     fault. */
  .impact::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
    background: color-mix(in srgb, var(--teal-700) 80%, transparent);
    backdrop-filter: var(--glass-filter);
    -webkit-backdrop-filter: var(--glass-filter);
  }
  /* Everything the panel shows is above the frost. This rule also gives
     .impact-body the `position: relative` that it used to set itself. */
  .impact > * { position: relative; z-index: 1; }
  /* There is no eyebrow. "YOUR IMPACT" used to sit above the sentence, at
     every width, and that sentence starts "Your $300 one-off means". The style
     guide's rule: an eyebrow helps only when it says something the line under
     it does not. */
  /* The gold category label, from EAA /best-charities. When it has no text, it
     takes no space. */
  .impact-tagline { font-size: 12px; font-weight: 600; color: var(--impact-accent); letter-spacing: 0.01em; opacity: 0.92; margin-bottom: 8px; transition: opacity 0.18s ease; }
  .impact-tagline:empty { display: none; }
  /* The treatment icon stays for compatibility. The photo-led panel does not
     use it. */
  .impact-icon { display: none; }
  /* The icon-led version (?impact=icon). It shows EAA's
     own calculator icons on the brand gradient. It is for a host page that
     supplies its own imagery. paintImpactFrame() still paints the icon for each
     charity, so this rule only controls display. The panel has no photograph to
     replace now: the charity's picture is the donate band behind the whole
     form. */
  .eaa-form.icon-led .impact-icon { display: block; width: 48px; height: 48px; margin-bottom: 10px; color: var(--white); }
  .eaa-form.icon-led .impact-icon svg { width: 100%; height: 100%; display: block; }
  .eaa-form.icon-led .impact { min-height: 240px; }
  /* The hero-hosted version (?impact=hero). The host page
     owns the calculator display and copies this panel's content into its own
     full-width hero. Therefore the panel inside the form is hidden. The code
     still paints it. */
  .eaa-form.impact-hero .impact { display: none; }

  /* ── Wide screens: the impact panel gets its own column ──────────────────
     1041px is also where the real /donate/ page changes to two columns. The
     form column is 684px wide, which is the width it has always been. That is
     the 720px wrapper less 18px of padding on each side. Therefore nothing
     inside the form needs testing at a width it has never had.

     The column is sticky, and it holds the panel beside the form all the way
     down the page. Below this width the panel is a card inside the form card,
     and it scrolls with the form.

     align-items:start is what gives the column room to move. A stretched grid
     item is already the full height of the row, so it cannot move. */
  @media (min-width: 1041px) {
    .calc-wrap, .form-hero { max-width: 1140px; }
    .calc-grid {
      display: grid; grid-template-columns: minmax(0, 1fr) 380px;
      /* Columns only. The second row is the footnote under the form card, and
         its own margin sets that gap. */
      column-gap: 40px; align-items: start;
    }
    .calc { order: 1; }
    /* The column pins to the BOTTOM of the screen, not the top. The photograph
       stays at the top, and two elements cannot both hold that position. The
       column stays 24px above the foot of the screen for the whole scroll of
       the form, with the picture above it. It stops level with the bottom of
       the form card.

       `align-self: end` is what makes `bottom: 24px` work. The two only work
       together. A sticky `bottom` pulls a box UP into the screen from below, and
       releases it once the box's own place in the page reaches it. It does
       nothing for a box whose place is at the TOP of a long column, which is
       where the grid's `align-items: start` puts this one. The panel then
       scrolled away. `align-self: end` puts the box's place below the bottom of
       the screen, which is the case `bottom` is for.

       We tried two other methods and both are worse. A sticky box as tall as
       the screen, with its contents at the end, looks correct but runs out of
       travel. A box 100vh tall can only move by the row's height less 100vh, so
       on a form barely taller than the screen it stops being pinned almost at
       once. And `top: calc(100vh - <height>)` needs the height of two cards
       that grow with their contents, which only a script can know. */
    .calc-aside { display: block; order: 2; align-self: end; position: sticky; bottom: 24px; }
  }

  /* Both versions that the host page controls stay in one column. In a site
     embed, the host page supplies the columns and the form is inside one of
     them. In the hero version, the host page draws the calculator itself, so
     this column would have nothing in it. */
  .eaa-form.site-embed .calc-grid,
  .eaa-form.impact-hero .calc-grid { display: block; }
  /* With no second column, the form returns to the width it is designed for.
     It does not spread across the space the column would have used. */
  .eaa-form.impact-hero .calc-wrap { max-width: 720px; }
  .eaa-form.site-embed .impact { border: 0; }
  .eaa-form.site-embed .calc { border-top: 0; }
  /* The "have a question" card, under the impact panel. It is the same white
     card as the form itself. Thus the sidebar and the panel read as one
     column. */
  .aside-card { margin-top: 16px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 22px 24px; }
  .aside-card-title { font-family: var(--font-heading); font-size: var(--text-lg); color: var(--color-heading); margin-bottom: 10px; line-height: var(--leading-snug); }
  .aside-card p { font-size: var(--text-sm); line-height: var(--leading-normal); color: var(--color-text-muted); }
  .aside-card p + p { margin-top: 10px; }
  .aside-card a { color: var(--color-link); }
  /* The estimates footnote, directly under the form card. It uses the muted
     colour, because the lighter --color-text-subtle is too faint at 12px.
     The side padding puts its left edge on the left edge of the text inside
     the card. */
  .impact-note { order: 2; margin-top: 16px; padding: 0 24px; font-size: var(--text-xs); line-height: var(--leading-normal); color: var(--color-text-muted); }
  /* On a narrow screen the card comes after the form and its footnote. */
  @media (max-width: 1040px) { .aside-card { order: 3; margin-top: 16px; } }

  /* The toggles in the panel: "Why we recommend this fund" (or "this charity"), and the fund's "or one of
     3 other results". Each label stays the same; the chevron turns to say
     whether it is open. */
  .impact-sub-link { background: none; border: 0; padding: 0; color: var(--impact-accent); font-family: inherit; font-size: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
  .impact-toggle::after { content: ""; display: inline-block; width: 0.42em; height: 0.42em; margin-left: 0.45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-0.2em) rotate(45deg); transition: transform 0.2s ease; }
  .impact-toggle[aria-expanded="true"]::after { transform: translateY(0.05em) rotate(-135deg); }
  /* A thin line between the two parts of the panel: what the money does, above,
     and why we recommend it, below. */
  .impact-alts:not(:empty) + .impact-sub:not(:empty) { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.22); }
  .impact-more { margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,0.92); }
  .impact-more[hidden] { display: none; }
  .impact-more .fund-card-row-label { color: var(--impact-accent); }
  /* The link to the charity's website. We saw that
     donors left the form to read the charity's own pages. A direct link, which
     opens in a new tab, keeps the form open. */
  .impact-more .dossier-link { display: inline-block; margin-top: 10px; color: var(--impact-accent); font-weight: 700; font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; }
  /* The panel is small. It holds the figure, its description and the
     alternatives. The prefix starts below the icon. The "why it works" text is
     now on the "Where it goes" cards. */
  .impact-prefix { font-size: 14px; opacity: 0.92; margin-bottom: 8px; }
  .impact-prefix strong { font-weight: 700; }
  /* Only the figure changes while the donor changes the amount, so the figure
     is the main element. It is large and coloured. Everything around it is
     small and low-contrast, so that a person looks at the number first. */
  .impact-headline { margin-bottom: 4px; transition: opacity 0.12s ease; text-shadow: 0 1px 18px rgba(0,0,0,0.32); }
  .impact-num { display: block; font-size: 50px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: var(--impact-accent); }
  /* This is full width and has no max-width. It reserves about two lines, so
     that the panel does not change height while the description changes. */
  .impact-desc { display: block; font-size: 18px; font-weight: 600; line-height: 1.25; opacity: 0.94; margin-top: 6px; min-height: 2.4em; }
  /* On a narrow screen the panel is a card inside the form, between the amount
     and the charity. It has the same stacked layout as the wide screen: the
     number on a line of its own, large, with the sentence under it. It used to
     be one small sentence, about 60px tall, because the panel pinned across the
     top of the screen and every line of it covered the form. It does not pin
     now, so it can take the room.

     This block must sit HERE, after .impact-num and .impact-desc. The
     selectors have the same specificity, so the later one wins. */
  @media (max-width: 1040px) {
    /* The side margin is the value from .calc-section, not a number of its
       own, so the card lines up with the sections above and below it. On the
       payment step the card is the first thing in the step, so it needs a gap
       above it as well. */
    .impact { margin: 0 24px; padding: 20px; }
    #step-2 > .impact { margin-top: 24px; }
    #step-2 > .impact + .pay-summary { padding-top: 24px; }
    .impact-num { font-size: 42px; }
    .impact-desc { font-size: 17px; }
  }
  /* On the payment step the gap above, beside and below the card is the same
     as the side padding of .calc-section. This block must come after the one
     above, for the same reason: the later rule wins. */
  @media (max-width: 540px) {
    .impact { margin: 0 16px; }
    #step-2 > .impact { margin-top: 16px; }
    #step-2 > .impact + .pay-summary { padding-top: 16px; }
  }

  /* ── The impact bar ──────────────────────────────────────────────────────
     On a narrow screen the panel is a card in the form, and it scrolls away
     before the donor reaches the charities. The bar keeps the figure on screen
     while they compare them. It pins to the BOTTOM of the screen: the top
     already holds the site header and the charity photograph, and a bar there
     would cover the card the donor is reading.

     It is a separate element, not the panel in a second state. A panel that
     changes height when it pins moves everything under it, and that cost us a
     jump and then a gap (see CLAUDE.md). The bar changes nothing in the flow.

     It is solid, not frosted. It sits over white form cards, where a frost has
     nothing to show, and solid --teal-900 needs no contrast measurement.
     The script adds .is-shown. `visibility` waits for the slide to end before
     it hides the bar, so the bar leaves the Tab order only once it is off the
     screen. */
  .impact-bar {
    position: fixed; left: 12px; right: 12px; z-index: 20;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px 10px 16px;
    border: 0; border-radius: var(--radius-lg);
    background: var(--teal-900); color: var(--white);
    box-shadow: var(--shadow-lg);
    font: inherit; text-align: left; cursor: pointer;
    transform: translateY(calc(100% + 24px)); opacity: 0; visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0s linear 0.25s;
  }
  .impact-bar.is-shown {
    transform: none; opacity: 1; visibility: visible;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0s;
  }
  .impact-bar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .impact-bar-lead { font-size: 12px; line-height: 1.3; opacity: 0.92; }
  .impact-bar-lead:empty { display: none; }
  .impact-bar-figure { font-size: 15px; font-weight: 600; line-height: 1.25; }
  .impact-bar-figure strong { font-size: 22px; font-weight: 800; color: var(--impact-accent); margin-right: 0.2em; letter-spacing: -0.02em; }
  .impact-bar-icon { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
  /* The wide layout pins the whole panel beside the form, so it needs no bar. */
  @media (min-width: 1041px) { .impact-bar { display: none; } }
  .eaa-form.site-embed .impact-bar,
  .eaa-form.impact-hero .impact-bar { display: none; }

  /* The "why" subheading under the headline. It introduces the
     cost-effectiveness figure. */
  /* The headline and the subheading fade together while the fund moves through
     its charities. */
  .impact-sub { font-size: 13.5px; line-height: 1.45; opacity: 0.93; margin-top: 10px; max-width: 42ch; transition: opacity 0.12s ease; }
  .impact-sub:empty { display: none; }
  .impact-alts { font-size: 12.5px; line-height: 1.6; opacity: 0.92; margin-top: 8px; transition: opacity 0.12s ease; }
  .impact-alts:empty { display: none; }
  /* The intro has no dimming of its own. It used to be white at 72%, which made
     it the dimmest text in the panel: 2.6:1 on the 80% ground over white. */
  .impact-alts strong { color: var(--impact-accent); font-weight: 700; }
  /* The Top Charities Fund's other results. Each one is a line of its own,
     under the toggle that opens them. */
  .impact-alts-list { list-style: none; margin: 6px 0 0; padding: 0; }
  .impact-alts-list[hidden] { display: none; }
  .impact-alts-list li + li { margin-top: 4px; }
  /* The element becomes fully transparent. It used to fade to 30%. The panel
     has a backdrop-filter over it, so in Safari an opacity transition here is
     composited from a cached picture of the element. The script used to replace
     the text while that transition was still running. The old picture then
     stayed on screen beside the new text until the transition ended, and at 30%
     the old figure was easy to read. The script now waits for this transition's
     own transitionend event before it writes. Thus at the moment the text
     changes, the panel is at 0 and is not animating. There is nothing visible
     to leave behind, and nothing running to leave it behind. The duration above
     belongs to this file alone: the script reads the event, never the
     number. */
  .impact-fading { opacity: 0; }

  /* ── Gift mode ───────────────────────────────────────────────────────────
     A link beside the amount turns the donation into a gift in somebody's
     honour. A gift always goes to the Top Charities Fund. A gift is one-time and must be paid by
     card. It produces a postcard the giver can print or email, which is the
     main element of the gift flow. */
  .label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
  .label-row .calc-label { margin-bottom: 0; }
  .gift-link { background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--color-primary); display: inline-flex; align-items: center; gap: 5px; text-transform: none; letter-spacing: 0; }
  .gift-link:hover { color: var(--color-dark); text-decoration: underline; }
  .gift-link svg { width: 14px; height: 14px; flex: none; }
  .gift-link[hidden] { display: none; }   /* The `display` above is explicit, so it beats the plain [hidden] rule. */

  /* The gift charity chooser. It is a small grid of cards in two
     columns, and it uses the .fc card styles. A gift goes to one charity, so
     this grid has no split controls. */
  .gift-help { font-size: 12.5px; color: var(--color-text-muted); line-height: 1.45; margin: -4px 0 12px; }
  #gift-choices .fc-impact { margin-top: 6px; }

  .gift-fields { display: grid; gap: 12px; }
  .gift-field { display: flex; flex-direction: column; }
  /* The second part of a label, such as "(optional)" or "(we'll send it
     here)". */
  .gift-field .opt { color: var(--color-text-subtle); font-weight: var(--weight-regular); }
  /* This is shorter than site.css's .textarea, which is sized for writing an
     article. */
  .gift-field .textarea { min-height: 64px; }

  /* The postcard preview is the main element of the gift flow. It updates while
     the giver types. The giver can print it or email it, and it names the
     impact, which is the bednet equivalent of the gift. */
  .postcard-wrap { margin-top: 6px; }
  .postcard-cap { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-text-muted); margin-bottom: 8px; }
  .postcard { position: relative; border-radius: var(--radius-lg); padding: 22px 22px 18px; color: #eafaf6; overflow: hidden;
    background: radial-gradient(120% 120% at 88% -12%, #15756b 0%, var(--color-dark) 58%, #062f30 100%); }
  .postcard .pc-tag { position: absolute; top: 0; right: 20px; width: 30px; height: 44px; background: var(--color-accent); border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
  .postcard .pc-tag::after { content: ''; position: absolute; top: 8px; left: 11px; width: 7px; height: 7px; border-radius: var(--radius-full); background: #062f30; box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
  .postcard .pc-eyebrow { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: #9fd9cf; font-weight: 700; }
  .postcard .pc-to { font-size: 21px; font-weight: 800; color: var(--white); margin: 3px 0 12px; }
  .postcard .pc-gift { font-size: 14.5px; line-height: 1.45; }
  .postcard .pc-gift b { color: var(--white); }
  .postcard .pc-num { color: var(--impact-accent); font-weight: 800; }
  .postcard .pc-msg { font-size: 13.5px; font-style: italic; color: #cdeae3; margin-top: 12px; border-left: 2px solid rgba(255,255,255,.25); padding-left: 11px; min-height: 18px; white-space: pre-wrap; }
  .postcard .pc-from { font-size: 13px; color: #bfe2db; margin-top: 13px; }
  .postcard .pc-brand { font-size: 11px; color: #8fc7bd; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.12); line-height: 1.5; }

  .continue-wrap { padding: 22px 24px; background: white; }
  @media (max-width: 540px) { .continue-wrap { padding: 18px 16px; } }
  /* The button comes from site.css: .btn .btn--primary .btn--block, named in
     continue-section.html. This file used to declare the whole button, and it
     declared the same button a second time as .submit-btn for step 2. That was
     two copies of one button in one file. The arrow comes from site.css as
     well. It is an .icon.icon--inline inside a .link-arrow, and .link-arrow is
     what moves the arrow on hover. */

  .pay-section { display: none; }
  .pay-section.open { display: block; }

  /* The summary and the total. This is on step 2, after the donor has chosen an
     amount. */
  .ledger { margin: 6px 0 14px; }
  .ledger[hidden] { display: none; }
  /* The `display` on .ledger-row beats the plain [hidden] rule, so say it again. */
  .ledger-row[hidden] { display: none; }
  .ledger-head { display: flex; justify-content: space-between; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-heading); padding-bottom: 9px; border-bottom: 1px solid var(--color-border); }
  .ledger-row { display: flex; justify-content: space-between; gap: 14px; font-size: 13.5px; padding: 9px 0; }
  .ledger-row .lr-label { color: var(--color-text-muted); }
  .ledger-row .lr-amt { color: var(--color-text); font-variant-numeric: tabular-nums; }
  .ledger-total { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding-top: 11px; border-top: 1.5px solid var(--color-border-strong); }
  .ledger-total .lt-label { font-size: 15px; font-weight: 800; }
  .ledger-total .lt-amt { font-size: 20px; font-weight: 800; color: var(--color-dark); font-variant-numeric: tabular-nums; }
  /* Step 2 shows the total as a large figure above the summary. The total row
     there is plain, so the same number is not large twice. */
  .ledger--plain-total .ledger-total .lt-label { font-size: 15px; font-weight: 700; text-transform: none; letter-spacing: 0; }
  .ledger--plain-total .ledger-total .lt-amt { font-size: 15px; font-weight: 700; color: var(--color-text); }

  /* The top of step 2: "You're donating", the total, and "Edit donation". */
  .pay-summary { padding-top: 30px; }
  @media (max-width: 540px) { .pay-summary { padding-top: 24px; } }
  .pay-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 16px; margin-bottom: 24px; }
  .pay-head-label { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-text-muted); }
  .pay-head-amt { font-family: var(--font-heading); font-size: var(--text-5xl); font-weight: 700; line-height: 1.1; color: var(--color-dark); font-variant-numeric: tabular-nums; }
  .pay-head-per { font-size: var(--text-lg); font-weight: 400; color: var(--color-text-muted); }
  .edit-donation { flex-shrink: 0; background: var(--white); color: var(--color-dark); border-color: var(--color-border-strong); }
  .edit-donation:hover { border-color: var(--color-primary); color: var(--color-primary); }
  /* On a phone the full-size button does not fit beside the amount. These are
     the values of site.css's .btn--sm. */
  @media (max-width: 540px) { .pay-head .edit-donation { padding: 0.5rem 1rem; font-size: var(--text-sm); } }

  /* The indicator for the two steps. It sits ABOVE the card, on the page
     background. The dots and the connector are together and centred. They are
     not spread to the edges. */
  /* The first element in each step was about 20px below the top edge of the
     card, and the gaps BETWEEN sections are 32px. Thus the top of the form
     looked tighter than the rest of it. Give the first element
     of both steps the same space. */
  #step-1 > .calc-section:first-child { padding-top: 30px; }
  @media (max-width: 540px) {
    #step-1 > .calc-section:first-child { padding-top: 24px; }
  }

  .field-grid { display: grid; gap: 10px; margin-bottom: 14px; }
  .field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  @media (max-width: 460px) { .field-pair { grid-template-columns: 1fr; } }
  /* This file used to declare a label, an input, a select and a hint. Each one
     had a border, a radius, padding and a focus colour that nearly matched the
     site's but did not. They now use site.css's .label, .input, .select and
     .hint, named in the markup. Two things are left, because site.css has no
     answer for them: a field that failed validation, and a hint that contains a
     button.

     The wrapper class is .form-field, not .field, because site.css already has
     a .field. Two classes with one name in one namespace means the stylesheet
     that loads last decides which rule wins. */
  .form-field { display: flex; flex-direction: column; }
  .form-field .field-error { font-size: var(--text-xs); color: var(--color-danger); margin-top: 4px; }
  .form-field .hint button { background: none; border: 0; padding: 0; font-family: inherit; font-size: inherit; color: var(--color-primary); font-weight: 600; text-decoration: underline; }

  /* The container for the Payment Element. It replaces the pattern
     of two tabs of equal weight, Card and Bank Transfer, with an accurate
     inline copy of the Stripe Payment Element. Stripe's Express Checkout
     Element draws the wallet buttons at the top, and below the divider come a
     security message and the card field. Bank transfer sits beside the card. */
  .stripe-mount { padding: 16px; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); background: white; min-height: 56px; }
  /* Stripe's Express Checkout Element fills this box and lays its own buttons
     out inside one iframe. Therefore this is a plain block and not the grid of
     three columns it used to be: a grid would squash the whole row of wallets
     into the first column.

     It starts invisible, and with no height, because which wallets a browser
     can offer is not knowable until the element has mounted and reported. That
     is `visibility` and not `display: none`, because a box that is not laid out
     has no width, and the element needs a width to draw itself.
     showExpressRow() adds .is-available when at least one wallet exists.

     While the element is still deciding, .is-loading shows a grey bar the
     height of one button in its place. Most browsers offer at least Link, so
     the bar usually becomes buttons, and the card and bank options below do
     not move. When no wallet exists the bar goes, and they move up once. The
     element itself stays laid out at full width under height 0, for the
     reason above. */
  #pay-express { visibility: hidden; height: 0; overflow: hidden; }
  #pay-express.is-available,
  #pay-express.is-loading { visibility: visible; height: auto; overflow: visible; margin-bottom: 14px; }
  .express-placeholder { display: none; }
  #pay-express.is-loading .express-placeholder {
    display: block; height: 48px; border-radius: var(--radius-sm);
    background: var(--color-surface-alt);
    animation: express-placeholder-pulse 1.2s ease-in-out infinite alternate;
  }
  #pay-express.is-loading #express-checkout { height: 0; overflow: hidden; }
  @keyframes express-placeholder-pulse { from { opacity: 1; } to { opacity: .5; } }
  .pmt-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px; color: var(--color-text-subtle); font-size: var(--text-sm); font-weight: 600; }
  .pmt-divider::before, .pmt-divider::after { content: ''; flex: 1; height: 1px; background: var(--color-border); }
  /* The "or" between the wallet row and the card and bank options. */
  .pay-choose .pmt-divider { margin: 12px 0; }
  .pay-methods { display: flex; gap: 8px; }
  /* Both forms open a payment option's fields directly under its button, in
     the same section. */
  #pay-details { margin-top: 18px; }
  /* The "no fees" message for bank transfer. Most income arrives by bank
     transfer with no fee, so the form says so. The PayTo and Stripe details
     are not confirmed yet, so this is text only. */
  .pay-methods-note { font-size: 11.5px; color: var(--color-text-muted); margin-top: 8px; line-height: 1.4; text-align: center; }
  .pay-methods-note[hidden] { display: none; }
  .pay-method-btn { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; background: white; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); padding: 14px 13px; font-family: inherit; font-size: 14px; font-weight: 700; color: var(--color-text); cursor: pointer; transition: all .12s ease; }
  .pay-method-btn:hover { border-color: var(--color-border-strong); }
  .pay-method-btn .caret { color: var(--color-primary); transition: transform .15s ease; }
  .pay-method-btn.open { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-soft); }
  .pay-method-btn.open .caret { transform: rotate(180deg); }
  .pay-method-btn[hidden] { display: none; }
  #card-fields[hidden], #bank-info[hidden], #your-details[hidden] { display: none; }
  #card-fields, #bank-info, #your-details { margin-top: 14px; }
  /* The card field arrives only after Donate is pressed. Until then its frame
     would be an empty box above "Your details", so the whole area, margin
     included, takes no space. */
  #card-fields:has(.stripe-mount:empty) { display: none; }
  /* The submit button uses display:flex, which would beat the plain [hidden]
     rule. This rule keeps the action button hidden until the donor chooses card
     or bank. */
  #submit-btn[hidden] { display: none; }
  .opt-ins { display: grid; gap: 8px; margin: 14px 0; }
  .opt-in { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--color-surface-soft); border-radius: var(--radius-sm); cursor: pointer; }
  .opt-in input { margin-top: 2px; accent-color: var(--color-primary); }
  .opt-in .opt-in-text { flex: 1; font-size: 13px; color: var(--color-text); line-height: 1.45; }
  .opt-in .opt-in-text .opt-in-sub { display: block; font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }
  /* The consent to share data sits directly above the donate button, before the
     donor submits. It is the one opt-in a charity depends on to thank a donor,
     so it gets an icon tile and turns teal when ticked. The checkbox is on the
     right, so the icon leads the row. */
  .opt-in.share-consent { align-items: center; gap: 12px; margin: 4px 0 14px; padding: 12px 14px; background: white; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); transition: border-color .12s ease, background-color .12s ease; }
  .opt-in.share-consent:hover { border-color: var(--color-border-strong); }
  .opt-in.share-consent:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-soft); }
  .opt-in.share-consent input { width: 18px; height: 18px; margin: 0; flex-shrink: 0; }
  .share-consent__icon { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; background: var(--color-primary-soft); color: var(--color-primary); transition: background-color .12s ease, color .12s ease; }
  .share-consent__icon .icon { width: 22px; height: 22px; }
  .opt-in.share-consent:has(input:checked) .share-consent__icon { background: var(--color-primary); color: white; }
  .opt-in.share-consent[hidden] { display: none; }

  /* This button also comes from site.css: .btn .btn--primary .btn--block. Two
     things are left here. One is the gap above the button. The other is the
     three wallet brands below. Apple, Google and Link each require their own
     colour, and that is the one case where a donate button must not look like
     the site's button. */
  .submit-btn { margin-top: 12px; }
  .submit-btn .spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.4); border-top-color: white; border-radius: var(--radius-full); animation: spin 0.7s linear infinite; }

  .pay-commit-hint { font-size: 12px; color: var(--color-text-muted); text-align: center; margin-top: 10px; line-height: 1.4; }
  .pay-commit-hint[hidden] { display: none; }
  @keyframes spin { to { transform: rotate(360deg); } }

  .tax-note { font-size: 11px; color: var(--color-text-muted); background: var(--color-surface-soft); padding: 10px 12px; border-radius: var(--radius-sm); margin: 12px 0; line-height: 1.5; }

  .form-error { background: var(--error-soft); border: 1px solid var(--color-danger); color: var(--color-danger); padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; margin-top: 12px; }

  /* The space above and below the card is padding on .eaa-form, not margin on
     the card. See showThankYou(): a top margin here collapses out through the
     form's own block box and the card lands against the host page's header.

     The photograph is of the charity the donor gave to. showThankYou() sets
     --thank-you-photo.

     On a phone the photograph fills the space behind the card, under the
     band's strong wash. The card covers nearly all of it, so it is
     atmosphere and not a photograph to look at. It sits at 20% from the
     top, not the centre, because the faces in these photographs are near
     the top. */
  .eaa-form.is-done {
    padding-block: clamp(60px, 10vw, 140px);
    background: var(--donate-band-wash-strong), var(--thank-you-photo, none) center 20% / cover no-repeat;
  }
  /* On a wide screen the screen has the form page's composition: the card on
     the left, where the form card was, and the photograph in the top right.
     The card used to be in the centre, over the photograph, and it covered
     the faces.

     The two fades are painted in the band's colour, not done with a mask.
     The band here is one flat colour, so painting that colour over the
     picture looks the same as fading the picture out. Each fade reaches the
     full colour at its own edge, so the left and lower edges never show.

     max-height keeps the picture inside the band. On a short card the band
     is shorter than the picture, and the lower fade must end before the
     band does, or the picture stops at a hard line. */
  @media (min-width: 1041px) {
    .eaa-form.is-done {
      position: relative;
      isolation: isolate;
      background: var(--donate-band-bg);
    }
    .eaa-form.is-done::before {
      content: "";
      position: absolute;
      z-index: -1;
      top: 0;
      right: 0;
      width: 60%;
      aspect-ratio: 3 / 2;
      max-height: 100%;
      background:
        linear-gradient(90deg, var(--donate-band-bg), transparent 35%),
        linear-gradient(180deg, transparent 60%, var(--donate-band-bg)),
        var(--donate-band-wash),
        var(--thank-you-photo, none) center 20% / cover no-repeat;
    }
    /* The left edge of the form card: .calc-wrap's 1140px, less its 18px
       padding. */
    .eaa-form.is-done .done-card { margin-left: max(18px, calc((100% - 1140px) / 2 + 18px)); }
  }
  .done-card { max-width: 480px; margin: 0 auto; padding: 36px 24px; background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); text-align: center; border: 1px solid var(--color-border); }
  .done-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; }
  .done-text { color: var(--color-text-muted); font-size: 14px; line-height: 1.55; }

  /* The bank transfer details on the "Almost there" screen, on both forms.
     See bank-done-section.html and environment.html. They are left aligned,
     unlike the rest of the EAA card, because a donor copies each value into
     their bank's app and a ragged centre line is harder to read from. Nothing
     here depends on .done-card, because the EAAE form has none. */
  .bank-details { text-align: left; margin: 16px 0; padding: 14px 16px; background: var(--color-surface-soft); border-radius: var(--radius-md); }
  .bank-details > div + div { margin-top: 12px; }
  .bank-details dt { font-size: var(--text-xs); color: var(--color-text-muted); }
  .bank-details dd { margin: 0; font-size: 17px; font-weight: 700; color: var(--color-text); }
  /* The reference is the one value the donor must copy exactly, or we cannot
     match the money to the pledge. So it is the largest thing in the box, and
     the border stops its pale brand tint blending into the pale brown behind
     it. The tint is teal on the EAA form and green on the EAAE form, because
     the EAAE page repoints the --color-primary tokens. */
  .bank-details .ref { display: inline-block; margin: 8px 0 6px; padding: 10px 16px; font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 26px; font-weight: 700; color: var(--color-dark); background: var(--color-primary-soft); border: 1.5px solid var(--color-primary); border-radius: var(--radius-sm); }
  .bank-details .bank-details__note { font-size: var(--text-xs); font-weight: 400; color: var(--color-text-muted); }
  .done-card .bank-contact { margin-top: 8px; }
  /* What replaces the questions once they have saved, on both forms. See
     after-answers-section.html. The links are left aligned, because three
     centred lines of different lengths with an arrow at each end look ragged. */
  .after-answers .after-answers__links { list-style: none; margin: 12px 0 20px; padding: 0; text-align: left; }
  .after-answers .after-answers__links li + li { margin-top: 10px; }
  /* A phone number broken over two lines is hard to read and to dial. */
  .bank-contact a { white-space: nowrap; }
