/* /buy: a two-pane checkout. Summary on the left, Paddle's inline form on the right; always light. */
:root{--ink:#1a1a1a;--muted:#6b6b6b;--faint:#9a9a9a;--line:#e6e6e6;--side:#fafaf9;--form:#fff;--accent:#8a6a12;color-scheme:light}
*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{background:var(--form);color:var(--ink);font:400 14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;-webkit-font-smoothing:antialiased}
a{color:inherit}
p{margin:0}

main.co{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr}
.co-side{background:var(--side);display:flex;justify-content:flex-end}
.co-form{background:var(--form);box-shadow:-12px 0 32px -18px rgba(0,0,0,.14);display:flex;justify-content:flex-start}
.co-inner{width:100%;max-width:440px;padding:64px 40px 32px}
.co-side .co-inner{display:flex;flex-direction:column;min-height:100dvh;max-width:420px;padding-left:24px;padding-right:56px}
.co-form .co-inner{padding-left:56px;padding-right:24px;max-width:480px}

.co-back{display:inline-flex;align-items:center;gap:10px;text-decoration:none;font-weight:500;font-size:14px;margin-left:-6px;padding:4px 6px;border-radius:8px}
.co-back:hover{background:rgba(0,0,0,.04)}
.co-back svg{width:14px;height:14px;fill:none;stroke:var(--muted);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.co-back img{width:28px;height:28px;border-radius:7px;box-shadow:0 0 0 1px rgba(0,0,0,.06)}

.co-head{margin-top:36px}
.co-pay-to{color:var(--muted);font-size:16px;font-weight:500}
.co-amount{font-size:36px;font-weight:600;letter-spacing:-.02em;margin-top:2px;font-variant-numeric:tabular-nums}
.co-toggle{display:none}

.co-lines{margin-top:32px}
.co-item{display:flex;align-items:flex-start;gap:14px}
.co-item img{width:42px;height:42px;border-radius:9px;box-shadow:0 0 0 1px rgba(0,0,0,.06)}
.co-item-text{flex:1;min-width:0}
.co-item-name{font-weight:500}
.co-item-sub{color:var(--muted);font-size:13px;margin-top:2px}
.co-item-price{font-weight:500;font-variant-numeric:tabular-nums}

.co-totals{margin:24px 0 0 56px;display:grid}
.co-totals div{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-top:1px solid var(--line)}
.co-totals div[hidden]{display:none}
.co-totals dt{font-weight:500}
.co-totals dd{margin:0;font-variant-numeric:tabular-nums}
.co-muted{color:var(--faint)}
.co-total dt,.co-total dd{font-weight:600}

.co-foot{margin-top:auto;padding-top:40px;display:flex;align-items:center;gap:14px;color:var(--faint);font-size:12px}
.co-foot b{color:var(--muted);font-weight:600}
.co-foot nav{display:flex;gap:12px;padding-left:14px;border-left:1px solid var(--line)}
.co-foot a{text-decoration:none}
.co-foot a:hover{color:var(--muted)}

.checkout-container{min-height:0}
.co-note{display:flex;align-items:center;gap:8px;margin-top:20px;color:var(--faint);font-size:12px}
.co-note svg{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}

/* while Paddle's frame loads: field-shaped placeholders, then the error state if it never comes */
.co-loading{display:grid;gap:8px;padding-top:4px}
.co-loading[hidden]{display:none}
.sk{display:block;border-radius:6px;background:linear-gradient(90deg,#f0f0f0 25%,#f7f7f7 50%,#f0f0f0 75%);background-size:200% 100%;animation:sk 1.4s ease-in-out infinite}
.sk-label{width:30%;height:12px;margin-top:12px}
.sk-field{height:44px}
.sk-button{height:46px;margin-top:20px;background:#ececec}
@keyframes sk{from{background-position:100% 0}to{background-position:-100% 0}}
@media (prefers-reduced-motion:reduce){.sk{animation:none}}
.co-loading h2{font-size:18px;font-weight:600;margin:0}
.co-loading p{color:var(--muted)}
.co-loading .fine{font-size:12px;color:var(--faint)}
.co-loading .fine a{color:var(--muted)}
.btn{justify-self:start;height:40px;padding:0 18px;margin:8px 0;border:0;border-radius:8px;background:var(--ink);color:#fff;font:500 14px/1 inherit;font-family:inherit;cursor:pointer}

@media (max-width:900px){
  main.co{grid-template-columns:1fr;grid-template-rows:auto 1fr}
  .co-side,.co-form{justify-content:center}
  .co-form{box-shadow:none}
  .co-side .co-inner,.co-form .co-inner{max-width:480px;min-height:0;padding:20px 16px}
  .co-side .co-inner{padding-bottom:24px}
  .co-head{margin-top:20px;text-align:center}
  .co-amount{font-size:32px}
  .co-toggle{display:inline-flex;align-items:center;gap:4px;margin-top:10px;padding:4px 10px;border:0;border-radius:6px;background:rgba(0,0,0,.05);color:var(--ink);font:500 13px/1.4 inherit;font-family:inherit;cursor:pointer}
  .co-toggle svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s}
  .co-toggle[aria-expanded="true"] svg{transform:rotate(180deg)}
  .co-lines{display:none;margin-top:20px}
  .co-lines.open{display:block}
  .co-foot{display:none}
  .co-form .co-inner{padding-top:4px;padding-bottom:40px}
}
