/* ==========================================================================
   Checkout page — loaded after site.css
   ========================================================================== */

.checkout-page { background: var(--bg-alt); }

.site-header .nav .secure {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--green-2); font-weight: 600;
}

.checkout-main { padding: 128px 0 0; }

.head { text-align: center; padding: 0 0 44px; }
.head h1 { font-size: 54px; line-height: 1.05; font-weight: 700; letter-spacing: -0.034em; }
.head .lead { margin: 20px auto 0; max-width: 560px; }

/* Single column. The two-column layout existed to put our own order summary
   beside the steps; Paddle's inline checkout now carries the summary, so a second
   column would only duplicate it. */
.checkout-stack { display: grid; gap: 20px; max-width: 720px; margin: 0 auto; }

.panel { background: #fff; border-radius: 20px; padding: 30px; border: 1px solid var(--line); }
.panel-note { background: #fff; }
/* "Before you buy": full width above the steps. White like every other panel —
   the grey wash made it read as disabled, and this is the one block on the page a
   customer genuinely has to read before spending money, so it should not look
   secondary. Its text is a step up in contrast from .panel-body for the same
   reason. */
.panel-lead {
  max-width: 720px; margin: 0 auto 20px;
  background: #fff;
}
.panel-lead .panel-body { color: var(--ink); font-size: 16px; line-height: 1.6; }
.panel-lead .fine { color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
/* Keep the pre-launch notice on the same 720px column as the panels below it,
   otherwise it reads as a banner belonging to the page rather than to the flow. */
#buyState .notice { max-width: 720px; margin-left: auto; margin-right: auto; }
.step-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 18px;
}
.panel-body { font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.panel-body b { color: var(--ink); font-weight: 600; }
.fine { margin-top: 14px; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }

/* licence options */
.options { display: grid; gap: 12px; }
.option {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  width: 100%; text-align: left; cursor: pointer;
  background: #fff; border: 2px solid var(--line-3); border-radius: 14px;
  padding: 18px 20px; font-family: inherit;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.option:hover { border-color: rgba(0, 0, 0, 0.22); }
.option.is-selected { border-color: var(--accent); background: rgba(37, 99, 235, 0.05); }
.o-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.o-title { font-size: 16px; font-weight: 600; color: var(--ink); }
.o-desc { font-size: 14px; color: var(--ink-2); }
.o-price { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); flex: none; }
.chip {
  display: inline-block; margin-left: 8px; padding: 3px 9px; border-radius: 999px;
  background: var(--accent-tint-2); color: var(--accent);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0;
}

/* payment methods (display only — Paddle collects the details) */
.methods { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.method {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line-3); border-radius: 12px; padding: 12px 18px;
  font-size: 14.5px; font-weight: 500; color: var(--ink); background: #fff;
}

/* Paddle inline checkout.
   Paddle renders its iframe into this container, matched by CLASS name via the
   frameTarget setting, so the class name here is load-bearing: renaming it
   silently breaks the checkout. Height is left to Paddle, which resizes the frame
   as the customer moves through it. */
.paddle-checkout-frame { width: 100%; min-width: 280px; }
.paddle-checkout-frame[hidden] { display: none; }

.ticks { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.ticks li {
  position: relative; padding-left: 24px; font-size: 13.5px; color: var(--ink-2);
}
.ticks li::before {
  content: ''; position: absolute; left: 0; top: 4px;
  width: 14px; height: 8px; border-left: 2px solid var(--green-2);
  border-bottom: 2px solid var(--green-2); transform: rotate(-45deg);
}
/* The reassurance line used to sit inside the order panel; with that panel gone it
   becomes one quiet row under the steps rather than a stacked list. */
.ticks-row {
  grid-auto-flow: column; grid-auto-columns: max-content;
  justify-content: center; gap: 26px; margin-top: 4px;
}
@media (max-width: 680px) {
  .ticks-row { grid-auto-flow: row; justify-content: start; gap: 9px; }
}

/* ── waiting-list modal ───────────────────────────────────────────────────── */
.modal-back {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  overflow-y: auto;
}
.modal-back[hidden] { display: none; }
.modal {
  position: relative; background: #fff; border-radius: 20px; padding: 30px;
  width: 100%; max-width: 460px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.4);
  max-height: 100%; overflow-y: auto;
}
.modal h2 { font-size: 25px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.modal .panel-body { margin-bottom: 12px; }
.modal .fine { margin-top: 14px; }
.modal-x {
  position: absolute; top: 12px; right: 14px; border: 0; background: none;
  font-size: 26px; line-height: 1; color: var(--ink-3); cursor: pointer; padding: 4px 8px;
}
.modal-x:hover { color: var(--ink); }

/* Echoes the licence they picked, so the modal is clearly about the thing they
   just tried to buy and the tier we record is visibly the one they chose. */
.wait-picked {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  margin: 18px 0 20px; padding: 12px 14px;
  background: var(--bg-alt); border-radius: 10px; font-size: 13.5px; color: var(--ink-3);
}
.wait-picked b { color: var(--ink); font-size: 14.5px; }

.wait-label {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px;
}
.wait-input {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line-3); border-radius: 10px;
  background: #fff; margin-bottom: 14px;
}
.wait-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.wait-input.bad { border-color: #dc2626; }
.wait-msg { margin-top: 10px; font-size: 13px; color: #dc2626; }
.wait-msg[hidden] { display: none; }
.wait-tick {
  width: 46px; height: 46px; border-radius: 50%; background: rgba(22, 163, 74, 0.1);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
#waitDone { text-align: center; }
#waitDone .btn { margin-top: 18px; }

/* success */
.success {
  max-width: 720px; margin: 0 auto; background: #fff; border-radius: 22px;
  padding: 52px 40px; text-align: center; border: 1px solid var(--line);
  box-shadow: var(--sh-panel);
}
.success-mark {
  width: 62px; height: 62px; margin: 0 auto 24px; border-radius: 50%;
  background: rgba(34, 197, 94, 0.12); display: grid; place-items: center;
}
.success h1 { font-size: 42px; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; }
.success .lead { margin: 18px auto 0; max-width: 520px; }
.key-block {
  margin: 30px auto; background: var(--bg-alt); border-radius: 14px; padding: 20px;
  max-width: 420px;
}
.key-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-3);
}
.key {
  margin-top: 10px; font-family: var(--mono); font-size: 19px; font-weight: 600;
  letter-spacing: 0.06em; color: var(--ink);
}
/* A signed licence is ~250 characters. It has to wrap, break anywhere (there are
   no spaces in base64url), and stay scrollable rather than stretching the card.
   The 19px/0.06em treatment above suits a short typeable key and is unusable at
   this length. */
.key-long {
  font-size: 12.5px; font-weight: 500; letter-spacing: 0; line-height: 1.55;
  text-align: left; word-break: break-all; overflow-wrap: anywhere;
  max-height: 132px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 12px 14px; user-select: all;
}
.key-copy { margin-top: 12px; }
/* No quiet button variant existed: every button on the site is a primary action.
   A copy button next to a licence should not compete with "Download ConTess". */
.btn-quiet {
  background: #fff; color: var(--ink); border: 1px solid var(--line-3);
  font-size: 13.5px; padding: 9px 16px; border-radius: 10px;
}
.btn-quiet:hover { border-color: rgba(0, 0, 0, 0.22); }
.success-meta { margin-top: 20px; }

/* after you pay */
.after { padding: 110px 0 130px; }
.after h2 { text-align: center; }
.steps {
  margin-top: 56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px;
}
.step-num {
  font-size: 34px; font-weight: 700; letter-spacing: -0.03em; color: var(--accent);
  line-height: 1;
}
.step h3 { margin-top: 14px; font-size: 16px; font-weight: 600; }
.step p { margin-top: 10px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.after-cards { margin-top: 64px; }
.after-cards .card { background: #fff; }

@media (max-width: 1000px) {
  .checkout-main { padding-top: 104px; }
  .head h1 { font-size: 38px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 34px; }
  .after { padding: 80px 0 90px; }
}
@media (max-width: 680px) {
  .head h1 { font-size: 32px; }
  .panel, .success { padding: 22px; }
  .success h1 { font-size: 30px; }
  .steps { grid-template-columns: 1fr; }
  .option { flex-direction: column; align-items: flex-start; gap: 10px; }
  .site-header .nav { display: flex; gap: 14px; }
  .site-header .nav a { font-size: 12.5px; }
  .site-header .nav .secure { font-size: 12px; }
}
