/* Keep desktop checkout and evidence together without clipping or hiding content. */
@media (min-width: 1000px) and (max-height: 1200px) {
  body:has(.recharge-heading) { --checkout-header: 98px; }
  body:has(.recharge-heading) .header-line { height: 68px; }
  body.shared-checkout .header-line { grid-template-rows: 36px 32px; height: 68px; }
  body:has(.recharge-heading) .trust-badge { padding-top: 4px; padding-bottom: 4px; }
  body:has(.recharge-heading) .compact-header nav,
  body:has(.recharge-heading) .compact-header nav a { height: 30px; }
  body:has(.recharge-heading) .compact-main {
    min-height: calc(100dvh - var(--checkout-header));
    display: flex;
    flex-direction: column;
  }
  body:has(.recharge-heading) .compact-main > * { flex-shrink: 0; }
  body:has(.recharge-heading) .recharge-heading { padding-top: 12px; margin-bottom: 8px; }
  body:has(.recharge-heading) .current-skill { margin-bottom: 4px; }
  body:has(.recharge-heading) .recharge-heading h1 { font-size: 36px; line-height: 1.2; }
  body:has(.recharge-heading) .recharge-caption { font-size: 20px; line-height: 1.4; margin-top: 4px; }
  body:has(.recharge-heading) .account-line { margin-bottom: 8px; }
  body:has(.recharge-heading) .compact-notice { margin-top: 0; margin-bottom: 6px; }
  body:has(.recharge-heading) #notice:empty { min-height: 0; margin: 0; }
  body:has(.recharge-heading) #plans-panel { padding-top: 8px; }
  body:has(.recharge-heading) .recharge-delivery-note { margin-top: 0; margin-bottom: 12px; padding: 6px 12px; }
  body:has(.recharge-heading) .plan,
  body:has(.recharge-heading) .plan[aria-checked=true] { min-height: 152px; padding-top: 18px; padding-bottom: 12px; }
  body:has(.recharge-heading) .price { font-size: 40px; margin: 5px 0 6px; }
  body:has(.recharge-heading) .plan-period { margin-top: 3px; }
  body:has(.recharge-heading) .compact-checkout { margin-top: 10px; margin-bottom: 12px; }
  body:has(.recharge-heading) #plan-guidance { padding: 6px 12px; min-height: 36px; margin-bottom: 10px; }
  body:has(.recharge-heading) .checkout-action > button { min-height: 44px; }
  body:has(.recharge-heading) .payment-terms { margin-top: 6px; margin-bottom: 0; }
  body .compact-main > .reputation.trust-proof { padding-top: 8px; padding-bottom: 10px; margin-top: auto; }
  body .trust-proof .proof-eyebrow { margin-bottom: 4px; }
  body .trust-proof .proof-inner { padding-top: 8px; padding-bottom: 8px; }
  body .trust-proof .proof-score strong { font-size: 40px; }
  body .trust-proof .proof-stars { font-size: 20px; line-height: 1.2; }
  body .trust-proof .proof-version { line-height: 1.3; }
  body .trust-proof .proof-metrics { gap: 3px; }
  body .trust-proof .proof-bottom { margin-top: 8px; }
  body[data-product=temu] { --checkout-header: 88px; }
  body[data-product=temu] .header-line { height: 58px; }
  body[data-product=temu] .enterprise-trial { margin-top: 0; margin-bottom: 6px; }
}
@media (min-width: 1000px) and (max-height: 850px) {
  body:has(.recharge-heading) .recharge-heading { padding-top: 8px; margin-bottom: 6px; }
  body:has(.recharge-heading) .recharge-heading h1 { font-size: 32px; }
  body:has(.recharge-heading) .recharge-caption { font-size: 18px; line-height: 1.4; margin-top: 3px; }
  body:has(.recharge-heading) .current-skill { margin-bottom: 2px; }
  body:has(.recharge-heading) .account-line { margin-bottom: 6px; }
  body:has(.recharge-heading) .plan,
  body:has(.recharge-heading) .plan[aria-checked=true] { min-height: 138px; padding-top: 14px; padding-bottom: 10px; }
  body:has(.recharge-heading) .price { font-size: 36px; margin-top: 4px; margin-bottom: 4px; }
  body:has(.recharge-heading) .compact-checkout { margin-top: 8px; margin-bottom: 8px; }
  body:has(.recharge-heading) #plan-guidance { padding-top: 4px; padding-bottom: 4px; margin-bottom: 8px; }
}
@media (min-width: 1000px) and (max-height: 760px) {
  body:has(.recharge-heading) .compact-checkout { max-width: 920px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; align-items: center; }
  body:has(.recharge-heading) #plan-guidance { margin-bottom: 0; min-height: 44px; }
  body:has(.recharge-heading) .payment-terms { grid-column: 1 / -1; margin-top: 0; }
}
@media (min-width: 1000px) and (max-height: 700px) {
  body:has(.recharge-heading) .recharge-heading { display: grid; grid-template-columns: auto auto; justify-content: center; column-gap: 18px; padding-top: 4px; margin-bottom: 4px; }
  body:has(.recharge-heading) .current-skill { grid-column: 1 / -1; }
  body:has(.recharge-heading) .recharge-caption { margin-top: 0; align-self: center; }
  body:has(.recharge-heading) .recharge-delivery-note { padding-top: 2px; padding-bottom: 2px; margin-bottom: 10px; line-height: 1.45; }
  body:has(.recharge-heading) .plan,
  body:has(.recharge-heading) .plan[aria-checked=true] { min-height: 126px; padding-top: 10px; padding-bottom: 8px; }
  body:has(.recharge-heading) .price { font-size: 34px; }
  body:has(.recharge-heading) .compact-checkout { margin-top: 4px; margin-bottom: 4px; }
  body:has(.recharge-heading) .account-line { margin-bottom: 2px; }
  body[data-product=temu] .enterprise-trial { margin-bottom: 2px; }
}

