.commerce-page {
  background: #f4f1ff;
}

.commerce-section {
  min-height: 72vh;
  padding: 72px 0 92px;
}

.commerce-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-areas: "form summary";
  gap: 24px;
  align-items: start;
}

.commerce-card {
  background: #fff;
  box-shadow: 0 24px 70px rgba(42, 25, 87, .12);
}

.commerce-card {
  padding: clamp(28px, 5vw, 58px);
}

.commerce-card h1 {
  margin: 12px 0 14px;
}

.commerce-card .back-link {
  color: #596276;
}

.commerce-card .back-link:hover {
  color: var(--brand);
}

.commerce-card > p,
.commerce-privacy-note {
  color: #596276;
  line-height: 1.65;
}

.commerce-summary {
  display: grid;
  gap: 0;
  margin: 32px 0;
  border-top: 1px solid #e5e0f0;
}

.commerce-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid #e5e0f0;
}

.commerce-summary dt {
  color: #71798b;
}

.commerce-summary dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.commerce-summary-total dd {
  color: var(--brand);
  font-size: 24px;
}

.commerce-form {
  display: grid;
  gap: 12px;
}

.commerce-email-field {
  display: grid;
  gap: 6px;
}

.commerce-email-field > label {
  color: #26324a;
  font-weight: 700;
  font-size: 14px;
}

.commerce-email-field > small {
  color: #596276;
  line-height: 1.45;
}

.commerce-email-field > input {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #cfc7e2;
  border-radius: 0;
  color: #172033;
  background: #fff;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
}

.commerce-email-field > input:focus-visible {
  outline: 3px solid rgba(109, 74, 255, .28);
  outline-offset: 2px;
  border-color: var(--brand);
}

.commerce-form > label {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  min-height: 44px;
  padding: 3px 0;
  font-size: 14px;
  line-height: 1.5;
}

.commerce-form input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.commerce-field-error,
.commerce-feedback {
  padding: 10px 13px;
  border: 1px solid #d88a99;
  color: #851f34;
  background: #fff1f4;
}

.commerce-field-error ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.commerce-field-error {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.5;
}

.commerce-submit {
  width: 100%;
  justify-content: center;
}

.commerce-price-nowrap { white-space: nowrap; }

.commerce-status-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 50%;
  color: #11192c;
  background: #72e3b5;
  font-size: 28px;
  font-weight: 800;
}

.commerce-status-shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
}

.commerce-status-card {
  text-align: center;
}

.commerce-status-mark {
  margin-inline: auto;
}

.commerce-status-error {
  color: #fff;
  background: #ba2945;
}

.commerce-status-pending {
  color: #fff;
  background: #7159c8;
}

.commerce-status-summary {
  margin-bottom: 0;
  text-align: left;
}

.commerce-cancel-form {
  margin-top: 12px;
}

.commerce-billing,
.commerce-buyer-type {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.commerce-billing {
  display: grid;
  gap: 12px;
  margin: 8px 0 4px;
  padding-top: 12px;
  border-top: 1px solid #e5e0f0;
}

.commerce-billing > legend {
  padding: 0 12px 0 0;
  font-size: 18px;
  font-weight: 700;
}

.commerce-billing > p {
  margin: 0;
  color: #596276;
  font-size: 14px;
  line-height: 1.5;
}

.commerce-buyer-type legend {
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 14px;
}

.commerce-buyer-options,
.commerce-billing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.commerce-buyer-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #cfc7e2;
  cursor: pointer;
  font-size: 14px;
}

.commerce-buyer-options label:has(input:checked) {
  border-color: var(--brand);
  background: #f4f1ff;
  font-weight: 700;
}

