.checkout {
  font-family: Montserrat, Arial, sans-serif;
  width: min(67rem, calc(100% - 3rem)); margin: clamp(5rem, 12vh, 9rem) auto 5rem;
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
  align-items: start; gap: clamp(2.5rem, 8vw, 7rem);
}
.checkout [hidden] { display: none !important; }
.cover { display: grid; place-items: center; }
.cover img {
  width: min(100%, 26rem);
  box-shadow: 0 2px 5px rgb(0 0 0 / 9%), 0 12px 26px -6px rgb(0 0 0 / 19%);
}
.purchase h1 { max-width: 13ch; font-size: clamp(2.5rem, 4.5vw, 4.3rem); line-height: 1.04; letter-spacing: -.055em; font-weight: 300; }
.purchase .edition { margin: 1.2rem 0 1.6rem; color: #76461c; }
#environment { margin: -.6rem 0 1rem; color: #615e5a; font-size: .82rem; }
.total { display:flex; align-items:baseline; justify-content:space-between; border-block:1px solid #ded8d1; padding:1rem 0; }
.total strong { font-size:1.55rem; font-weight: 400; }
.total small { font-size:.75rem; }
.description, #library p { margin:1rem 0; line-height:1.6; }
.checkout label, .field-label { display:grid; gap:.4rem; font-size:.9rem; margin:.9rem 0; }
.checkout input:not([type=checkbox]), .checkout select, .card-field {
  width:100%; min-width:0; height:2.9rem; border:1px solid #aca59c; border-radius:.4rem; background:white; padding:.55rem .7rem; color:inherit; font:inherit;
}
.checkout .pair { display:grid; grid-template-columns: 1fr 1fr; gap:1rem; }
.checkout summary { cursor:pointer; font-size:.88rem; margin:.7rem 0; }
.checkout .consent { display:flex; gap:.75rem; align-items:flex-start; line-height:1.5; margin:1.2rem 0; }
.consent input { margin:.2rem 0 0; width:1.15rem; height:1.15rem; flex:none; accent-color:#76461c; }
.seller { font-size:.78rem; color:#615e5a; line-height:1.55; margin:.5rem 0; }
.checkout button:not(.text-button), .downloads a {
  display:inline-block; font:inherit; padding:.85rem 1.45rem; margin:.8rem 0; border:0; border-radius:2rem;
  background:#252521; color:white; cursor:pointer; text-decoration:none;
}
.checkout button:disabled { opacity:.55; cursor:wait; }
.text-button { background:transparent; color:#714019; border:0; padding:.65rem 0; text-decoration:underline; cursor:pointer; }
#payment fieldset { margin:1rem 0 0; border:0; padding:0; }
#payment legend, #library h2 { font-weight:600; font-size:1.15rem; }
#wallet { max-width:28rem; margin:1rem 0; }
.card-field { padding:0 .65rem; }
.card-field > * { width:100%; height:100%; }
.field-label { margin-bottom:.35rem; }
#status:not(:empty) { margin:1rem 0; line-height:1.55; }
.downloads { display:flex; flex-wrap:wrap; gap:.6rem; }
@media(max-width:700px) {
  .checkout { width:min(30rem, calc(100% - 2.6rem)); grid-template-columns:1fr; gap:1.6rem; }
  .cover img { width: min(60%, 13rem); }
}

.checkout.stripe-open { display:block; }
.stripe-open .cover, .stripe-open .purchase > h1, .stripe-open .edition, .stripe-open .total,
.stripe-open .description { display:none; }
#stripe-payment { min-height:20rem; }
