/* One spacing scale for the whole order page, including its footer.
   Text: 4–8px; related content: 12–16px; groups: 24px; sections: 32px.
   Containers own their spacing so child and inherited margins never add up. */
body[data-page=confirmation] { --order-width: 1200px; --order-gutter: 32px; --order-section: 32px; --order-group: 24px; --order-card-padding: 24px; --order-page-padding: 24px; }
.order-status { --ink: #191919; --muted: #686868; --line: #dedede; --surface: #f1f1f1; --accent: #191919; --error: #292929; max-width: var(--order-width); margin: 0 auto; padding: var(--order-page-padding) var(--order-gutter) var(--order-section); text-align: left; color: var(--ink); }
.order-status .checkout-icon { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: inherit; }
.order-navigation { display: flex; align-items: center; gap: 16px; margin: 0 0 12px; }
.order-navigation .checkout-back { min-height: 44px; margin: 0; padding: 0; line-height: 20px; }
.status-hero { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(220px, auto); gap: 20px; align-items: center; min-height: 152px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fdfdfd; }
.status-hero-copy, .status-next { min-width: 0; }
.mono-order-preview { display: flex; align-items: center; gap: 16px; margin-top: 20px; min-width: 0; }
.mono-order-preview[hidden] { display: none; }
.mono-order-preview img { display: block; width: 112px; height: 112px; flex: none; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #f7f7f4; }
.mono-order-preview > div { min-width: 0; }
.mono-order-preview strong { display: block; font-size: 14px; line-height: 20px; }
.order-status .mono-order-preview p { max-width: 28ch; margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 20px; }
.status-hero:has(#monoOrderPreview:not([hidden])) .status-hero-icon { align-self: start; }
@media (max-width: 480px) {
  .mono-order-preview { gap: 12px; margin-top: 16px; }
  .mono-order-preview img { width: 96px; height: 96px; }
}
.status-hero-icon { display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid #d7d7d0; border-radius: 50%; background: #f5f5f1; color: var(--ink); }
.status-hero-icon .checkout-icon { width: 26px; height: 26px; }
.order-status[data-status=paid] .status-hero-icon, .order-status[data-status=submitted] .status-hero-icon { border-color: var(--ink); background: var(--ink); color: #fff; }
.order-status[data-status=processing] .status-hero-icon .checkout-icon { animation: orderStatusSpin 1.6s linear infinite; }
@keyframes orderStatusSpin { to { transform: rotate(360deg); } }
.status-eyebrow { margin: 0 0 5px; color: var(--muted); font: 700 10px/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.order-status .status-hero h1 { max-width: 20ch; margin: 0; font-size: clamp(28px, 3vw, 40px); line-height: 1.05; letter-spacing: -.045em; overflow-wrap: anywhere; }
.order-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 14px 0 0; }
.order-meta-item { display: flex; min-width: 0; align-items: center; gap: 7px; color: var(--muted); }
.order-meta-item .checkout-icon { width: 15px; height: 15px; flex: none; }
.order-caption { font-size: 11px; color: var(--muted); }
.order-status .order-reference { margin: 0; font-family: var(--font-mono); font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: .01em; color: var(--ink); overflow-wrap: anywhere; }
.order-date { font-size: 12px; line-height: 20px; color: var(--muted); margin: 0; }
.tracking-order.order-loaded #statusTitle, .tracking-order.order-loaded .status-eyebrow { display: block; }
.tracking-order.order-loaded .status-hero-icon { display: grid; }
.order-payment-notice { margin: var(--order-group) 0 0; color: var(--muted); font-size: 14px; line-height: 24px; }
.order-state-facts { display: none; }
.order-state-facts > div { display: grid; gap: 8px; }
.order-state-facts dt { font-size: 11px; color: var(--muted); }
.order-state-facts dd { display: inline-flex; width: fit-content; margin: 0; padding: 7px 11px; border-radius: 999px; background: #ededed; color: #414141; font-size: 12px; line-height: 1.3; font-weight: 550; }
.order-status[data-status=paid] #orderPaymentState { background: var(--ink); color: #fff; }
.status-next { display: grid; gap: 8px; justify-items: end; padding: 0; background: transparent; border: 0; border-radius: 0; color: var(--ink); }
.status-next h2 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.status-next p { margin: 0; font-size: 14px; line-height: 24px; color: var(--muted); white-space: pre-line; }
#statusNextCopy:empty, #orderEmailStatus:empty { display: none; }
.order-status > .status-payment-instructions { margin: 16px 0 0; padding: 16px 18px; border-left: 2px solid var(--ink); background: #f3f3ef; color: var(--ink); font-size: 13px; line-height: 21px; }
.status-next .status-actions { display: grid; min-width: 220px; gap: 6px; margin: 0; }
.status-next .status-actions:empty { display: none; }
.status-next .status-actions:has(.return-kit-action) { grid-template-columns: minmax(0, 1fr); width: clamp(280px, 24vw, 320px); min-width: 280px; }
.status-next .return-kit-action { width: auto; min-height: 50px; justify-self: stretch; justify-content: center; padding-inline: 24px; font-weight: 700; }
.order-status[data-status=awaiting_payment] .status-actions:has(#resumePay),
.order-status[data-status=awaiting_payment] .status-actions:has(#cancelPayment) { grid-template-columns: minmax(132px, 1fr) minmax(132px, 1fr); min-width: 300px; gap: 8px; align-items: center; }
.order-status[data-status=awaiting_payment] .status-actions:has(#resumePay):has(#cancelPayment) { grid-template-columns: minmax(150px, 1.15fr) minmax(112px, .8fr) minmax(124px, .9fr); min-width: 420px; }
.order-status[data-status=awaiting_payment] #resumePay { grid-column: 1; }
.order-status[data-status=awaiting_payment] .status-actions:has(#resumePay) #checkStatus { grid-column: 2; width: 100%; min-width: 0; justify-self: stretch; padding-inline: 12px; border-radius: 999px; font-size: 12px; color: var(--ink); background: #fff; border-color: var(--line); }
.order-status[data-status=awaiting_payment] .status-actions:has(#cancelPayment) #cancelPayment { grid-column: 2; width: 100%; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid #cfcfc9; border-radius: 999px; color: var(--ink); background: #fff; font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.order-status[data-status=awaiting_payment] .status-actions:has(#cancelPayment) #cancelPayment:hover { background: #ededed; border-color: #bdbdb6; }
.order-status[data-status=awaiting_payment] .status-actions:has(#resumePay):has(#cancelPayment) #cancelPayment { grid-column: 3; }
.order-status[data-status=pending] .status-actions:has(#resumePay) { grid-template-columns: minmax(150px, 1.25fr) minmax(118px, .8fr); min-width: 360px; gap: 8px; align-items: center; }
.order-status[data-status=pending] .status-actions:has(#resumePay):has(#cancelPayment) { grid-template-columns: minmax(150px, 1fr) minmax(112px, .72fr) 44px; min-width: 414px; }
.order-status[data-status=pending] .retry-label,
.order-status[data-status=pending] #retryMethod { grid-column: 1 / -1; }
.order-status[data-status=pending] #resumePay { grid-column: 1; }
.order-status[data-status=pending] .status-actions:has(#resumePay) #checkStatus { grid-column: 2; width: 100%; min-width: 0; justify-self: stretch; padding-inline: 14px; border-radius: 999px; font-size: 12px; color: var(--ink); background: #fff; border-color: var(--line); }
.order-status[data-status=pending] .status-actions:has(#resumePay):has(#cancelPayment) #cancelPayment { grid-column: 3; width: 44px; min-width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; font-size: 0; }
.order-status .button { min-height: 46px; border-radius: 999px; font-size: 13px; gap: 10px; line-height: 20px; }
.order-status .button .checkout-icon, .order-status .text-button .checkout-icon { width: 16px; height: 16px; flex: none; }
.order-status .primary:hover { background: #333; }
.order-status .secondary:hover { background: #ededed; }
.status-next .primary { color: #fff; background: var(--ink); border-color: var(--ink); }
.order-status .status-next .button.primary:hover { background: #333; border-color: #333; }
.status-next .secondary { min-height: 44px; color: var(--muted); border-color: var(--line); background: #fff; font-size: 12px; }
.order-status[data-status=awaiting_payment] #checkStatus, .order-status[data-status=processing] #checkStatus,
.order-status[data-status=pending] .status-actions:not(:has(#resumePay)) #checkStatus { color: #fff; background: var(--ink); border-color: var(--ink); }
.order-status .status-next .button.secondary:hover { color: var(--ink); background: #ededed; }
.status-next :focus-visible { outline-color: var(--ink); }
.status-next .text-button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; min-height: 36px; padding-block: 0; text-align: center; line-height: 18px; }
.status-next select { min-height: 48px; font-size: 16px; color: var(--ink); background: #f7f7f7; }
.retry-label { font-size: 12px; line-height: 20px; color: var(--muted); margin: 0; }
.order-link-actions { display: grid; grid-template-columns: minmax(170px, 1fr) 44px; gap: 8px; margin: 0; }
.order-link-actions .button { display: flex; align-items: center; justify-content: center; min-height: 48px; gap: 12px; padding-inline: 20px; border-radius: 10px; }
.order-link-actions .button .checkout-icon { width: 20px; height: 20px; flex: none; }
.order-link-actions .carrier-tracking-link { justify-content: flex-start; }
.tracking-external-mark { margin-left: auto; font-size: 16px; line-height: 1; }
.order-link-actions > .text-button { width: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 0; border: 1px solid var(--line); border-radius: 50%; font-size: 0; }
.order-link-actions > .text-button .checkout-icon { width: 16px; height: 16px; }
.order-link-actions > .order-link-feedback, .order-link-actions > #orderLinkFallback { grid-column: 1 / -1; }
.order-link-feedback:empty { display: none; }
.status-next .order-link-feedback { color: var(--muted); font-size: 12px; line-height: 20px; }
#orderLinkFallback { display: grid; gap: 8px; margin-top: 8px; }
#orderLinkFallback label { display: block; font-size: 12px; line-height: 20px; margin: 0; }
#orderLinkFallback input { width: 100%; min-height: 44px; font-size: 14px; }
.status-support { display: none; }
.order-progress-section { display: grid; gap: var(--order-group); padding: var(--order-section) 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--shop-header-h, 60px) + 16px); }
.order-progress-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.order-progress-heading h2 { margin: 0; font-size: 28px; letter-spacing: -.045em; line-height: 32px; }
.order-refresh { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0 12px; text-align: right; }
.order-refresh .text-button { display: inline-flex; min-height: 44px; padding: 0; align-items: center; gap: 8px; font-size: 12px; line-height: 20px; }
.order-refresh p { margin: 0; font-size: 11px; line-height: 16px; color: var(--muted); }
.order-status .fulfillment-timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; gap: 0; }
.order-status .fulfillment-timeline li { position: relative; padding: 0 16px 0 0; border: 0; margin: 0; font-size: 13px; line-height: 20px; color: #737373; }
.order-status .fulfillment-timeline li::before { display: none; }
.order-status .fulfillment-timeline li::after { content: ''; position: absolute; height: 1px; background: #dedede; inset: 20px 12px auto 52px; }
.order-status .fulfillment-timeline li:last-child::after { display: none; }
.fulfillment-icon { display: grid; place-items: center; width: 40px; height: 40px; margin: 0 0 12px; border: 1px solid #dedede; border-radius: 50%; color: #737373; background: #fafafa; }
.fulfillment-icon .checkout-icon { width: 18px; height: 18px; }
.order-status .fulfillment-timeline li.current { color: var(--ink); font-weight: 550; }
.fulfillment-timeline li.current .fulfillment-icon { background: #191919; color: #fff; border-color: #191919; }
.fulfillment-timeline li.complete .fulfillment-icon { color: #191919; background: #ededed; border-color: #ccc; }
.order-status .fulfillment-timeline li.complete::after { background: #919191; }
.order-status .fulfillment-timeline li small { display: block; margin-top: 4px; font-size: 11px; line-height: 16px; font-weight: 400; color: var(--muted); }
.delivery-status-update { display: grid; gap: 8px; margin: 0; padding-left: 16px; border-left: 2px solid var(--line); }
.delivery-status-update h3 { margin: 0; font-size: 12px; font-weight: 550; line-height: 20px; }
.delivery-status-update p { max-width: 68ch; margin: 0; font-size: 14px; line-height: 24px; color: var(--muted); overflow-wrap: anywhere; white-space: pre-line; }
.order-tracking-details { margin: 0; }
.order-tracking-details:empty { display: none; }
.order-tracking-details p { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--muted); font-size: 12px; line-height: 20px; }
.order-tracking-details p .checkout-icon { margin-top: 2px; }
.order-tracking-details dl { display: flex; flex-wrap: wrap; gap: 16px 32px; margin: 0; padding: 16px; border-radius: 12px; background: #f0f0f0; }
.order-tracking-details dl > div { min-width: 0; }
.order-tracking-details dt { font-size: 12px; line-height: 20px; color: var(--muted); margin-bottom: 8px; }
.order-tracking-details dd { margin: 0; font-size: 16px; line-height: 24px; font-weight: 550; overflow-wrap: anywhere; }
.order-tracking-details dd code { font-size: 15px; user-select: all; }
.order-status .delivery-payment-note { padding: 0; margin: 0; color: var(--muted); font-size: 14px; line-height: 24px; }
.order-status .confirmation-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: var(--order-group); margin: var(--order-section) 0; }
.order-status .receipt-card { padding: var(--order-card-padding); border: 1px solid var(--line); border-radius: 16px; background: #fdfdfd; min-width: 0; }
.order-status .receipt-card .section-heading { margin: 0 0 16px; align-items: center; gap: 12px; }
.order-status .receipt-card h2 { display: flex; align-items: center; gap: 8px; font-size: 23px; line-height: 28px; letter-spacing: -.035em; margin: 0; }
.order-status .receipt-card h2 .checkout-icon { width: 18px; height: 18px; }
.order-item-count { font-size: 12px; line-height: 20px; color: var(--muted); }
.order-status .order-receipt .section-heading { margin-bottom: 4px; }
.order-status .order-items-details > summary { min-height: 44px; margin: 0; padding: 12px 0; font-size: 12px; line-height: 20px; cursor: pointer; }
.order-status .order-items-details[open] > summary { margin-bottom: 4px; }
.order-status #confirmedItems { display: grid; gap: var(--order-group); }
.order-status .summary-item.summary-kit { gap: 12px; margin: 0; }
.order-status .summary-kit + .summary-kit { padding-top: var(--order-group); }
.order-status .summary-kit-preview { gap: 16px 12px; padding: 16px; }
.order-status .summary-kit-preview .kit-pair figcaption { margin-top: 8px; line-height: 16px; }
.order-status .summary-kit-copy .summary-kit-spec { margin: 0; line-height: 20px; }
.order-status .receipt-lines { margin: 16px 0 0; padding: 16px 0 0; }
.order-status .receipt-lines > div { margin: 0; padding: 4px 0; gap: 16px; font-size: 14px; line-height: 24px; }
.order-status .receipt-lines > div:nth-last-child(2) { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 16px; font-size: 23px; line-height: 32px; }
.order-status .receipt-lines > div:last-child { padding-bottom: 0; }
.order-status .receipt-card .text-button { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding-block: 0; font-size: 12px; line-height: 20px; }
.order-status #receiptDownload { margin-top: 8px; }
.order-status .receipt-card address { font-size: 16px; font-weight: 450; line-height: 24px; margin: 0 0 var(--order-group); }
.order-status .receipt-card p { margin: 0; font-size: 14px; line-height: 24px; }
.order-status .receipt-card .dispatch-inline { margin: 8px 0 0; font-size: 12px; line-height: 20px; }
.order-status .receipt-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 12px; line-height: 20px; font-weight: 550; color: var(--muted); }
.order-contact { display: grid; gap: 8px; margin-top: var(--order-group); padding-top: var(--order-group); border-top: 1px solid var(--line); }
.order-status .order-contact h3 { margin: 0; }
.order-contact #confirmedContact { display: grid; gap: 8px; overflow-wrap: anywhere; }
#confirmedContact p { display: flex; align-items: flex-start; gap: 8px; }
#confirmedContact .checkout-icon { margin-top: 4px; }
.order-status .order-contact .order-email-status { color: var(--muted); font-size: 12px; line-height: 20px; }
.order-status .post-purchase { display: block; margin: 0; padding: 0; background: transparent; border-radius: 0; }
.order-guide-link { display: flex; align-items: center; gap: 12px; padding: 20px 0; border-block: 1px solid var(--line); font-size: 16px; line-height: 24px; text-decoration: none; }
.order-guide-link .checkout-icon { width: 20px; height: 20px; flex: none; }
.order-guide-link > span:last-child { margin-left: auto; }
.order-guide-link:hover { color: var(--muted); }
.order-access-note { display: flex; justify-content: center; align-items: center; margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.order-access-note .text-button { min-height: 44px; padding-block: 0; font-size: 12px; line-height: 20px; display: inline-flex; align-items: center; gap: 8px; }
.status-recovery { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: var(--order-group); }
.order-status .crypto-payment { margin-block: var(--order-group); border-radius: 16px; }
.order-status #sandboxControls { margin-block: var(--order-group); }
.order-status .notice.error { margin: var(--order-group) 0 0; padding: 16px; font-size: 14px; line-height: 24px; color: var(--ink); background: #eee; border-color: #ccc; }
body[data-page=confirmation] .shop-footer { margin: 0; padding: 24px max(var(--order-gutter), calc((100% - var(--order-width)) / 2 + var(--order-gutter))); }
body[data-page=confirmation] .shop-footer-bottom { gap: 8px 24px; margin: 0; padding: 0; line-height: 20px; }
body[data-page=confirmation] .shop-footer .shop-footer-bottom nav { gap: 16px; }
body[data-page=confirmation] .shop-footer .shop-footer-bottom nav a { min-height: 44px; padding: 0; line-height: 20px; }
@media (max-width: 800px) {
  body[data-page=confirmation] { --order-width: 650px; --order-gutter: 24px; --order-section: 24px; --order-page-padding: 16px; }
  .status-hero { grid-template-columns: 52px minmax(0, 1fr); min-height: 0; }
  .status-hero-icon { width: 52px; height: 52px; }
  .status-next { grid-column: 1 / -1; width: 100%; justify-items: stretch; padding-top: 4px; }
  .status-next .status-actions { width: 100%; }
  .status-next .status-actions:has(.return-kit-action) { width: 100%; min-width: 0; }
  .order-status[data-status=pending] .status-actions:has(#resumePay) { min-width: 0; }
  .order-status[data-status=awaiting_payment] .status-actions:has(#resumePay),
  .order-status[data-status=awaiting_payment] .status-actions:has(#cancelPayment) { min-width: 0; }
  .order-link-actions { grid-template-columns: minmax(0, 1fr) 44px; }
  .order-status .confirmation-grid { grid-template-columns: minmax(0, 1fr); }
  .order-status .status-hero h1 { max-width: 18ch; font-size: clamp(30px, 7vw, 38px); }
  body[data-page=confirmation] .shop-footer-bottom { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  body[data-page=confirmation] .shop-footer-bottom > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .order-progress-heading { flex-direction: column; align-items: flex-start; gap: 0; }
  .order-refresh { justify-content: flex-start; text-align: left; }
  .order-progress-heading h2 { font-size: 26px; }
  .order-status .fulfillment-timeline { grid-template-columns: minmax(0, 1fr); }
  .order-status .fulfillment-timeline li { display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: 20px auto; gap: 4px 12px; align-items: start; padding: 0 0 24px; min-height: 64px; }
  .order-status .fulfillment-timeline li:last-child { padding-bottom: 0; min-height: 40px; }
  .fulfillment-icon { margin: 0; grid-row: 1 / span 2; }
  .order-status .fulfillment-timeline li::after { width: 1px; height: auto; inset: 44px auto 4px 20px; }
  .order-status .fulfillment-timeline li small { grid-column: 2; margin: 0; }
  .order-status .fulfillment-timeline li:not(:has(small)) > span:last-child { grid-row: 1 / span 2; align-self: center; }
}
@media (max-width: 480px) {
  body[data-page=confirmation] { --order-gutter: 16px; --order-card-padding: 16px; }
  .order-navigation { margin-bottom: 8px; }
  .status-hero { position: relative; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 18px; border-radius: 14px; }
  .status-hero-icon { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; }
  .status-hero-icon .checkout-icon { width: 21px; height: 21px; }
  .status-eyebrow { margin-bottom: 9px; padding-right: 58px; }
  .order-status .status-hero h1 { padding-right: 0; font-size: 28px; }
  .order-identity { display: grid; gap: 5px; margin-top: 12px; }
  .order-meta-item { gap: 6px; }
  .status-next { padding-top: 2px; }
  .status-next .status-actions { min-width: 0; }
  .status-next .status-actions .button { width: 100%; }
  .status-next .status-actions .return-kit-action { width: auto; }
  .status-next .return-kit-action { min-height: 48px; border-radius: 10px; }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) .status-hero { gap: 12px; padding: 16px; }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) .status-hero-icon { top: 16px; right: 16px; width: 40px; height: 40px; }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) .status-hero-icon .checkout-icon { width: 19px; height: 19px; }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) .status-eyebrow { margin-bottom: 8px; padding-right: 52px; }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) .status-hero h1 { max-width: calc(100% - 48px); font-size: 26px; line-height: 1.08; }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) .order-identity { gap: 3px; margin-top: 10px; }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) .order-meta-item { min-height: 20px; gap: 6px; }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) .order-caption { display: none; }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) .status-next { margin-top: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) .status-actions { gap: 8px; align-items: center; }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) .status-actions:has(#resumePay),
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) .status-actions:has(#cancelPayment) { grid-template-columns: minmax(0, 1fr) 44px; }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) .status-actions:has(#resumePay):has(#cancelPayment) { grid-template-columns: minmax(0, 1fr) 44px 44px; }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) .retry-label,
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) #retryMethod { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) #retryMethod { height: 44px; border-radius: 10px; }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) #resumePay { grid-column: 1; min-width: 0; height: 44px; padding: 0 10px; border-radius: 10px; font-size: 12px; gap: 8px; white-space: nowrap; }
  .order-status[data-status=awaiting_payment] .status-actions:has(#resumePay) #checkStatus { grid-column: 2; width: 44px; min-width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 0; }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) .status-actions:has(#cancelPayment) #cancelPayment { grid-column: -2 / -1; width: 44px; min-width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; font-size: 0; }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) .status-actions:has(#cancelPayment):not(:has(#resumePay)) #checkStatus { grid-column: 1; width: 100%; min-width: 0; padding-inline: 14px; border-radius: 10px; font-size: 12px; }
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) #checkStatus .checkout-icon,
  .order-status:is([data-status=pending], [data-status=awaiting_payment]) #cancelPayment .checkout-icon { width: 16px; height: 16px; margin: 0; }
  .order-status[data-status=pending] .status-actions:has(#resumePay) { grid-template-columns: minmax(0, 1fr) minmax(112px, .72fr); min-width: 0; }
  .order-status[data-status=pending] .status-actions:has(#resumePay):has(#cancelPayment) { grid-template-columns: minmax(0, 1fr) minmax(104px, .68fr) 40px; }
  .order-status[data-status=pending] .status-actions:has(#resumePay) #checkStatus { grid-column: 2; width: 100%; min-width: 0; height: 44px; padding: 0 10px; border-radius: 10px; font-size: 11px; }
  .order-status[data-status=pending] .status-actions:has(#resumePay):has(#cancelPayment) #cancelPayment { grid-column: 3; width: 40px; min-width: 40px; height: 40px; }
  .order-status[data-status=awaiting_payment] .status-actions:has(#resumePay),
  .order-status[data-status=awaiting_payment] .status-actions:has(#cancelPayment),
  .order-status[data-status=awaiting_payment] .status-actions:has(#resumePay):has(#cancelPayment) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-width: 0; gap: 8px; }
  .order-status[data-status=awaiting_payment] .status-actions:has(#resumePay) #resumePay { grid-column: 1 / -1; width: 100%; }
  .order-status[data-status=awaiting_payment] .status-actions:has(#resumePay) #checkStatus,
  .order-status[data-status=awaiting_payment] .status-actions:has(#cancelPayment):not(:has(#resumePay)) #checkStatus { grid-column: 1; width: 100%; min-width: 0; height: 42px; padding: 0 6px; border-radius: 10px; font-size: 11px; gap: 5px; white-space: nowrap; }
  .order-status[data-status=awaiting_payment] .status-actions:has(#resumePay):not(:has(#cancelPayment)) #checkStatus { grid-column: 1 / -1; }
  .order-status[data-status=awaiting_payment] .status-actions:has(#cancelPayment) #cancelPayment,
  .order-status[data-status=awaiting_payment] .status-actions:has(#resumePay):has(#cancelPayment) #cancelPayment { grid-column: 2; width: 100%; min-width: 0; height: 42px; min-height: 42px; padding: 0 6px; border-radius: 10px; font-size: 11px; gap: 5px; }
  .order-status[data-status=awaiting_payment] #checkStatus .checkout-icon,
  .order-status[data-status=awaiting_payment] #cancelPayment .checkout-icon { width: 14px; height: 14px; }
  .order-link-actions { grid-template-columns: minmax(0, 1fr) 44px; }
  .order-status > .status-payment-instructions { margin-top: 12px; }
  body[data-page=confirmation] .shop-footer-bottom { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 350px) {
  .order-status[data-status=pending] .status-actions:has(#resumePay) { grid-template-columns: minmax(0, 1fr); }
  .order-status[data-status=pending] .status-actions:has(#resumePay):has(#cancelPayment) { grid-template-columns: minmax(0, 1fr) 40px; }
  .order-status[data-status=pending] .status-actions:has(#resumePay):has(#cancelPayment) .retry-label,
  .order-status[data-status=pending] .status-actions:has(#resumePay):has(#cancelPayment) #retryMethod,
  .order-status[data-status=pending] .status-actions:has(#resumePay):has(#cancelPayment) #resumePay { grid-column: 1 / -1; }
  .order-status[data-status=pending] .status-actions:has(#resumePay) #checkStatus { grid-column: 1; min-height: 40px; }
  .order-status[data-status=pending] .status-actions:has(#resumePay):has(#cancelPayment) #cancelPayment { grid-column: 2; }
}
/* A branded payment action needs its own row: the logo must never squeeze
   the order heading or compete with the two secondary actions. */
.status-hero:has(#resumePay.mono-button) { grid-template-columns: 56px minmax(0, 1fr) minmax(300px, 360px); align-items: center; }
.status-hero:has(#resumePay.mono-button) .status-hero-copy { align-self: center; }
.status-hero:has(#resumePay.mono-button) .status-hero-icon { margin-top: 4px; }
.status-hero:has(#resumePay.mono-button) .status-next { justify-items: stretch; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #f5f5f5; }
.status-hero:has(#resumePay.mono-button) #statusNextCopy { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; clip-path: none; white-space: normal; font-size: 13px; line-height: 20px; }
.order-status .status-hero #statusActions:has(#resumePay.mono-button) { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; min-width: 0; gap: 8px; }
.order-status .status-hero #statusActions #resumePay.mono-button { grid-column: 1 / -1; width: 100%; min-width: 0; min-height: 60px; height: auto; gap: 12px; padding: 16px; border-radius: 12px; font-size: 14px; line-height: 1.4; white-space: normal; }
.order-status .status-hero #statusActions:has(#resumePay.mono-button) :is(#checkStatus, #cancelPayment) { width: 100%; min-width: 0; height: auto; min-height: 44px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 8px; font-size: 11px; line-height: 16px; gap: 5px; white-space: normal; background: #fff; }
.order-status .status-hero #statusActions:has(#resumePay.mono-button) #checkStatus { grid-column: 1; }
.order-status .status-hero #statusActions:has(#resumePay.mono-button) #cancelPayment { grid-column: 2; }
.order-status .status-hero #statusActions:has(#resumePay.mono-button):not(:has(#cancelPayment)) #checkStatus { grid-column: 1 / -1; }
@media (max-width: 1000px) {
  .status-hero:has(#resumePay.mono-button) { grid-template-columns: 52px minmax(0, 1fr); }
  .status-hero:has(#resumePay.mono-button) .status-next { grid-column: 1 / -1; width: 100%; margin-top: 0; }
}
@media (max-width: 480px) {
  .status-hero:has(#resumePay.mono-button) { grid-template-columns: minmax(0, 1fr); }
  .status-hero:has(#resumePay.mono-button) .status-hero-icon { margin: 0; }
  .status-hero:has(#resumePay.mono-button) .status-next { padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; gap: 12px; }
}
@media print {
  .order-navigation, .status-next, .order-refresh, .post-purchase, .order-access-note, #sandboxControls, #receiptDownload { display: none; }
  .order-status { max-width: none; margin: 0; padding: 0; }
  .status-hero, .order-status .confirmation-grid { display: block; }
  .order-status .receipt-card { break-inside: avoid; margin-top: 16px; }
  .order-status .order-items-details > summary { display: none; }
  .order-status .order-items-details::details-content { content-visibility: visible; }
}