.commerce-buyer-options input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.commerce-billing [hidden] { display: none; }
.commerce-billing .commerce-email-field { align-content: start; }
.commerce-billing input { width: 100%; min-width: 0; }
.commerce-billing .commerce-buyer-options input { width: 18px; }
.commerce-billing-country { font-size: 14px; }
.commerce-business-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.commerce-company-lookup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}
.commerce-gus-button { margin-top: 27px; min-height: 44px; font-size: 14px; }
.commerce-gus-button:disabled { cursor: wait; opacity: .65; }
.commerce-lookup-status { margin: 0; color: #596276; font-size: 14px; line-height: 1.5; }
.commerce-lookup-status[data-state="error"] { color: #851f34; }
.commerce-invoice { margin-top: 28px; padding-top: 24px; border-top: 1px solid #e5e0f0; }
.commerce-invoice p { color: #596276; }

.commerce-checkout { padding: 32px 0 56px; }
.commerce-checkout-container { max-width: 1100px; }
.commerce-checkout-heading { margin-bottom: 24px; }
.commerce-checkout-heading .back-link { color: #596276; }
.commerce-checkout-heading .back-link:hover { color: var(--brand); }
.commerce-checkout-heading h1 { margin: 12px 0 8px; font-size: clamp(28px, 3vw, 36px); line-height: 1.2; }
.commerce-checkout-heading p { margin: 0; color: #596276; font-size: 15px; line-height: 1.5; }
.commerce-checkout-card { grid-area: form; min-width: 0; padding: 28px; box-shadow: 0 12px 36px rgba(42, 25, 87, .08); }
.commerce-checkout .commerce-privacy-note { margin: 0; font-size: 13px; line-height: 1.5; }
.commerce-checkout .commerce-submit { min-height: 50px; margin-top: 4px; }
.commerce-address-fields { grid-template-columns: 132px minmax(0, 1fr); }

.commerce-order-summary { grid-area: summary; position: sticky; top: 100px; padding: 24px; color: #fff; background: #11192c; }
.commerce-order-summary h2 { margin: 0 0 20px; font-size: 16px; font-weight: 600; color: #d4daea; }
.commerce-order-summary p { margin: 0; }
.commerce-order-product { font-size: 19px; font-weight: 700; line-height: 1.45; }
.commerce-order-summary .commerce-order-access { margin-top: 8px; color: #d4daea; font-size: 14px; line-height: 1.5; }
.commerce-order-total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-top: 20px; padding-top: 18px; border-top: 1px solid #435068; }
.commerce-order-total > span { color: #d4daea; font-size: 14px; }
.commerce-order-total strong { color: #72e3b5; font-size: 28px; white-space: nowrap; }
.commerce-order-summary .commerce-order-price-history { margin-top: 12px; color: #d4daea; font-size: 13px; line-height: 1.5; }
.commerce-order-summary .commerce-order-provider { margin-top: 18px; color: #d4daea; font-size: 13px; line-height: 1.5; }

@media (max-width: 900px) {
  .commerce-shell { grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
}

@media (max-width: 820px) {
  .commerce-section { padding: 34px 0 60px; }
  .commerce-shell { grid-template-columns: 1fr; grid-template-areas: "summary" "form"; gap: 16px; }
  .commerce-card { padding: 28px 20px; }
  .commerce-summary > div { display: grid; gap: 5px; }
  .commerce-summary dd { text-align: left; overflow-wrap: anywhere; }
  .commerce-checkout { padding: 24px 0 40px; }
  .commerce-checkout-container { max-width: 620px; }
  .commerce-checkout-heading { margin-bottom: 20px; }
  .commerce-checkout-card { padding: 24px; }
  .commerce-order-summary { position: static; padding: 20px 24px; }
  .commerce-order-summary h2 { margin-bottom: 10px; font-size: 14px; }
  .commerce-order-product { font-size: 17px; }
  .commerce-order-summary .commerce-order-access { margin-top: 4px; }
  .commerce-order-total { margin-top: 12px; padding-top: 12px; }
  .commerce-order-total strong { font-size: 24px; }
  .commerce-order-summary .commerce-order-provider { margin-top: 10px; }
}

@media (max-width: 480px) {
  .commerce-checkout-container { width: calc(100% - 24px); }
  .commerce-checkout-card { padding: 20px 16px; }
  .commerce-order-summary { padding: 16px; }
  .commerce-buyer-options label { gap: 7px; padding: 9px 8px; }
  .commerce-address-fields { grid-template-columns: 112px minmax(0, 1fr); }
  .commerce-company-lookup { grid-template-columns: 1fr; gap: 8px; }
  .commerce-gus-button { margin-top: 0; justify-self: start; }
  .commerce-checkout .commerce-submit { padding: 10px 14px; font-size: 14px; }
}

.commerce-order-components { margin: 1rem 0; padding: 0; list-style: none; }
.commerce-order-components li + li { margin-top: .75rem; }
.commerce-order-components strong, .commerce-order-components span { display: block; overflow-wrap: anywhere; }
.commerce-order-components span { margin-top: .2rem; color: #d4daea; font-size: .85rem; }
.commerce-order-scope { color: #d4daea; font-size: .9rem; line-height: 1.5; }
.commerce-owned-content { margin-block: 1rem; padding: 1rem; border: 1px solid #c8dacf; border-radius: .8rem; background: #f1f7f3; color: #244e39; font-size: .9rem; line-height: 1.55; }
.commerce-owned-content p { margin-block: .5rem; }
.commerce-owned-content summary { cursor: pointer; font-weight: 650; }
.commerce-owned-content ul { padding-left: 1.1rem; }

.commerce-password {
  margin: 4px 0 14px;
  padding-block: 18px;
  border-block: 1px solid #e5e0f0;
}
.commerce-password summary {
  min-height: 44px;
  padding-block: 10px;
  color: #26324a;
  font-weight: 750;
  cursor: pointer;
}
.commerce-password summary span { font-size: 13px; font-weight: 500; color: #596276; }
.commerce-password summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
.commerce-password p, .commerce-password-rules { color: #596276; font-size: 13px; line-height: 1.6; }
.commerce-password .commerce-email-field { margin-block: 16px; }
.commerce-password input[type="password"] { width: 100%; }
.commerce-password-rules ul { margin: 10px 0 0; padding-left: 20px; }
.commerce-password-note { margin-bottom: 0; }
