/* RC165.23 · /donate/ experience convergence over deployed Theme 13.41.31.
 * Presentation only: stronger hierarchy, calmer brand repetition, denser desktop cards,
 * edge-friendly mobile layout. No route, tracking or payment behavior. */

body.dhv-support-page-surface .dhv-page-head{
  width:min(calc(100% - 40px),1120px);
  margin-bottom:14px;
}
body.dhv-support-page-surface .dhv-page-head h1{
  max-width:100%;
  font-size:clamp(34px,3.8vw,48px);
  line-height:1.02;
  letter-spacing:-.038em;
}

.dhv-support-system{
  --support-shell:960px;
  border-radius:14px;
  box-shadow:0 16px 42px rgba(17,24,39,.055);
}
.dhv-support-shell{width:min(calc(100% - 56px),var(--support-shell));}

.dhv-support-hero-grid{
  grid-template-columns:minmax(0,1.18fr) minmax(270px,.82fr);
  gap:clamp(30px,5vw,58px);
  padding:clamp(46px,5.5vw,64px) 0;
}
.dhv-support-hero-copy h2{
  max-width:17ch;
  font-size:clamp(36px,4.4vw,52px);
  line-height:1.035;
}
.dhv-support-deck{
  max-width:60ch;
  margin-top:15px!important;
  font-size:15px;
  line-height:1.66;
}
.dhv-support-hero-actions{margin-top:22px;}
.dhv-support-hero-cta{
  min-height:48px;
  padding:13px 19px;
  font-size:13px;
  border-radius:10px;
}
.dhv-support-boundary{
  padding:22px;
  border-radius:14px;
  background:var(--dhv-surface-soft,#f6f7f8);
  box-shadow:0 8px 24px rgba(17,24,39,.035);
}
.dhv-support-boundary strong{font-size:12px;}
.dhv-support-boundary p{font-size:13px;line-height:1.62;}

.dhv-support-section{padding:clamp(44px,4.9vw,58px) 0;}
.dhv-support-section-head{
  max-width:760px;
  margin-bottom:26px;
}
.dhv-support-section-head>p{
  max-width:66ch;
  font-size:14px;
  line-height:1.64;
}

/* Give the work behind an article enough room to read like work, not tiny feature tiles. */
.dhv-support-purpose-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.dhv-support-purpose-card{
  min-height:180px;
  padding:22px;
  border-radius:14px;
}
.dhv-support-purpose-card>span{
  display:inline-grid;
  place-items:center;
  width:34px;
  height:34px;
  margin-bottom:15px;
  border-radius:999px;
  background:color-mix(in srgb,var(--dhv-red) 9%,var(--dhv-bg));
  font-size:12px;
}
.dhv-support-purpose-card h3{font-size:19px;margin-bottom:9px;}
.dhv-support-purpose-card p{font-size:13px;line-height:1.62;}

.dhv-support-principles-grid{
  grid-template-columns:minmax(250px,.88fr) minmax(0,1.12fr);
  gap:clamp(32px,5.4vw,62px);
}
.dhv-support-principles-grid>div:first-child h2{max-width:14ch;}
.dhv-support-principle-list article{padding:18px 0;}
.dhv-support-principle-list h3{font-size:18px;}
.dhv-support-principle-list p{font-size:13px;line-height:1.6;}

/* VietQR is the primary action, so keep one calm, centered action stage. */
.dhv-support-routes .dhv-support-section-head,
.dhv-support-route-grid.is-single-route{
  width:min(100%,860px);
  margin-inline:auto;
}
.dhv-support-routes .dhv-support-section-head{margin-bottom:24px;}
.dhv-support-route-grid.is-single-route{max-width:860px;}
.dhv-support-route-card.is-vietqr{
  border-radius:14px;
  box-shadow:0 14px 34px rgba(17,24,39,.05);
}
.dhv-support-routes img{
  max-width:100%;
  height:auto;
}
.dhv-support-route-copy>strong{font-size:19px!important;line-height:1.25;}
.dhv-support-route-copy p{font-size:13px;line-height:1.6;}

.dhv-support-other-grid{gap:14px;}
.dhv-support-other-card{
  min-height:170px;
  padding:21px;
  border-radius:14px;
}
.dhv-support-other-card h3{font-size:18px;}
.dhv-support-other-card p{font-size:13px;line-height:1.6;}
.dhv-support-other-card>span{padding-top:16px;}

.dhv-support-ending{padding:48px 0 50px;}
.dhv-support-ending .dhv-support-shell{max-width:720px;}
.dhv-support-ending h2{
  font-size:clamp(30px,3.55vw,42px);
  line-height:1.08;
}
.dhv-support-ending p{font-size:15px;line-height:1.65;}

/* Long-form reading on phones should not be repeatedly covered by the site header. */
@media (max-width:820px){
  body.dhv-support-page-surface .dhv-site-header{
    position:relative!important;
    top:auto!important;
  }
  body.admin-bar.dhv-support-page-surface .dhv-site-header{top:auto!important;}
  .dhv-support-hero-grid,
  .dhv-support-principles-grid{grid-template-columns:1fr;}
}

@media (max-width:640px){
  body.dhv-support-page-surface .dhv-page-head{
    width:calc(100% - 32px);
    margin-bottom:9px;
  }
  body.dhv-support-page-surface .dhv-page-head h1{
    font-size:clamp(30px,8.7vw,36px);
    line-height:1.03;
  }
  .dhv-support-system{
    width:100%;
    border-left:0;
    border-right:0;
    border-radius:0;
    box-shadow:none;
  }
  .dhv-support-shell{width:calc(100% - 32px);}
  .dhv-support-hero-grid{
    gap:18px;
    padding:30px 0 28px;
  }
  .dhv-support-hero-copy h2{
    max-width:none;
    font-size:clamp(30px,8.4vw,36px);
    line-height:1.04;
  }
  .dhv-support-deck{
    margin-top:12px!important;
    font-size:15px;
    line-height:1.58;
  }
  .dhv-support-hero-actions{
    margin-top:19px;
    gap:9px;
  }
  .dhv-support-hero-actions>span{
    font-size:12px;
    text-align:left;
  }
  .dhv-support-boundary{
    padding:16px;
    border-radius:14px;
  }
  .dhv-support-section{padding:32px 0;}
  .dhv-support-system h2{
    font-size:clamp(27px,7.8vw,33px);
    line-height:1.07;
  }
  .dhv-support-section-head{margin-bottom:18px;}
  .dhv-support-section-head>p{
    margin-top:10px;
    font-size:13px;
    line-height:1.55;
  }
  .dhv-support-purpose-grid,
  .dhv-support-other-grid{grid-template-columns:1fr;gap:10px;}
  .dhv-support-purpose-card{
    min-height:0;
    padding:16px;
    border-radius:14px;
  }
  .dhv-support-purpose-card>span{
    width:30px;
    height:30px;
    margin-bottom:11px;
  }
  .dhv-support-purpose-card h3,
  .dhv-support-other-card h3{font-size:17px;}
  .dhv-support-purpose-card p,
  .dhv-support-other-card p,
  .dhv-support-principle-list p{
    font-size:13px;
    line-height:1.52;
  }
  .dhv-support-principles-grid{gap:18px;}
  .dhv-support-principle-list article{padding:14px 0;}
  .dhv-support-routes .dhv-support-section-head,
  .dhv-support-route-grid.is-single-route{width:100%;}
  /* Theme 13.41.31 already renders the real QR/download UI below the route summary. */
  .dhv-support-route-grid.is-single-route .dhv-support-route-card.is-vietqr .dhv-support-route-qr{
    display:none!important;
  }
  .dhv-support-route-grid.is-single-route .dhv-support-route-card.is-vietqr{
    gap:0;
    padding:15px;
    border-radius:14px;
  }
  .dhv-support-route-copy>strong{font-size:18px!important;}
  .dhv-support-other-card{
    min-height:0;
    padding:17px;
    border-radius:14px;
  }
  .dhv-support-ending{padding:34px 0 36px;}
  .dhv-support-ending h2{
    font-size:clamp(27px,7.8vw,33px);
    line-height:1.08;
  }
}

/* RC165.24 · Public payment acknowledgement. Read-only success state sourced only
 * from backend payment truth; observed is a separate pre-confirmation state. */
.dhv-support-payment-ack{
  width:min(100%,860px);
  margin:0 auto 18px;
  padding:15px 17px;
  display:flex;
  align-items:flex-start;
  gap:12px;
  border:1px solid color-mix(in srgb,var(--dhv-line) 82%,var(--dhv-red));
  border-radius:14px;
  background:var(--dhv-surface-soft,#f6f7f8);
  color:var(--dhv-ink);
}
.dhv-support-payment-ack[hidden]{display:none!important;}
.dhv-support-payment-ack__mark{
  flex:0 0 28px;
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:var(--dhv-chip);
  font-size:14px;
  font-weight:800;
}
.dhv-support-payment-ack strong{
  display:block;
  font-size:15px;
  line-height:1.35;
}
.dhv-support-payment-ack p{
  margin:4px 0 0;
  color:var(--dhv-muted);
  font-size:13px;
  line-height:1.5;
}
.dhv-support-payment-ack.is-observed{
  border-color:color-mix(in srgb,#c58a22 45%,var(--dhv-line));
  background:color-mix(in srgb,#fff8e8 74%,var(--dhv-bg));
}
.dhv-support-payment-ack.is-observed .dhv-support-payment-ack__mark{
  color:#9b6816;
  background:color-mix(in srgb,#f0b64d 20%,var(--dhv-bg));
}
.dhv-support-payment-ack.is-confirmed{
  border-color:color-mix(in srgb,#23834b 46%,var(--dhv-line));
  background:color-mix(in srgb,#eefaf2 78%,var(--dhv-bg));
}
.dhv-support-payment-ack.is-confirmed .dhv-support-payment-ack__mark{
  color:#166a3a;
  background:color-mix(in srgb,#55b879 18%,var(--dhv-bg));
}
.dhv-support-payment-ack.is-expired{
  border-color:color-mix(in srgb,var(--dhv-red) 38%,var(--dhv-line));
}

@media (max-width:640px){
  .dhv-support-payment-ack{
    margin-bottom:13px;
    padding:13px 14px;
    border-radius:12px;
  }
  .dhv-support-payment-ack strong{font-size:14px;}
  .dhv-support-payment-ack p{font-size:13px;line-height:1.48;}
}

/* RC166.3.50 · Guided amount + near-realtime acknowledgement flow. Core-only
 * progressive enhancement over the existing Theme-owned VietQR presentation. */
.dhv-support-amount-flow{
  display:grid;
  gap:16px;
  margin:0 0 18px;
  padding:18px;
  border:1px solid color-mix(in srgb,var(--dhv-red) 18%,var(--dhv-line));
  border-radius:14px;
  background:color-mix(in srgb,var(--dhv-surface-soft,#f6f7f8) 70%,var(--dhv-bg));
}
.dhv-support-amount-flow__top{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;}
.dhv-support-amount-flow__copy{display:grid;gap:4px;min-width:0;}
.dhv-support-amount-flow__copy>span{color:var(--dhv-red-strong);font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;}
.dhv-support-amount-flow__copy>strong{color:var(--dhv-ink);font-size:17px;line-height:1.3;}
.dhv-support-amount-flow__copy>p{color:var(--dhv-muted);font-size:12.5px;line-height:1.5;}
.dhv-support-amount-flow__amount{flex:none;color:var(--dhv-ink);font-size:clamp(21px,3vw,30px);font-weight:800;line-height:1;letter-spacing:-.02em;white-space:nowrap;}
.dhv-support-amount-flow__range{width:100%;margin:2px 0 0;accent-color:var(--dhv-red);cursor:pointer;}
.dhv-support-amount-flow__ticks{display:grid;grid-template-columns:repeat(auto-fit,minmax(48px,1fr));gap:5px;margin-top:-5px;}
.dhv-support-amount-flow__ticks button{min-width:0;padding:6px 2px;border:0;background:transparent;color:var(--dhv-muted);font:inherit;font-size:10.5px;font-weight:700;cursor:pointer;}
.dhv-support-amount-flow__ticks button:hover,.dhv-support-amount-flow__ticks button:focus-visible{color:var(--dhv-red-strong);outline:none;text-decoration:underline;text-underline-offset:3px;}
.dhv-support-amount-flow__custom{display:flex;align-items:end;justify-content:space-between;gap:12px;padding-top:2px;}
.dhv-support-amount-flow__custom label{display:grid;gap:6px;min-width:0;max-width:320px;flex:1;color:var(--dhv-muted);font-size:11.5px;font-weight:700;}
.dhv-support-amount-flow__input-wrap{display:flex;align-items:center;min-height:42px;padding:0 11px;border:1px solid var(--dhv-line);border-radius:10px;background:var(--dhv-bg);}
.dhv-support-amount-flow__input-wrap:focus-within{border-color:color-mix(in srgb,var(--dhv-red) 52%,var(--dhv-line));box-shadow:0 0 0 3px color-mix(in srgb,var(--dhv-red) 13%,transparent);}
.dhv-support-amount-flow__input-wrap input{width:100%;min-width:0;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;color:var(--dhv-ink);font:inherit;font-size:14px;font-weight:700;}
.dhv-support-amount-flow__input-wrap b{padding-left:8px;color:var(--dhv-muted);font-size:12px;}
.dhv-support-amount-flow__refresh{min-height:42px;padding:9px 14px;border:1px solid var(--dhv-red);border-radius:10px;background:var(--dhv-red);color:#fff;font:inherit;font-size:12px;font-weight:800;cursor:pointer;white-space:nowrap;}
.dhv-support-amount-flow__refresh[hidden]{display:none!important;}
.dhv-support-amount-flow__refresh:hover{filter:brightness(.96);}
.dhv-support-amount-flow__refresh:disabled{opacity:.62;cursor:wait;filter:none;}
.dhv-support-amount-flow__refresh:focus-visible{outline:3px solid color-mix(in srgb,var(--dhv-red) 24%,transparent);outline-offset:3px;}
.dhv-support-amount-flow__hint{margin:0!important;color:var(--dhv-muted);font-size:11.5px!important;line-height:1.5!important;}
.dhv-support-amount-flow.is-qr-stale{border-color:color-mix(in srgb,#d99a2b 42%,var(--dhv-line));}
.dhv-support-amount-flow.is-qr-error,.dhv-support-amount-flow.is-qr-expired{border-color:color-mix(in srgb,#d99a2b 58%,var(--dhv-line));}

.dhv-support-success-toast{position:fixed;z-index:99999;right:18px;bottom:18px;display:flex;align-items:flex-start;gap:12px;width:min(390px,calc(100vw - 36px));padding:15px 16px;border:1px solid color-mix(in srgb,#55b879 38%,var(--dhv-line));border-radius:13px;background:var(--dhv-bg);box-shadow:0 18px 45px rgba(27,19,16,.18);opacity:0;transform:translateY(16px);pointer-events:none;transition:opacity .2s ease,transform .2s ease;}
.dhv-support-success-toast.is-visible{opacity:1;transform:translateY(0);}
.dhv-support-success-toast>span{display:grid;place-items:center;width:30px;height:30px;border-radius:999px;background:color-mix(in srgb,#55b879 18%,var(--dhv-bg));color:#257445;font-size:16px;font-weight:900;}
.dhv-support-success-toast strong{display:block;color:var(--dhv-ink);font-size:14px;line-height:1.35;}
.dhv-support-success-toast p{margin:3px 0 0!important;color:var(--dhv-muted);font-size:12.5px!important;line-height:1.45!important;}

@media(max-width:640px){
  .dhv-support-amount-flow{gap:14px;padding:15px;margin-bottom:14px;}
  .dhv-support-amount-flow__top{align-items:flex-start;gap:12px;}
  .dhv-support-amount-flow__copy>p{font-size:12px;}
  .dhv-support-amount-flow__amount{font-size:22px;}
  .dhv-support-amount-flow__ticks{gap:0;}
  .dhv-support-amount-flow__ticks button{font-size:9.5px;padding-inline:0;}
  .dhv-support-amount-flow__custom{display:grid;grid-template-columns:1fr;align-items:stretch;}
  .dhv-support-amount-flow__custom label{max-width:none;}
  .dhv-support-amount-flow__refresh{width:100%;min-height:46px;}
  .dhv-support-success-toast{right:10px;bottom:calc(10px + env(safe-area-inset-bottom));width:calc(100vw - 20px);}
}
@media(prefers-reduced-motion:reduce){.dhv-support-success-toast{transition:none;}}

/* RC166.3.53 · Durable public support progress. Aggregate-only projection from
 * contribution truth; no donor/transaction rows are rendered. */
.dhv-support-progress{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas:"eyebrow amount" "meta amount";
  align-items:center;
  gap:4px 20px;
  margin:0 0 18px;
  padding:16px 18px;
  border:1px solid var(--dhv-line);
  border-radius:14px;
  background:var(--dhv-bg);
}
.dhv-support-progress__eyebrow{
  grid-area:eyebrow;
  color:var(--dhv-muted);
  font-size:11px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.dhv-support-progress__amount{
  grid-area:amount;
  color:var(--dhv-ink);
  font-size:clamp(22px,3vw,30px);
  font-weight:850;
  line-height:1;
  letter-spacing:-.025em;
  white-space:nowrap;
}
.dhv-support-progress__meta{
  grid-area:meta;
  margin:0!important;
  color:var(--dhv-muted);
  font-size:12.5px!important;
  line-height:1.5!important;
}
.dhv-support-progress.has-contributions{
  border-color:color-mix(in srgb,#55b879 28%,var(--dhv-line));
  background:color-mix(in srgb,#eefaf2 42%,var(--dhv-bg));
}

/* Make the amount chooser read visually like a bounded money timeline. */
.dhv-support-amount-flow__range{
  -webkit-appearance:none;
  appearance:none;
  height:6px;
  border-radius:999px;
  outline:none;
  background:linear-gradient(to right,var(--dhv-red) 0 var(--dhv-support-range-progress,0%),color-mix(in srgb,var(--dhv-line) 86%,transparent) var(--dhv-support-range-progress,0%) 100%);
}
.dhv-support-amount-flow__range::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:20px;
  height:20px;
  border:3px solid var(--dhv-bg);
  border-radius:999px;
  background:var(--dhv-red);
  box-shadow:0 0 0 1px color-mix(in srgb,var(--dhv-red) 40%,var(--dhv-line));
  cursor:pointer;
}
.dhv-support-amount-flow__range::-moz-range-thumb{
  width:14px;
  height:14px;
  border:3px solid var(--dhv-bg);
  border-radius:999px;
  background:var(--dhv-red);
  box-shadow:0 0 0 1px color-mix(in srgb,var(--dhv-red) 40%,var(--dhv-line));
  cursor:pointer;
}
.dhv-support-amount-flow__ticks button.is-active{
  color:var(--dhv-red-strong);
  font-weight:850;
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:4px;
}

@media(max-width:640px){
  .dhv-support-progress{
    grid-template-columns:1fr;
    grid-template-areas:"eyebrow" "amount" "meta";
    gap:6px;
    padding:14px 15px;
    margin-bottom:14px;
  }
  .dhv-support-progress__amount{font-size:24px;}
  .dhv-support-progress__meta{font-size:12px!important;}
}

/* RC166.3.54 · Realtime acknowledgement convergence. The status timeline is
 * presentation-only and reflects the existing payment acknowledgement truth. */
.dhv-support-payment-ack__body{min-width:0;flex:1;}
.dhv-support-payment-ack__timeline{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin:12px 0 0!important;
  padding:0!important;
  list-style:none!important;
}
.dhv-support-payment-ack__timeline li{
  position:relative;
  display:grid;
  grid-template-columns:22px minmax(0,1fr);
  align-items:center;
  gap:7px;
  min-width:0;
  color:var(--dhv-muted);
  font-size:10.5px;
  line-height:1.25;
}
.dhv-support-payment-ack__timeline li:not(:last-child)::after{
  content:"";
  position:absolute;
  top:10px;
  left:22px;
  right:-8px;
  height:1px;
  background:var(--dhv-line);
  z-index:0;
}
.dhv-support-payment-ack__timeline li>span{
  position:relative;
  z-index:1;
  display:grid;
  place-items:center;
  width:22px;
  height:22px;
  border:1px solid var(--dhv-line);
  border-radius:999px;
  background:var(--dhv-bg);
  color:var(--dhv-muted);
  font-size:10px;
  font-weight:850;
}
.dhv-support-payment-ack__timeline li>b{
  position:relative;
  z-index:1;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font:inherit;
  font-weight:750;
}
.dhv-support-payment-ack__timeline li.is-done{color:var(--dhv-ink);}
.dhv-support-payment-ack__timeline li.is-done>span{
  border-color:color-mix(in srgb,#55b879 50%,var(--dhv-line));
  background:color-mix(in srgb,#55b879 15%,var(--dhv-bg));
  color:#257445;
}
.dhv-support-payment-ack__timeline li.is-done:not(:last-child)::after{
  background:color-mix(in srgb,#55b879 44%,var(--dhv-line));
}
.dhv-support-payment-ack__timeline li.is-active>b{font-weight:850;}
.dhv-support-payment-ack__countdown{
  display:block;
  min-height:1.4em;
  margin-top:9px;
  color:var(--dhv-muted);
  font-size:11px;
  line-height:1.4;
}
.dhv-support-payment-ack__countdown[hidden]{display:none!important;}
.dhv-support-payment-ack.is-confirmed{
  animation:dhv-support-confirmed-in .42s ease-out both;
}
@keyframes dhv-support-confirmed-in{
  from{opacity:.72;transform:translateY(5px) scale(.995);}
  to{opacity:1;transform:none;}
}
@media(max-width:640px){
  .dhv-support-payment-ack__timeline{gap:4px;margin-top:11px!important;}
  .dhv-support-payment-ack__timeline li{grid-template-columns:20px minmax(0,1fr);gap:5px;font-size:9.5px;}
  .dhv-support-payment-ack__timeline li>span{width:20px;height:20px;font-size:9px;}
  .dhv-support-payment-ack__timeline li:not(:last-child)::after{top:9px;left:20px;right:-4px;}
  .dhv-support-payment-ack__countdown{font-size:10.5px;}
}
@media(prefers-reduced-motion:reduce){
  .dhv-support-payment-ack.is-confirmed{animation:none;}
}
