/* Signature: aedplein.nl "Hartmeter" (zonderslop, 23-11). Load after kit.css and themes/aedplein.css. Prefix ap-.
 * - Heart meter (.ap-meter): the AED heart fills up from below in heart red as the action collects; set --pct (0-100) inline.
 *   The amount and the line "bijgewerkt door de initiatiefnemer op ..." always sit next to it; colour never carries the number alone.
 * - Heartbeat bar (.ap-beat): on cards, progress is a heart trace (ECG line) that runs red up to --pct and grey after it.
 * - Pulse timeline (.ap-pulse): updates as beats on a line; the result "De AED hangt" is the big beat (.is-done).
 * - Payment box (.ap-pay): the initiator's own payment link, with the fixed line that aedplein never receives money,
 *   a slot for the phase-2 "geverifieerd" badge (.ap-verified) and the pledge form (.ap-pledge).
 * Pictograms: icons/aedplein/sprite.svg (ap-*). Colours only via theme tokens.
 */
.zs-logo:has(.ap-mark) { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; }
.ap-mark { width: 2.4rem; height: 2.4rem; flex: none; }
.zs-logo b { font-weight: 400; opacity: .85; }

/* ---------- Pictogram tiles ---------- */
.ap-picto { --picto-bg: var(--zs-picto); display: inline-grid; place-items: center; flex: none; width: 3rem; height: 3rem; border-radius: 50%; background: var(--zs-picto); color: var(--zs-picto-ink); }
.ap-picto svg { width: 64%; height: 64%; }
.ap-picto--sm { width: 2.1rem; height: 2.1rem; }
.ap-picto--lg { width: 4rem; height: 4rem; }
.ap-picto--heart { --picto-bg: var(--ap-heart); background: var(--ap-heart); color: var(--ap-heart-ink); }
.ap-ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; --picto-bg: var(--zs-surface); color: var(--zs-brand-text); }

