/* ==========================================================================
   Standfast — wizard, preview, checkout
   ========================================================================== */

/* --------------------------------------------------------------- exits */
.exit-row {
  display: grid; grid-template-columns: 28px 1fr 1.25fr 32px;
  gap: 10px; align-items: center; margin-bottom: 10px;
}
@media (max-width: 620px) {
  .exit-row { grid-template-columns: 24px 1fr 28px; grid-template-areas: "n a x" ". b ."; }
  .exit-row .input:nth-of-type(1) { grid-area: a; }
  .exit-row .input:nth-of-type(2) { grid-area: b; }
}
.exit-row__n {
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--green-050); border: 1px solid var(--green-100);
  color: var(--green-700); font-size: .8rem; font-weight: 700;
  display: grid; place-items: center;
}
.exit-row .input { padding: 11px 13px; font-size: .98rem; }
.exit-row__x {
  background: none; border: none; cursor: pointer;
  color: var(--muted-light); font-size: 1.4rem; line-height: 1;
  padding: 4px 8px; border-radius: 6px;
}
.exit-row__x:hover { color: #A4472F; background: #FBEFEC; }

/* --------------------------------------------------------------- review */
.review-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.review-table tr { cursor: pointer; transition: background .12s ease; }
.review-table tr:hover { background: var(--green-050); }
.review-table td { padding: 13px 14px 13px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.review-table td:first-child { width: 38%; color: var(--muted); font-size: .94rem; }
.review-table td:last-child { color: var(--green-900); font-weight: 550; }

/* --------------------------------------------------------------- generating */
.gen-mark { display: flex; justify-content: center; gap: 8px; padding-top: var(--s-4); }
.gen-mark span {
  width: 10px; height: 10px; border-radius: 999px; background: var(--green-500);
  animation: bob 1s infinite ease-in-out;
}
.gen-mark span:nth-child(2) { animation-delay: .14s; }
.gen-mark span:nth-child(3) { animation-delay: .28s; }
@keyframes bob { 0%,100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-7px); opacity: 1; } }

.gen-list { list-style: none; margin: 0 auto; padding: 0; max-width: 460px; text-align: left; }
.gen-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; font-size: 1rem; color: var(--muted-light);
  opacity: .45; transition: opacity .3s ease, color .3s ease;
}
.gen-list li.is-done { opacity: 1; color: var(--ink-soft); }
.gen-tick {
  flex: none; width: 20px; height: 20px; border-radius: 999px;
  border: 1.5px solid var(--rule-strong); background: var(--white);
  transition: all .3s ease;
}
.gen-list li.is-done .gen-tick {
  background: var(--green-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.2l2.2 2.2 4.6-5' stroke='%23fff' stroke-width='1.9' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
  border-color: var(--green-700);
}

/* --------------------------------------------------------------- preview */
.preview-head { max-width: 720px; margin: 0 auto var(--s-6); text-align: center; }
.preview-head h1 { margin: var(--s-4) 0 var(--s-4); font-size: clamp(2rem, 3.6vw, 2.8rem); }
.preview-head .lead { color: var(--muted); margin: 0; }

.unlock-bar {
  max-width: 1180px; margin: 0 auto var(--s-6);
  background: var(--green-900); color: var(--green-100);
  border-radius: var(--radius-lg); padding: var(--s-5) var(--s-6);
  display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}
.unlock-bar__price { display: flex; align-items: baseline; gap: 8px; flex: none; }
.unlock-bar__price strong { font-family: var(--serif); font-size: 2.1rem; color: #fff; font-weight: 600; }
.unlock-bar__price span { font-size: .84rem; color: var(--green-200); opacity: .8; }
.unlock-bar__what { flex: 1; min-width: 200px; font-size: .95rem; color: var(--green-200); }
.unlock-bar .btn { flex: none; }
@media (max-width: 700px) { .unlock-bar .btn { width: 100%; } }

.preview-foot {
  max-width: 720px; margin: var(--s-9) auto 0; text-align: center;
  padding-top: var(--s-7); border-top: 1px solid var(--rule);
}
.preview-foot p { color: var(--muted); font-size: 1.02rem; margin-bottom: var(--s-6); }

/* --------------------------------------------------------------- checkout */
.checkout {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--s-6);
  max-width: 1000px; margin: 0 auto; align-items: start;
}
@media (max-width: 880px) { .checkout { grid-template-columns: 1fr; } }

.checkout__form {
  background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); padding: var(--s-6);
  box-shadow: var(--shadow-md);
}
.checkout__form h2 { margin: var(--s-4) 0 var(--s-2); font-size: 1.8rem; }
.checkout__form .btn-back { padding: 6px 0; }

