/* Creago: the smaller pages (checkout, thanks, terms, privacy, refunds) and the parts the account page shares with
   them: command blocks with a Copy button, numbered steps, Peek over a panel's top edge, the state dot, notices
   and the confirm box. Colours, type, buttons, the panel look, the top bar and the footer come from site.css. */

/* no page timeline on these pages */
body.page { padding-bottom: 0; --tl: 0px; }
/* site.css hides the right-hand link on phones; on these pages it is the only way to the account */
.page .top-link { display: inline; }

.pg { max-width: calc(1120px + var(--pad) * 2); margin: 0 auto; padding: calc(var(--top) + 64px) var(--pad) 0; }
/* the head leaves room under it for Peek, who stands on the first panel's top edge */
.pg-head { display: grid; gap: 18px; justify-items: start; margin-bottom: 72px; }
.pg-head h1.display { font-size: clamp(40px, 5.4vw, 76px); letter-spacing: -0.035em; line-height: 1.02; max-width: 16ch; }
.pg-head .lead { max-width: 52ch; }

/* ---------- Peek over a panel's top edge, his bottom hidden by the edge ---------- */
.panel.has-peek { overflow: visible; }
.peek-slot { position: absolute; right: 28px; top: 0; z-index: 1; width: 124px; transform: translateY(-100%); overflow: hidden; pointer-events: none; }

/* ---------- the state dot in a title bar (like the monitor's) ---------- */
.state { display: inline-flex; align-items: center; gap: 6px; color: var(--t2); }
.state i { width: 6px; height: 6px; border-radius: 50%; background: var(--t3); transition: background-color var(--fast); }
.state.ok i { background: var(--ok); }
.state.busy i { background: var(--accent); }
.state.warn i { background: #F2B84B; }

/* ---------- numbered steps, each with a command block and its own Copy ---------- */
.inst { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.inst > li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.inst .n { font-family: var(--display); font-size: 17px; font-weight: 600; line-height: 1.4; color: var(--accent-soft); }
.inst-body { display: grid; gap: 8px; min-width: 0; justify-items: start; }
.inst-body > * { margin: 0; }
.inst-label { font-size: 17px; font-weight: 600; line-height: 1.4; }
.inst-text { color: var(--t2); font-size: 16px; }
.inst-body .cmd, .inst-body .asks { justify-self: stretch; }
.cmd { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 9px 8px 18px; border-radius: 18px; background: var(--s2); box-shadow: 0 0 0 1px var(--line) inset; }
.cmd code { flex: 1; min-width: 0; min-height: 1.5em; font-family: var(--text); font-size: 16px; font-weight: 500; line-height: 1.5; color: var(--t1); overflow-wrap: anywhere; }
.cmd .btn { flex: none; min-width: 64px; }
.asks { display: grid; gap: 8px; }
.ask3 .src { flex: none; width: 92px; font-size: 13px; font-weight: 600; color: var(--t3); }
.fine { margin: 0; font-size: 14px; line-height: 1.5; color: var(--t3); }
.fine[hidden] { display: none; }

/* ---------- a notice: the result of an action, or an error with its fix ---------- */
.notice { margin: 0; display: grid; gap: 4px; padding: 12px 16px; border-radius: 16px; background: var(--s2); box-shadow: 0 0 0 1px var(--line2) inset; font-size: 15px; line-height: 1.5; color: var(--t1); }
.notice[hidden] { display: none; }
.notice b { font-weight: 500; }
.notice .fix { color: var(--t2); }
.notice.ok { box-shadow: 0 0 0 1px rgba(91, 224, 138, .35) inset; }
.notice.err { box-shadow: 0 0 0 1px rgba(242, 184, 75, .45) inset; }

/* ---------- the confirm box: a panel in the middle of the screen, the room dimmed behind it ---------- */
.confirm { width: min(480px, calc(100vw - 32px)); padding: 0; margin: auto; color: var(--t1); background: #0D0820; border: 1px solid var(--line2); border-radius: 24px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); }
.confirm::backdrop { background: rgba(3, 1, 10, .76); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.confirm[open] { animation: rise 260ms var(--ease); }
.cf-body { display: grid; gap: 14px; padding: 22px 24px 24px; }
.cf-body p { margin: 0; color: var(--t2); font-size: 16px; line-height: 1.55; }
.cf-body .cf-extra { color: var(--t1); }
.cf-body .cf-extra[hidden] { display: none; }
.cf-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* =====================================================================
   checkout.html: the plan on the left, the payment on the right, the three steps after paying under the plan
   ===================================================================== */
.co { display: grid; grid-template-columns: minmax(0, 40fr) minmax(0, 60fr); grid-template-areas: "plan pay" "after pay"; gap: 20px; align-items: start; }
.co-plan { grid-area: plan; }
/* the payment panel runs the full height of the left column */
.co-pay { grid-area: pay; align-self: stretch; display: flex; flex-direction: column; }
.co-after { grid-area: after; }
.peek-narrow { display: none; }

/* the two plans as two options; the chosen one carries the violet line and a violet dot */
.co-opts { display: grid; }
.co-opt { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--line); transition: background-color var(--fast); }
.co-opt:hover { background: rgba(185, 160, 255, .07); }
.co-opt::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: var(--accent); transform: scaleY(0); transition: transform 260ms var(--ease); }
.co-opt.on { background: rgba(139, 92, 246, .14); }
.co-opt.on::before { transform: none; }
.co-opt:focus-visible { outline-offset: -3px; border-radius: 0; }
.co-radio { margin-top: 6px; width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--t3) inset; display: grid; place-items: center; }
.co-opt.on .co-radio { box-shadow: 0 0 0 1.5px var(--accent-soft) inset; }
.co-opt.on .co-radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-soft); }
.co-opt-body { display: grid; gap: 10px; }
.co-opt .plan-price { font-size: 18px; }
.co-opt .plan-price b { font-size: 40px; }
.co-opt .plan-what { margin: 0; font-size: 16px; line-height: 1.5; }
.co-note { margin: 0; padding: 16px 22px 20px; color: var(--t2); font-size: 15px; line-height: 1.5; }

