.checkout-page {
  max-width: 1040px;
}

.checkout-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.38fr);
  gap: var(--space-md);
  align-items: stretch;
  margin: var(--space-md) 0 var(--space-lg);
}

.checkout-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 180px;
  padding: var(--space-md);
  border: 1px solid rgba(90, 107, 92, 0.32);
  background: rgba(90, 107, 92, 0.055);
}

.checkout-summary span {
  width: fit-content;
  padding: 0.16rem 0.6rem;
  border: 1px solid var(--moss);
  color: var(--moss);
  font-family: var(--font-sans);
  font-size: 0.78rem;
}

.checkout-summary strong {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 500;
  line-height: 1.2;
}

.checkout-summary em {
  color: var(--charcoal);
  font-style: normal;
  line-height: 1.65;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.85fr);
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: start;
}

.checkout-panel {
  padding: var(--space-md);
  border: 1px solid rgba(90, 107, 92, 0.26);
  background: rgba(246, 241, 232, 0.72);
}

.checkout-panel h2 {
  margin-top: 0;
}

.checkout-story-image {
  margin: 0 0 var(--space-md);
}

.checkout-story-image img {
  display: block;
  width: 100%;
  height: clamp(10rem, 24vw, 15.5rem);
  object-fit: cover;
  border: 1px solid rgba(90, 107, 92, 0.2);
}

.checkout-story-image figcaption {
  max-width: 38rem;
  margin: var(--space-xs) 0 0;
  color: var(--charcoal);
  font-family: var(--font-serif);
  font-size: 0.98rem;
  line-height: 1.75;
}

.checkout-row,
.checkout-add-on {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-top: 1px solid rgba(90, 107, 92, 0.18);
}

.checkout-add-on {
  padding-bottom: 0;
}

.checkout-row span,
.checkout-add-on > span,
.checkout-field span,
.checkout-result dt,
.payment-fields span {
  color: var(--moss);
  font-family: var(--font-sans);
  font-size: 0.78rem;
}

.checkout-row strong,
.checkout-add-on strong {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.6;
}

.checkout-add-on p {
  margin: 0.25rem 0 0;
  color: var(--charcoal);
  line-height: 1.7;
}

.checkout-paybox {
  position: static;
}

.payment-method {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 0.9rem 1rem;
  border: 1px solid rgba(90, 107, 92, 0.28);
  background: rgba(90, 107, 92, 0.045);
}

.payment-method strong {
  max-width: 11rem;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
}

.payment-method span {
  color: var(--moss);
  font-family: var(--font-sans);
  font-size: 0.82rem;
}

.payment-method.is-gated {
  border-color: rgba(184, 84, 80, 0.34);
  background: rgba(184, 84, 80, 0.055);
}

.payment-method.is-gated span {
  color: var(--alert);
}

.checkout-form {
  display: grid;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.checkout-field {
  display: grid;
  gap: 0.35rem;
}

.checkout-field input,
.checkout-field textarea {
  width: 100%;
  padding: 0.78rem 0.9rem;
  border: 1px solid rgba(90, 107, 92, 0.28);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
}

.checkout-field textarea {
  min-height: 7rem;
  resize: vertical;
}

.checkout-field input:focus,
.checkout-field textarea:focus {
  outline: none;
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(90, 107, 92, 0.1);
}

.checkout-form .btn {
  width: 100%;
  margin-top: 0.2rem;
}

.checkout-status {
  min-height: 1.5em;
  margin: 0.35rem 0 0;
  color: var(--charcoal);
  font-size: 0.9rem;
  line-height: 1.6;
}

.checkout-status[data-state="success"] {
  color: var(--moss);
}

.checkout-status[data-state="error"] {
  color: var(--alert);
}

.checkout-result {
  margin-top: var(--space-sm);
  padding: var(--space-sm);
  border: 1px solid rgba(90, 107, 92, 0.32);
  background: rgba(90, 107, 92, 0.06);
}

.checkout-result h3 {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 500;
}

.checkout-result dl {
  display: grid;
  gap: 0.35rem;
  margin: var(--space-xs) 0;
}

.checkout-result dl div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 0.35rem 0;
  border-top: 1px solid rgba(90, 107, 92, 0.16);
}

