/* Buy and thanks pages. Builds on home.css (tokens, .bar, .btn). */
.co { max-width: 640px; margin: 0 auto; padding: 40px 24px 72px; }
.co h1 { font-size: clamp(34px, 6vw, 48px); line-height: 1.04; letter-spacing: -.035em; word-spacing: .06em; font-weight: 520; text-align: left; display: block; margin: 0; }
.co .lede { margin: 12px 0 0; color: var(--ink-2); font-size: 17px; text-align: left; max-width: none; }
.co-card { margin-top: 28px; background: var(--card); border-radius: var(--r); padding: 22px; }
.co-label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.co-label + .co-label, .co-field + .co-label, .tiers + .co-label { margin-top: 22px; }

.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border: 0; padding: 0; margin: 0; }
.tier { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: 20px; padding: 8px 8px 14px; cursor: pointer; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .15s ease; }
.tier input { position: absolute; opacity: 0; pointer-events: none; }
.tier img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 3; border-radius: 14px; image-rendering: pixelated; }
.tier b { margin: 10px 6px 0; font-size: 16px; font-weight: 600; }
.tier span { margin: 2px 6px 0; color: var(--ink-2); font-size: 14.5px; }
.tier s { margin-right: 6px; color: var(--faint); }
.tier b { white-space: nowrap; }
.co .sale-note { margin: 18px 0 0; }
.tier:hover { box-shadow: inset 0 0 0 2px var(--line); }
.tier:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ink); }
.tier:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }

.co-field { display: block; width: 100%; height: 50px; padding: 0 16px; border: 0; border-radius: 14px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; box-shadow: inset 0 0 0 1.5px var(--line); }
.co-field:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.co-hint { margin: 8px 0 0; color: var(--faint); font-size: 13.5px; }

.pwyw { margin-top: 18px; }
.pwyw summary { cursor: pointer; color: var(--ink-2); font-size: 14.5px; list-style: none; }
.pwyw summary::-webkit-details-marker { display: none; }
.pwyw summary::before { content: "+ "; }
.pwyw[open] summary::before { content: "− "; }
.money { position: relative; margin-top: 10px; max-width: 200px; }
.money span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-2); }
.money .co-field { padding-left: 30px; }

.co-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 24px; padding-top: 18px; border-top: 1.5px solid var(--line); }
.co-total b { font-size: 26px; letter-spacing: -.03em; font-weight: 600; }
.co-total small { color: var(--faint); font-size: 13.5px; }
.co .btn.block { margin-top: 18px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.co-error { margin: 12px 0 0; color: var(--red); font-size: 14.5px; min-height: 1.4em; }
.co-notes { margin: 22px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 14.5px; display: grid; gap: 6px; }
.co-notes li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 10px; vertical-align: middle; background: var(--green); }

/* thanks page */
.co-state[hidden] { display: none; }
.wait { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 16px; }
.wait i { width: 10px; height: 10px; background: var(--green); animation: blip 1s steps(1) infinite; }
@keyframes blip { 50% { opacity: .15; } }
.keybox { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 10px 10px 10px 18px; background: #fff; border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--line); }
.keybox code { flex: 1; min-width: 0; font-size: clamp(15px, 3.6vw, 19px); letter-spacing: .04em; overflow-wrap: anywhere; user-select: all; }
.keybox .btn { flex: none; }
.co-steps { margin: 22px 0 0; padding-left: 22px; list-style: decimal; color: var(--ink-2); font-size: 15.5px; display: grid; gap: 6px; }
.co-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pix-mark { display: block; width: 48px; height: 54px; image-rendering: pixelated; margin-bottom: 18px; }

@media (max-width: 560px) {
  .tiers { grid-template-columns: 1fr; }
  .tier { flex-direction: row; align-items: center; gap: 12px; padding: 8px; }
  .tier img { width: 96px; flex: none; }
  .tier b { margin: 0; }
  .tier span { margin: 0 0 0 auto; padding-right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .wait i { animation: none; } }