.card-input { position: relative; }
.card-input__brand {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  color: var(--green-700); background: var(--green-050);
  padding: 4px 8px; border-radius: 4px;
}
.checkout__secure {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: var(--s-5) 0 0; font-size: .84rem; color: var(--muted-light);
  text-align: center;
}

.spinner {
  width: 15px; height: 15px; border-radius: 999px;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  display: inline-block; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.checkout__summary {
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); padding: var(--s-6);
  position: sticky; top: 92px;
}
@media (max-width: 880px) { .checkout__summary { position: static; } }
.checkout__summary h3 { font-size: 1.2rem; margin-bottom: var(--s-4); }
.checkout__venue {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 13px 15px; margin-bottom: var(--s-5);
}
.checkout__crest {
  width: 26px; height: 30px; flex: none; border-radius: 3px 3px 13px 13px;
  background: linear-gradient(160deg, var(--green-600), var(--green-800));
}
.checkout__venue strong { display: block; color: var(--green-900); font-size: 1rem; line-height: 1.3; }
.checkout__venue span { font-size: .85rem; color: var(--muted); }

.checkout__items { list-style: none; margin: 0 0 var(--s-5); padding: 0; }
.checkout__items li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; font-size: .94rem; color: var(--muted);
  border-bottom: 1px dashed var(--rule);
}
.checkout__items li span:last-child { color: var(--green-600); font-weight: 700; }

.checkout__total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: var(--s-4); border-top: 2px solid var(--green-800);
}
.checkout__total span { font-size: .95rem; color: var(--muted); }
.checkout__total strong { font-family: var(--serif); font-size: 1.9rem; color: var(--green-900); font-weight: 600; }
.checkout__then { text-align: right; font-size: .84rem; color: var(--muted-light); margin-top: 2px; }

.checkout__guar {
  margin: var(--s-5) 0 0; padding-top: var(--s-4);
  border-top: 1px solid var(--rule);
  font-size: .9rem; color: var(--muted); line-height: 1.55;
}
.checkout__guar strong { color: var(--green-900); }

/* --------------------------------------------------------------- done */
.done { max-width: 720px; margin: 0 auto var(--s-8); text-align: center; }
.done__tick {
  width: 68px; height: 68px; margin: 0 auto var(--s-5);
  border-radius: 999px; background: var(--green-050);
  border: 2px solid var(--green-200); color: var(--green-700);
  display: grid; place-items: center;
  animation: pop .45s cubic-bezier(.2,1.3,.4,1) both;
}
.done__tick svg { width: 34px; height: 34px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.done h1 { margin-bottom: var(--s-4); }
.done .lead { color: var(--muted); }

.done__next {
  display: grid; gap: var(--s-3); text-align: left;
  margin-top: var(--s-7);
}
.done__step {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 16px 18px;
}
.done__step span {
  flex: none; width: 26px; height: 26px; border-radius: 999px;
  background: var(--green-700); color: #fff;
  font-size: .82rem; font-weight: 700;
  display: grid; place-items: center; margin-top: 2px;
}
.done__step p { margin: 0; font-size: .97rem; color: var(--muted); line-height: 1.55; }
