.checkout {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  background: radial-gradient(ellipse 850px 480px at 36% 0, #ffffff0d, transparent 78%), var(--black);
}
.checkout-main {
  display: grid;
  gap: 18px;
  width: min(650px, var(--shell-width));
  padding-block: clamp(26px, 5vw, 68px);
}
.checkout .site-footer { margin-top: auto; }
.checkout-overview, .checkout-title-row {
  display: flex;
  align-items: center;
}
.checkout-overview {
  justify-content: space-between;
  gap: 14px;
}
.checkout-title-row {
  gap: 12px;
  min-width: 0;
}
.checkout-title-row img {
  display: block;
  width: clamp(23px, 4vw, 30px);
  height: auto;
  flex: none;
  object-fit: contain;
}
.checkout-back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  padding: 4px 6px;
  color: #c3c6cb;
  font-size: 13px;
  font-weight: 550;
  transition: color var(--feedback), background-color var(--feedback);
}
.checkout-back:is(:hover, :focus-visible) { background: #ffffff13; color: var(--white); }
.checkout-back .arr { width: 14px; height: 14px; }
.checkout #checkout-title {
  color: var(--white);
  font: 650 clamp(30px, 5vw, 46px)/1.08 Instrument, "Segoe UI", sans-serif;
  letter-spacing: -.045em;
  animation: none;
  text-shadow: none;
}