/* ---------- Heart meter ---------- */
.ap-meter { --pct: 50; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem 1.4rem; align-items: center; }
.ap-meter__heart { position: relative; width: clamp(7rem, 18vw, 10rem); aspect-ratio: 1; }
.ap-meter__fill { position: absolute; inset: 0;
  background: linear-gradient(to top, var(--ap-heart) calc(var(--pct) * 1%), var(--ap-empty) calc(var(--pct) * 1%));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 5 40 38'%3E%3Cpath d='M24 42C11 33 4 26 4 17.5 4 11.2 8.8 6.5 14.6 6.5c4 0 7.3 2.1 9.4 5.4 2.1-3.3 5.4-5.4 9.4-5.4C39.2 6.5 44 11.2 44 17.5 44 26 37 33 24 42z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 5 40 38'%3E%3Cpath d='M24 42C11 33 4 26 4 17.5 4 11.2 8.8 6.5 14.6 6.5c4 0 7.3 2.1 9.4 5.4 2.1-3.3 5.4-5.4 9.4-5.4C39.2 6.5 44 11.2 44 17.5 44 26 37 33 24 42z'/%3E%3C/svg%3E") center / contain no-repeat; }
.ap-meter__bolt { position: absolute; left: 30%; top: 18%; width: 40%; height: 70%; color: var(--zs-surface); filter: drop-shadow(0 0 0 var(--zs-surface)); }
.ap-meter__nums { display: grid; gap: .25rem; }
.ap-meter__now { font: 800 clamp(2rem, 2.6vw + 1rem, 3rem)/1 var(--zs-font-display); color: var(--zs-ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ap-meter__goal { font-size: 1.05rem; color: var(--zs-muted); }
.ap-meter__goal strong { color: var(--zs-ink); }
.ap-meter__meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .35rem; font-size: .92rem; color: var(--zs-muted); }
.ap-meter__meta span { display: inline-flex; align-items: center; gap: .35rem; }
.ap-by { display: inline-flex; align-items: center; gap: .4rem; margin-top: .4rem; padding: .25rem .65rem; border-radius: 999px; background: var(--zs-surface-alt); color: var(--zs-ink); font-size: .85rem; justify-self: start; }
.ap-verified { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .65rem; border-radius: 999px; background: var(--ap-done); color: var(--ap-done-ink); font-size: .85rem; font-weight: 600; }
.ap-verified svg { width: 1rem; height: 1rem; --picto-bg: var(--ap-done); }
@media (max-width: 26rem) { .ap-meter { grid-template-columns: 1fr; justify-items: start; } }

/* ---------- Heartbeat bar on cards ---------- */
.ap-beat { --pct: 50; position: relative; height: 2.2rem; margin: .2rem 0; }
.ap-beat::before, .ap-beat::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; }
.ap-beat::before { right: 0; background: linear-gradient(var(--ap-line), var(--ap-line)) 0 50% / 100% 2px no-repeat; }
.ap-beat::after { width: calc(var(--pct) * 1%); background: var(--ap-heart);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 24'%3E%3Cpath d='M0 12h18l3-5 3 10 4-16 4 22 3-11h25' fill='none' stroke='%23000' stroke-width='2.4' stroke-linejoin='round'/%3E%3C/svg%3E") 0 50% / 3.4rem 100% repeat-x;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 24'%3E%3Cpath d='M0 12h18l3-5 3 10 4-16 4 22 3-11h25' fill='none' stroke='%23000' stroke-width='2.4' stroke-linejoin='round'/%3E%3C/svg%3E") 0 50% / 3.4rem 100% repeat-x; }
.ap-beat__dot { position: absolute; top: 50%; left: calc(var(--pct) * 1%); width: .8rem; height: .8rem; margin: -.4rem 0 0 -.4rem; border-radius: 50%; background: var(--ap-heart); box-shadow: 0 0 0 3px var(--zs-surface); }
.ap-beat-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .8rem; font-size: .92rem; color: var(--zs-muted); }
.ap-beat-line strong { color: var(--zs-ink); font: 700 1.1rem/1.2 var(--zs-font-display); }

/* ---------- Action cards ---------- */
.ap-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.ap-card { position: relative; display: flex; flex-direction: column; background: var(--zs-surface); border: 1px solid var(--zs-line); border-radius: var(--zs-radius); overflow: hidden; }
.ap-card__media { position: relative; aspect-ratio: 16 / 10; background: var(--zs-surface-alt); }
.ap-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ap-card__who { position: absolute; left: .7rem; bottom: .7rem; display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem .25rem .3rem; border-radius: 999px; background: var(--zs-surface); color: var(--zs-ink); font-size: .85rem; font-weight: 600; }
.ap-card__who svg { width: 1.4rem; height: 1.4rem; padding: .2rem; border-radius: 50%; background: var(--zs-picto); color: var(--zs-picto-ink); --picto-bg: var(--zs-picto); }
.ap-card__done { position: absolute; right: .7rem; top: .7rem; }
.ap-card__body { display: grid; gap: .5rem; padding: 1rem 1.05rem 1.1rem; flex: 1; align-content: start; }
.ap-card h3 { font-size: 1.22rem; color: var(--zs-ink); }
.ap-card h3 a { color: inherit; text-decoration: none; }
.ap-card h3 a::after { content: ""; position: absolute; inset: 0; }
.ap-card:hover { border-color: var(--zs-brand-text); }
.ap-card:has(h3 a:focus-visible) { outline: 3px solid var(--ap-focus); outline-offset: 3px; }
.ap-card h3 a:focus-visible { outline: none; }
.ap-card p { margin: 0; font-size: .95rem; color: var(--zs-muted); }

/* ---------- How it works: steps on a heartbeat line ---------- */
.ap-how { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.2rem; position: relative; }
.ap-how li { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .25rem 1rem; }
.ap-how .ap-picto { grid-row: span 2; position: relative; z-index: 1; box-shadow: 0 0 0 6px var(--zs-bg); }
.ap-how h3 { font-size: 1.15rem; color: var(--zs-ink); }
.ap-how p { margin: 0; color: var(--zs-muted); }
@media (min-width: 56rem) {
  .ap-how { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
  .ap-how li { grid-template-columns: 1fr; justify-items: start; }
  .ap-how .ap-picto { grid-row: auto; margin-bottom: .5rem; }
  .ap-how::before { content: ""; position: absolute; left: 1.5rem; right: 3rem; top: .4rem; height: 2.2rem; background: var(--ap-line);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 24'%3E%3Cpath d='M0 12h18l3-5 3 10 4-16 4 22 3-11h25' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") 0 50% / 5rem 100% repeat-x;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 24'%3E%3Cpath d='M0 12h18l3-5 3 10 4-16 4 22 3-11h25' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") 0 50% / 5rem 100% repeat-x; }
}

/* ---------- Pulse timeline (updates) ---------- */
.ap-pulse { list-style: none; margin: 0; padding: 0 0 0 1.6rem; display: grid; gap: 1.1rem; border-left: 2px solid var(--ap-line); margin-left: .6rem; }
.ap-pulse li { position: relative; }
.ap-pulse li::before { content: ""; position: absolute; left: calc(-1.6rem - 7px); top: .3rem; width: 12px; height: 12px; border-radius: 50%; background: var(--zs-surface); border: 3px solid var(--ap-heart); }
.ap-pulse li.is-done::before { width: 20px; height: 20px; left: calc(-1.6rem - 11px); top: .1rem; background: var(--ap-done); border-color: var(--ap-done); }
.ap-pulse time { display: block; font-size: .85rem; color: var(--zs-muted); }
.ap-pulse h3 { font-size: 1.08rem; color: var(--zs-ink); margin: .1rem 0 .2rem; }
.ap-pulse p { margin: 0; }

/* ---------- Payment box ---------- */
.ap-pay { display: grid; gap: .9rem; padding: 1.2rem; background: var(--zs-surface); border: 2px solid var(--ap-heart); border-radius: var(--zs-radius); }
.ap-pay h2 { font-size: 1.3rem; }
.ap-pay p { margin: 0; }
.ap-pay__note { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem .85rem; border-radius: var(--zs-radius-sm); background: var(--zs-surface-alt); font-size: .95rem; }
.ap-pay__note svg { width: 1.4rem; height: 1.4rem; flex: none; color: var(--zs-brand-text); --picto-bg: var(--zs-surface-alt); }
.ap-pay .zs-btn svg { width: 1.2rem; height: 1.2rem; --picto-bg: var(--zs-accent); }
.ap-pledge { display: grid; gap: .7rem; padding-top: .9rem; border-top: 1px dashed var(--zs-line); }
.ap-pledge h3 { font-size: 1.1rem; color: var(--zs-ink); }
.ap-amounts { display: flex; flex-wrap: wrap; gap: .45rem; }
.ap-amounts label { position: relative; }
.ap-amounts input { position: absolute; opacity: 0; inset: 0; }
.ap-amounts span { display: inline-flex; align-items: center; min-height: 2.6rem; padding: .4rem .95rem; border: 1.5px solid var(--zs-line); border-radius: 999px; font-weight: 700; cursor: pointer; background: var(--zs-surface); color: var(--zs-ink); }
.ap-amounts input:checked + span { background: var(--ap-heart-soft); border-color: var(--ap-heart); }
.ap-amounts input:focus-visible + span { outline: 3px solid var(--ap-focus); outline-offset: 2px; }

/* ---------- Fields ---------- */
.ap-field { display: grid; gap: .25rem; font-size: .88rem; font-weight: 600; color: var(--zs-muted); }
.ap-field input, .ap-field select, .ap-field textarea { font: inherit; font-size: 1rem; font-weight: 400; color: var(--zs-ink); min-height: 2.9rem; padding: .6rem .75rem; border: 1.5px solid var(--zs-line); border-radius: var(--zs-radius-sm); background: var(--zs-surface); width: 100%; }
.ap-field textarea { min-height: 6.5rem; resize: vertical; }
.ap-field input:focus-visible, .ap-field select:focus-visible, .ap-field textarea:focus-visible { outline: 3px solid var(--ap-focus); outline-offset: 1px; }
.ap-field small { font-weight: 400; }
.ap-req { color: var(--zs-ink); font-weight: 700; }

/* ---------- Plan facts (device, cabinet, place) ---------- */
.ap-plan { margin: 0; display: grid; gap: 0; background: var(--zs-surface); border: 1px solid var(--zs-line); border-radius: var(--zs-radius); overflow: hidden; }
.ap-plan > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .15rem .85rem; align-items: center; padding: .8rem 1rem; }
.ap-plan > div + div { border-top: 1px solid var(--zs-line); }
.ap-plan .ap-picto { grid-row: span 2; }
.ap-plan dt { font-weight: 600; }
.ap-plan dd { margin: 0; color: var(--zs-muted); font-size: .95rem; }

/* ---------- Result: De AED hangt ---------- */
.ap-done { display: grid; gap: 1.2rem; padding: 1.3rem; border-radius: var(--zs-radius); background: var(--ap-done); color: var(--ap-done-ink); }
.ap-done h2, .ap-done h3 { color: inherit; }
.ap-done p { margin: 0; }
.ap-done__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.ap-done__steps li { display: flex; gap: .55rem; align-items: flex-start; }
.ap-done__steps svg { width: 1.35rem; height: 1.35rem; flex: none; color: var(--ap-done-ink); --picto-bg: var(--ap-done); }
@media (min-width: 48rem) { .ap-done { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; } }

/* ---------- Tips + sister site ---------- */
.ap-tips { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.ap-tips li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .25rem .9rem; padding: 1.1rem; background: var(--zs-surface); border: 1px solid var(--zs-line); border-radius: var(--zs-radius); }
.ap-tips .ap-picto { grid-row: span 2; }
.ap-tips h3 { font-size: 1.12rem; color: var(--zs-ink); }
.ap-tips p { margin: 0; color: var(--zs-muted); font-size: .95rem; }
.ap-sister { display: grid; gap: 1rem 1.5rem; align-items: center; padding: 1.5rem; border-radius: 18px; background: var(--ap-sign); color: var(--ap-sign-ink);
  box-shadow: inset 0 0 0 6px var(--ap-sign), inset 0 0 0 9px color-mix(in srgb, var(--ap-sign-ink) 92%, transparent); }
.ap-sister h2 { color: inherit; font-size: clamp(1.4rem, 1vw + 1.1rem, 1.9rem); }
.ap-sister p { margin: .35rem 0 0; max-width: 40rem; }
.ap-sister__sym { width: 4rem; height: 4rem; --picto-bg: var(--ap-sign); color: var(--ap-sign-ink); }
.ap-sister .zs-btn { justify-self: start; background: var(--ap-sign-ink); color: var(--ap-sign); }
.ap-sister .zs-btn:hover { background: color-mix(in srgb, var(--ap-sign-ink) 88%, var(--ap-sign)); color: var(--ap-sign); }
@media (min-width: 48rem) { .ap-sister { grid-template-columns: auto minmax(0, 1fr) auto; padding: 1.8rem 2.2rem; } }

/* ---------- Action page layout + form steps ---------- */
.ap-action { display: grid; gap: 1.6rem; }
@media (min-width: 60rem) { .ap-action { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; } .ap-aside { position: sticky; top: 1rem; } }
.ap-crumbs { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: .9rem; color: var(--zs-muted); }
.ap-crumbs li + li::before { content: "›"; margin-right: .3rem; }
.ap-where { display: flex; flex-wrap: wrap; gap: .2rem .9rem; margin: 0; font-size: .92rem; color: var(--zs-muted); }
.ap-where span { display: inline-flex; align-items: center; gap: .3rem; }
.ap-panel { display: grid; gap: .8rem; padding: 1.15rem; background: var(--zs-surface); border: 1px solid var(--zs-line); border-radius: var(--zs-radius); }
.ap-panel h2 { font-size: 1.25rem; display: flex; align-items: center; gap: .55rem; }
.ap-panel p { margin: 0; }
.ap-report { display: inline-flex; align-items: center; gap: .4rem; font-size: .92rem; color: var(--zs-muted); }
.ap-steps { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .35rem; }
.ap-steps li { display: grid; justify-items: center; gap: .35rem; text-align: center; font-size: .8rem; font-weight: 600; color: var(--zs-muted); padding-top: .55rem; border-top: 4px solid var(--zs-line); }
.ap-steps li.is-done { border-top-color: var(--zs-brand-text); color: var(--zs-ink); }
.ap-steps li[aria-current] { border-top-color: var(--ap-heart); color: var(--zs-ink); }
.ap-steps li:not(.is-done):not([aria-current]) .ap-picto { --picto-bg: var(--zs-surface-alt); background: var(--zs-surface-alt); color: var(--zs-muted); }
@media (max-width: 36rem) { .ap-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: .8rem; } }
.ap-form { display: grid; gap: 1.1rem; background: var(--zs-surface); border: 1px solid var(--zs-line); border-radius: var(--zs-radius); padding: clamp(1rem, 3vw, 1.75rem); }
.ap-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: .9rem; }
.ap-form legend { display: flex; align-items: center; gap: .6rem; font: 700 1.2rem/1.2 var(--zs-font-display); color: var(--zs-brand-text); margin-bottom: .4rem; }
.ap-form__row { display: grid; gap: .9rem; }
@media (min-width: 40rem) { .ap-form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ap-choice { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.ap-choice label { position: relative; }
.ap-choice input { position: absolute; opacity: 0; inset: 0; }
.ap-choice span { display: grid; gap: .2rem; height: 100%; padding: .85rem .95rem; border: 1.5px solid var(--zs-line); border-radius: var(--zs-radius-sm); background: var(--zs-surface); color: var(--zs-ink); cursor: pointer; }
.ap-choice span b { display: flex; align-items: center; gap: .45rem; }
.ap-choice span small { color: var(--zs-muted); font-size: .88rem; }
.ap-choice input:checked + span { border-color: var(--ap-heart); background: var(--ap-heart-soft); }
.ap-choice input:focus-visible + span { outline: 3px solid var(--ap-focus); outline-offset: 2px; }
.ap-form__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center; }
.ap-footer__sign { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.6rem; }
.ap-footer__sign .ap-mark { width: 3rem; height: 3rem; color: #fff; }
.ap-footer__sign p { margin: 0; max-width: 36rem; }
.zs-hero__credit { left: 1rem; text-align: right; }
.zs-btn .ap-ico { color: currentColor; --picto-bg: var(--zs-accent); }
