/* Checkout thank-you page: a seal that draws itself, a confetti burst (js/celebrate.js), then the next steps. Motion is skipped for reduced-motion. */
.ty { position: relative; overflow: hidden; padding: calc(72px + clamp(28px, 5vw, 64px)) 0 clamp(56px, 8vw, 110px);
  background: radial-gradient(60% 46% at 50% 0%, color-mix(in srgb, var(--terracotta-soft) 42%, transparent), transparent 70%), linear-gradient(180deg, var(--cream-50), var(--cream, var(--cream-white))); }
.ty__confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.ty__in { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; max-width: 820px; }
.ty__h1 { margin-inline: auto; max-width: 14em; animation: ty-rise .8s var(--ease-out) .62s both; }
.ty__lede { margin-inline: auto; animation: ty-rise .8s var(--ease-out) .74s both; }
.ty__eyebrow { margin-top: var(--space-xl); color: var(--terracotta-ink); animation: ty-rise .8s var(--ease-out) .5s both; }

/* The seal */
.ty__seal { position: relative; width: clamp(108px, 18vw, 140px); aspect-ratio: 1; display: grid; place-items: center; }
.ty__badge { position: relative; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 18px 26px color-mix(in srgb, var(--terracotta-deep) 28%, transparent)); }
.ty__disc { fill: var(--terracotta); transform-origin: 60px 60px; animation: ty-pop .7s var(--ease-out) both; }
.ty__stroke { fill: none; stroke: var(--sage-700); stroke-width: 2.2; stroke-dasharray: 1; stroke-dashoffset: 1; transform: rotate(-90deg); transform-origin: 60px 60px; animation: ty-draw .9s .35s var(--ease) forwards; }
.ty__key circle, .ty__key path { fill: none; stroke: var(--cream-white); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: ty-draw .55s .75s var(--ease) forwards; }
.ty__key path { animation-delay: 1s; }
.ty__key { transform-origin: 60px 60px; animation: ty-turn .6s 1.45s var(--ease-out) both; }
.ty__ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--terracotta-soft); opacity: 0; animation: ty-ring 1.6s .55s var(--ease-out) forwards; }
.ty__ring--2 { animation-delay: .85s; border-color: var(--sage-300); }

/* Steps rise in after the seal */
.ty-steps { list-style: none; margin: var(--space-sm) 0 var(--space-2xl); padding: clamp(18px, 3vw, 28px); width: 100%; display: grid; gap: 0; text-align: left;
  background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 24px 50px -34px color-mix(in srgb, var(--bronze) 45%, transparent); backdrop-filter: blur(6px); animation: ty-rise .8s var(--ease-out) .9s both; }
.ty-step { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: var(--space-lg); padding: var(--space-md) 0 18px; }
.ty-step:last-child { padding-bottom: var(--space-2xs); }
.ty-step:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 46px; bottom: 0; width: 2px; background: var(--cream-300); border-radius: var(--radius-pill); }
.ty-step.is-done:not(:last-child)::before { background: var(--sage-300); }
.ty-step__dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 600 var(--step--1)/1 var(--sans); color: var(--greige-700); background: var(--cream-200); }
.ty-step__dot svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ty-step.is-done .ty-step__dot { background: var(--sage-700); color: var(--cream-white); }
.ty-step.is-now .ty-step__dot { background: var(--terracotta); }
.ty-step.is-now .ty-step__dot i { width: 10px; height: 10px; border-radius: 50%; background: var(--cream-white); animation: ty-beat 1.4s ease-in-out infinite; }
.ty-step__h { margin: var(--space-xs) 0 var(--space-2xs); font: 600 var(--step-0)/1.3 var(--sans); }
.ty-step p { margin: 0; color: var(--ink-soft); line-height: 1.55; }
.ty-step a, .ty-help a { color: var(--terracotta-ink); text-underline-offset: 3px; }
.ty__cta { justify-content: center; animation: ty-rise .8s var(--ease-out) 1.02s both; }
.ty-help { max-width: 40em; margin: 0; padding: var(--space-lg) var(--space-xl); border-radius: var(--radius-md); background: var(--sage-50); color: var(--sage-800); font-size: var(--step-0); line-height: 1.55; animation: ty-rise .8s var(--ease-out) 1.12s both; }
.ty-help p { margin: 0; }

@keyframes ty-pop { 0% { transform: scale(.2); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes ty-draw { to { stroke-dashoffset: 0; } }
@keyframes ty-turn { 0% { transform: rotate(0); } 60% { transform: rotate(-24deg); } 100% { transform: rotate(-18deg); } }
@keyframes ty-ring { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes ty-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ty-beat { 0%, 100% { transform: scale(.8); opacity: .7; } 50% { transform: scale(1.15); opacity: 1; } }

/* The quiet confirmation layer used by the Pop Books follow-up pages and the browser waitlist. */
.bkf-msg__next { margin: var(--space-2xs) 0 0; font: 600 var(--step--1)/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.bkf-msg__icon path { stroke: var(--cream-white); }
@media (prefers-reduced-motion: no-preference) {
  .bkf-msg, .pr-hero--list { animation: thanks-rise .5s var(--ease-out) both; }
  .bkf-steps li { animation: thanks-rise .45s var(--ease-out) both; }
  .bkf-steps li:nth-child(2) { animation-delay: .08s; }
  .bkf-steps li:nth-child(3) { animation-delay: .16s; }
}
@keyframes thanks-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* The checkout sequence: the order being paid for and what happens next, on details, link and cancelled. */
.co-order { margin: 0 0 var(--space-xl); padding: var(--space-lg) var(--space-xl); display: grid; gap: var(--space-md); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.co-order__row { margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); justify-content: space-between; align-items: baseline; }
.co-order dt { margin: 0; font: 600 var(--step--1)/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.co-order dd { margin: 0; max-width: 32em; text-align: right; color: var(--ink); }
.co-order__total { padding-top: var(--space-md); border-top: 1px solid var(--line); }
.co-order__total dd { font: 600 var(--step-1)/1.2 var(--sans); }
.co-next { margin: var(--space-xl) 0 0; padding-left: var(--space-xl); display: grid; gap: var(--space-xs); color: var(--ink-mute); font-size: var(--step--1); line-height: 1.5; }
.co-form .hint { display: block; margin-top: var(--space-xs); font-size: var(--step--1); color: var(--ink-mute); }

@media (prefers-reduced-motion: reduce) {
  .ty *, .ty *::before { animation: none !important; }
  .ty__stroke, .ty__key circle, .ty__key path { stroke-dashoffset: 0; }
  .ty__key { transform: rotate(-18deg); }
  .ty__ring { display: none; }
  .bkf-msg, .bkf-steps li, .pr-hero--list { animation: none; }
}
@media (max-width: 520px) {
  .ty-step { grid-template-columns: 30px 1fr; gap: var(--space-md); }
  .ty-step__dot { width: 30px; height: 30px; }
  .ty-step:not(:last-child)::before { left: 14px; top: 40px; }
  .co-order { padding: var(--space-lg); }
  .co-order__row { display: grid; }
  .co-order dd { text-align: left; }
}