/* the payment panel: Whop's checkout mounts here; until it can, a calm message */
.co-pay .panel-facts { color: var(--t2); }
.co-body { position: relative; flex: 1; min-height: 520px; }
.co-mount { padding: 12px; }
.co-mount[hidden] { display: none; }
.co-msg { display: grid; gap: 16px; align-content: start; justify-items: start; padding: 48px 40px; max-width: 520px; }
.co-msg[hidden] { display: none; }
.co-msg p { margin: 0; color: var(--t2); font-size: 17px; line-height: 1.55; }
.co-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
/* loading: a short line and a thin bar that sweeps, over the mounted checkout */
.co-loading { position: absolute; left: 0; right: 0; top: 0; display: grid; gap: 10px; padding: 28px 40px; font-size: 15px; color: var(--t2); pointer-events: none; }
.co-loading[hidden] { display: none; }
.co-loading i { height: 2px; border-radius: 2px; background: var(--s3); overflow: hidden; position: relative; }
.co-loading i::after { content: ""; position: absolute; top: 0; bottom: 0; width: 30%; background: var(--accent); animation: sweep 1.2s var(--wipe) infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

.co-steps { list-style: none; margin: 0; padding: 8px 22px 14px; display: grid; }
.co-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.5; color: var(--t2); }
.co-steps li:last-child { border-bottom: 0; }
.co-steps b { font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--accent-soft); }
.co-steps code { font-family: var(--text); font-size: 16px; font-weight: 600; color: var(--t1); }

/* =====================================================================
   thanks.html: one view at a time (succeeded, failed, canceled, pending, none)
   ===================================================================== */
.ty-view[hidden] { display: none; }
.ty-panel { max-width: 880px; }
.ty-panel .panel-facts { color: var(--t2); }
.ty-pay { max-width: 260px; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ty-body { display: grid; gap: 22px; padding: 26px 28px 30px; }
.ty-body > p { margin: 0; color: var(--t2); font-size: 17px; line-height: 1.55; max-width: 60ch; }
.ty-next { margin: 22px 2px 0; color: var(--t2); font-size: 16px; }
.ty-next a { color: var(--t1); text-decoration: underline; text-decoration-color: rgba(194, 174, 255, .6); text-underline-offset: 3px; }
.ty-next a:hover { color: var(--t1); }
.ty-short { max-width: 720px; }

/* =====================================================================
   terms.html, privacy.html, refunds.html: one line, supplied later by the owner
   ===================================================================== */
.legal-panel { max-width: 720px; }
.legal-body { padding: 28px 28px 32px; }
.legal-body p { margin: 0; color: var(--t2); font-size: 17px; }

/* ---------- narrower screens ---------- */
@media (max-width: 960px) {
  .co { grid-template-columns: minmax(0, 1fr); grid-template-areas: "plan" "pay" "after"; }
  .co-body { min-height: 0; }
  .peek-narrow { display: block; }
  .co-pay .peek-slot { display: none; }
  .co-msg { padding: 32px 24px 36px; }
  .co-loading { padding: 22px 24px; }
}
@media (max-width: 720px) {
  .pg { padding-top: calc(var(--top) + 40px); }
  .pg-head { gap: 14px; margin-bottom: 84px; }
  .pg-head h1.display { font-size: 40px; }
  .peek-slot { right: 18px; width: 100px; }
  .co-opt { padding: 18px 16px; gap: 12px; }
  .co-opt .plan-price b { font-size: 36px; }
  .co-note { padding: 14px 16px 18px; }
  .co-msg { padding: 26px 18px 30px; }
  .co-mount { padding: 8px; }
  .co-steps { padding: 6px 16px 10px; }
  .ty-body { padding: 20px 18px 24px; gap: 20px; }
  .inst > li { grid-template-columns: 1fr; gap: 6px; }
  .inst .n { padding-top: 0; }
  .cmd code { font-size: 15px; }
  .ask3 { flex-wrap: wrap; row-gap: 2px; padding-top: 10px; }
  .ask3 .src { width: 100%; }
  .legal-body { padding: 22px 18px 26px; }
  .cf-body { padding: 20px 18px 20px; }
  .cf-actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .co-opt::before, .state i { transition: none; }
  .co-loading i::after { animation: none; width: 100%; opacity: .5; }
  .confirm[open] { animation: none; }
}