/* Share spare height above and below checkout instead of leaving a bottom void. */
@media (min-width: 1000px) and (max-height: 1200px) {
  body:has(.recharge-heading) { --checkout-header: 114px; }
  body:has(.recharge-heading) .compact-header { padding-top: 8px; padding-bottom: 8px; }
  body:has(.recharge-heading) .recharge-heading { margin-top: auto; }
  body[data-product=temu] { --checkout-header: 104px; }
}

/* Tall windows have room for readable, comfortably spaced checkout content. */
@media (min-width: 1000px) and (min-height: 901px) and (max-height: 1200px) {
  body:has(.recharge-heading) .recharge-heading { padding-top: 20px; margin-bottom: 8px; }
  body:has(.recharge-heading) .current-skill { margin-bottom: 4px; }
  body:has(.recharge-heading) .recharge-heading h1 { font-size: 40px; }
  body:has(.recharge-heading) .recharge-caption { margin-top: 8px; }
  body:has(.recharge-heading) .account-line { margin-bottom: 10px; }
  body:has(.recharge-heading) .recharge-delivery-note { padding-top: 8px; padding-bottom: 8px; margin-bottom: 16px; }
  body:has(.recharge-heading) .plan,
  body:has(.recharge-heading) .plan[aria-checked=true] { min-height: 164px; padding-top: 20px; padding-bottom: 14px; }
  body:has(.recharge-heading) .price { font-size: 40px; margin-top: 6px; margin-bottom: 8px; }
  body:has(.recharge-heading) .compact-checkout { margin-top: 12px; margin-bottom: 12px; }
  body:has(.recharge-heading) #plan-guidance { padding-top: 6px; padding-bottom: 6px; margin-bottom: 12px; }
  body:has(.recharge-heading) .checkout-action > button { min-height: 44px; }
  body:has(.recharge-heading) .payment-terms { margin-top: 6px; }
}

/* Short desktop windows keep their compact layout, with the brand inside its row. */
@media (min-width: 1000px) and (min-height: 701px) and (max-height: 850px) {
  body:has(.recharge-heading) { --checkout-header: 102px; }
  body:has(.recharge-heading) .compact-header { padding-top: 4px; padding-bottom: 0; }
  body[data-product=temu] { --checkout-header: 92px; }
  body[data-product=temu] .enterprise-trial { margin-bottom: 2px; }
}

@media (min-width: 1000px) and (max-height: 700px) {
  body:has(.recharge-heading) { --checkout-header: 98px; }
  body:has(.recharge-heading) .compact-header { padding-top: 0; padding-bottom: 0; }
  body.shared-checkout .header-line { grid-template-rows: 40px 28px; }
  body[data-product=temu] { --checkout-header: 88px; }
}