.checkout-result dd {
  margin: 0;
  color: var(--ink);
  text-align: right;
  word-break: break-word;
}

.checkout-result p,
.checkout-note {
  color: var(--charcoal);
  font-size: 0.92rem;
  line-height: 1.75;
}

.checkout-note {
  margin: var(--space-sm) 0 0;
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-top: 1px solid rgba(90, 107, 92, 0.22);
  border-bottom: 1px solid rgba(90, 107, 92, 0.22);
}

.checkout-total span {
  color: var(--charcoal);
}

.checkout-total strong {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 500;
}

.checkout-benefit-list,
.product-flow-list {
  display: grid;
  gap: 0;
  margin: var(--space-sm) 0 0;
  padding: 0;
  list-style: none;
}

.checkout-benefit-list li {
  padding: 0.95rem 0;
  border-top: 1px solid rgba(90, 107, 92, 0.18);
}

.checkout-benefit-list strong,
.checkout-benefit-list span,
.product-flow-list strong,
.product-flow-list span {
  display: block;
}

.product-flow-list strong,
.product-flow-list span {
  grid-column: 2;
}

.checkout-benefit-list strong,
.product-flow-list strong,
.product-policy-grid strong {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.45;
}

.checkout-benefit-list span,
.product-flow-list span,
.product-policy-grid p {
  margin-top: 0.25rem;
  color: var(--charcoal);
  line-height: 1.75;
}

.checkout-flow-section,
.product-policy-panel {
  margin-top: var(--space-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgba(90, 107, 92, 0.22);
  background: rgba(255, 253, 248, 0.44);
}

.checkout-flow-section h2,
.product-policy-panel h2 {
  margin-top: 0;
}

.checkout-flow-section .product-flow-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-xs);
}

.checkout-flow-section .product-flow-list li {
  grid-template-columns: 1fr;
  gap: 0.72rem;
  min-height: 100%;
  padding: 1rem;
  border: 1px solid rgba(90, 107, 92, 0.18);
  background: rgba(245, 239, 229, 0.36);
}

.checkout-flow-section .product-flow-list strong,
.checkout-flow-section .product-flow-list span {
  grid-column: 1;
}

.product-flow-list {
  counter-reset: product-flow;
  gap: 0.85rem;
}

.product-flow-list li {
  counter-increment: product-flow;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  padding: 0.95rem 0;
  border-top: 1px solid rgba(90, 107, 92, 0.18);
}

.product-flow-list li::before {
  content: counter(product-flow, decimal-leading-zero);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(90, 107, 92, 0.32);
  color: var(--moss);
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1;
}

.product-policy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm);
}

.product-policy-grid article {
  padding: var(--space-sm);
  border: 1px solid rgba(90, 107, 92, 0.18);
  background: rgba(246, 241, 232, 0.62);
}

.product-gate-box,
.gated-summary {
  background: rgba(184, 84, 80, 0.035);
}

.payment-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  margin: var(--space-sm) 0;
}

.payment-fields em {
  display: block;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(90, 107, 92, 0.2);
  background: rgba(255, 255, 255, 0.36);
  color: var(--ink);
  font-style: normal;
  line-height: 1.65;
}

.checkout-actions {
  display: grid;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.checkout-actions .btn {
  width: 100%;
}

.mobile-sticky-cta {
  display: none;
}

@media (max-width: 720px) {
  .checkout-hero,
  .checkout-layout,
  .product-checkout-page .checkout-layout,
  .checkout-flow-section .product-flow-list,
  .product-policy-grid {
    grid-template-columns: 1fr;
  }

  .checkout-summary,
  .checkout-panel,
  .checkout-flow-section,
  .product-policy-panel {
    padding: var(--space-sm);
  }

  .checkout-row,
  .checkout-add-on,
  .product-flow-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .product-flow-list strong,
  .product-flow-list span {
    grid-column: 1;
  }

  .has-mobile-sticky-cta {
    padding-bottom: 5.75rem;
  }

  .mobile-sticky-cta {
    position: fixed;
    left: var(--space-sm);
    right: var(--space-sm);
    bottom: calc(var(--space-xs) + env(safe-area-inset-bottom));
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(28, 28, 30, 0.18);
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(28, 28, 30, 0.18);
  }
}