.checkout-workflow { min-width: 0; }
.checkout-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  padding: 0;
  margin: 0 0 12px;
  list-style: none;
}
.checkout-progress li {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  min-height: 37px;
  padding-inline: 3px;
  border-bottom: 2px solid #ffffff20;
  color: #a7a9af;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: color var(--feedback), border-color var(--feedback);
}
.checkout-progress li[aria-current="step"] { border-color: #e6e7e2; color: var(--white); }
.checkout-progress li.complete { border-color: #ffffff48; color: #c9cbc8; }

.checkout-card {
  --flow-gap: 21px;
  --inner-gap: 9px;
  --checkout-rule: #ffffff1d;
  display: grid;
  gap: var(--flow-gap);
  min-width: 0;
  padding: clamp(15px, 3.2vw, 27px);
  border: 1px solid #ffffff23;
  border-radius: 12px;
  background: #19191a;
  box-shadow: inset 0 1px #ffffff08;
}
.checkout-card :is(#order-form, #receipt, #steps) {
  display: grid;
  gap: var(--flow-gap);
  min-width: 0;
}
.checkout-card .terms { min-width: 0; margin: 0; gap: var(--inner-gap); }
.checkout-card .terms legend,
.checkout-card .order-field label,
.checkout-card .order-instructions h2 {
  font-size: 14px;
  font-weight: 650;
}
.checkout-card .terms label {
  min-width: 0;
  min-height: 62px;
  align-items: start;
  justify-content: center;
  border-color: #ffffff25;
  background: #ffffff04;
  transition: color var(--feedback), background-color var(--feedback), border-color var(--feedback);
}
.checkout-card .terms label:has(:checked) {
  color: var(--white);
  border-color: #f0f0ec;
  background: #39393b;
}
@media (hover: hover) {
  .checkout-card .terms label:not(:has(:checked)):hover { border-color: #ffffff59; background: #ffffff14; }
}
.checkout-card .terms b, #summary, #order-price { font-variant-numeric: tabular-nums; }
.checkout-card :is(.order-field, .order-actions, .order-instructions, #manual-copy) {
  display: grid;
  gap: var(--inner-gap);
}
.checkout-card .order-field p,
.checkout-card .order-instructions p,
.checkout-card #manual-copy label { margin: 0; }
.checkout-card input:not([type="radio"]) {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #ffffff40;
  border-radius: 8px;
  background: #101113;
  font-size: 16px;
  outline: none;
  transition: border-color var(--feedback), box-shadow var(--feedback);
}
.checkout-card input:not([type="radio"]):focus { border-color: #a8aaae; box-shadow: 0 0 0 3px #abb3bc27; }
.checkout-card input[aria-invalid="true"] { border-color: #dfa3a4; }
.checkout-card .checkout-action { min-height: 48px; padding: 10px 15px; font-size: 14px; border-radius: 8px; }
.checkout-card .seller-link { min-height: 29px; margin: 0; padding: 4px 7px; justify-self: center; }

.checkout-card #order-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 13px;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--checkout-rule);
  border-radius: 8px;
  background: #0002;
}
#order-summary > div { min-width: 0; }
#order-summary > div + div { padding-inline-start: 13px; border-inline-start: 1px solid var(--checkout-rule); }
#order-summary dt { margin: 0 0 4px; color: #c0c3c9; font-size: 12px; line-height: 1.35; }
#order-summary dd { margin: 0; font-size: 14px; font-weight: 620; line-height: 1.4; overflow-wrap: anywhere; }
#order-plan { display: flex; flex-wrap: wrap; gap: 3px 9px; }
.checkout-card .order-instructions p { color: #bdc1c7; font-size: 13px; line-height: 1.5; }
.checkout-card .copy-row { padding: 6px 6px 6px 11px; }
.checkout-card .copy-row button { min-height: 32px; flex: none; }
.checkout-card .copy-row button:is(:hover, :focus-visible) { background: #494b50; }

.checkout-card #order-state {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}
.checkout-card #order-state:has(#check[hidden]) { grid-template-columns: minmax(0, 1fr); }
.checkout-card #order-status:not(:empty) {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 0;
  border: none;
  color: #e1e3e7;
  background: none;
  font-size: 13px;
}
.checkout-card #order-status:focus { outline: none; }
#order-state:is([data-state="waiting"],[data-state="working"]) #order-status::before {
  content: "";
  width: 13px;
  height: 13px;
  flex: none;
  border: 1.5px solid #5d6065;
  border-top-color: #f3f4f2;
  border-radius: 50%;
  animation: checkout-spin .9s linear infinite;
}
@keyframes checkout-spin { to { transform: rotate(360deg); } }
#order-state[data-state="ready"] #order-status::before {
  content: "";
  width: 5px;
  height: 9px;
  flex: none;
  border: solid #dedfdd;
  border-width: 0 1.7px 1.7px 0;
  margin: -3px 3px 0 1px;
  transform: rotate(43deg);
}
.checkout-card #check {
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid #ffffff2a;
  border-radius: 7px;
  background: #ffffff0b;
  font-size: 12px;
  font-weight: 630;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: background-color var(--feedback), border-color var(--feedback);
}
.checkout-card #check:is(:hover,:focus-visible) { background: #ffffff20; border-color: #ffffff42; }
.checkout-card #order-download { display: grid; gap: var(--inner-gap); }
#order-download p { color: #c9ccd1; font-size: 13px; line-height: 1.5; }
.checkout-card .order-links { display: none; }
.checkout-card .order-links:not([hidden]):has(button:not([hidden])) {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--checkout-rule);
}
.checkout-card .order-links button {
  min-height: 44px;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid #ffffff25;
  border-radius: 6px;
  background: #ffffff06;
  color: #c3c6cb;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  transition: color var(--feedback), background-color var(--feedback), border-color var(--feedback);
}
.checkout-card .order-links button:is(:hover, :focus-visible) {
  color: #fff;
  background: #ffffff13;
  border-color: #ffffff50;
}
.checkout-card #open-cancel {
  margin-inline-start: auto;
  border-color: transparent;
  background: transparent;
  color: #efadad;
}
.checkout-card #open-cancel:is(:hover,:focus-visible) {
  border-color: #ef99994d;
  background: #e65c5c0d;
  color: #ffd3d3;
}
#cancel-confirm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 18px;
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid var(--checkout-rule);
  animation: cancel-in 180ms var(--ease) both;
}
@keyframes cancel-in { from { opacity: 0; transform: translateY(3px); } }
.cancel-copy { display: grid; gap: 4px; }
#cancel-title { font-size: 15px; font-weight: 650; }
#cancel-title:focus { outline: none; }
#cancel-confirm p { color: #bfc1c5; font-size: 13px; line-height: 1.45; }
#cancel-feedback:empty { display: none; }
#cancel-confirm #cancel-feedback { grid-column: 1 / -1; color: #f5b4b4; }
.cancel-actions {
  display: flex;
  gap: 8px;
}
.cancel-actions button {
  min-height: 44px;
  padding: 7px 11px;
  border: 1px solid #ffffff2b;
  border-radius: 6px;
  background: #ffffff0a;
  color: var(--white);
  font-size: 13px;
  line-height: 1.35;
  transition: border-color var(--feedback), background-color var(--feedback);
}
.cancel-actions button:is(:hover,:focus-visible) {
  border-color: #ffffff57;
  background: #ffffff17;
}
#confirm-cancel { border-color: #e88b9459; background: #49282c; color: #ffe1e3; }
#confirm-cancel:is(:hover,:focus-visible) { border-color: #ed929cb3; background: #603337; }
.checkout-card #order-state[data-state="cancelled"] #order-status { color: #efadad; }

@media (max-width: 735px) {
  .checkout { min-height: 0; }
  .checkout-main { gap: 9px; padding-block: 17px 21px; }
  .checkout .site-footer { margin-top: 0; }
  .checkout-card { --flow-gap: 16px; }
  .checkout-progress { margin-bottom: 9px; }
}
@media (max-width: 385px) {
  .checkout-progress { gap: 7px; }
  .checkout-progress li { font-size: 12px; }
  .checkout-card .terms label { padding: 9px 7px; }
}
@media (max-width: 480px) {
  .checkout-card .order-links:not([hidden]):has(button:not([hidden])) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .checkout-card .order-links button {
    min-width: 0;
    padding-inline: 8px;
    overflow-wrap: anywhere;
  }
  .checkout-card #open-cancel {
    margin-inline-start: 0;
    justify-self: start;
  }
}
@media (max-width: 620px) {
  #cancel-confirm { grid-template-columns: 1fr; }
  .cancel-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  #order-state:is([data-state="waiting"],[data-state="working"]) #order-status::before { animation: none; }
}
