/* ============================================================
   PRAXIS — onboarding funnel (/launch)
   Builds on praxis-core.css tokens. No standalone palette:
   every colour flows through the core light/dark variables.
   Class prefix: .pxo-
   ============================================================ */

/* ---------- shell ---------- */
.pxo-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-0);
}

.pxo-top {
  border-bottom: 1px solid var(--line-1);
  background: color-mix(in oklch, var(--bg-0) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  position: sticky; top: 0; z-index: 50;
}
.pxo-top-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gx);
  height: 60px; display: flex; align-items: center; gap: 16px;
}
.pxo-top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.pxo-step-counter {
  font-family: var(--f-mono); font-size: 12px; color: var(--fg-2);
  letter-spacing: 0.04em;
}
.pxo-exit { font-size: 13.5px; color: var(--fg-2); transition: color 0.14s var(--ease); }
.pxo-exit:hover { color: var(--fg-0); }

.pxo-main {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px var(--gx) 88px;
  position: relative;
}
.pxo-main > .grid-bg { height: 420px; inset: 0 0 auto 0; }

.pxo-col { position: relative; z-index: 1; width: min(720px, 100%); }
.pxo-col.wide { width: min(1080px, 100%); }

/* ---------- heading ---------- */
.pxo-hd { text-align: center; margin-bottom: 30px; }
.pxo-hd h1 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.03em; }
.pxo-hd h1 .serif-em { color: var(--acc); }
.pxo-hd p { margin: 10px auto 0; max-width: 52ch; font-size: 15.5px; color: var(--fg-1); line-height: 1.6; }

/* ---------- stepper ---------- */
.pxo-steps { margin: 0 auto 34px; width: min(560px, 100%); position: relative; z-index: 1; }
.pxo-steps-track {
  position: relative; height: 2px; margin: 0 13% 0;
  background: var(--line-2); border-radius: 2px; top: 14px;
}
.pxo-steps-fill {
  position: absolute; inset: 0 auto 0 0;
  width: calc(var(--pxo-progress, 0) * 100%);
  background: var(--acc); border-radius: 2px;
  transition: width 0.4s var(--ease-out);
}
.pxo-steps-items {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr);
  margin: -2px 0 0; padding: 0;
}
.pxo-step { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pxo-step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--f-mono); font-size: 12px; font-weight: 600;
  background: var(--bg-1); border: 1.5px solid var(--line-2); color: var(--fg-3);
  transition: all 0.25s var(--ease);
}
.pxo-step-dot svg { width: 13px; height: 13px; }
.pxo-step.active .pxo-step-dot {
  border-color: var(--acc); color: var(--acc);
  box-shadow: 0 0 0 4px var(--acc-soft);
}
.pxo-step.done .pxo-step-dot { background: var(--acc); border-color: var(--acc); color: var(--acc-fg); }
.pxo-step-label {
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--fg-3);
}
.pxo-step.active .pxo-step-label { color: var(--acc); }
.pxo-step.done .pxo-step-label { color: var(--fg-1); }
@media (max-width: 560px) { .pxo-step-label { display: none; } }

/* ---------- card ---------- */
.pxo-card {
  background: var(--bg-1); border: 1px solid var(--line-1);
  border-radius: var(--r-4); box-shadow: var(--shadow-md);
  padding: clamp(22px, 4vw, 34px);
}
.pxo-card + .pxo-card { margin-top: 16px; }
.pxo-card-hd { margin-bottom: 22px; }
.pxo-card-hd h2 { font-size: 19px; letter-spacing: -0.02em; }
.pxo-card-hd p { margin-top: 6px; font-size: 14px; color: var(--fg-2); line-height: 1.55; }
.pxo-divider { border: 0; border-top: 1px solid var(--line-1); margin: 26px 0; }

/* ---------- fields ---------- */
.pxo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.pxo-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) {
  .pxo-grid { grid-template-columns: 1fr; }
  .pxo-grid .span-2 { grid-column: span 1; }
}

.pxo-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.pxo-field > label {
  font-family: var(--f-mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--fg-2);
}
.pxo-hint { font-size: 12.5px; color: var(--fg-3); line-height: 1.5; }

.pxo-input {
  width: 100%; padding: 10px 13px;
  background: var(--bg-inset); border: 1px solid var(--line-2);
  border-radius: var(--r-2); color: var(--fg-0);
  font-size: 14.5px; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.pxo-input::placeholder { color: var(--fg-4); }
.pxo-input:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.pxo-input:disabled { opacity: 0.6; cursor: not-allowed; }
textarea.pxo-input { resize: vertical; min-height: 140px; line-height: 1.6; }
select.pxo-input { appearance: auto; }

.pxo-err {
  font-size: 12.5px; color: var(--err); line-height: 1.45;
}

/* subdomain composite */
.pxo-subdomain { display: flex; align-items: stretch; min-width: 0; }
.pxo-subdomain .pxo-input { border-radius: var(--r-2) 0 0 var(--r-2); border-right: 0; }
.pxo-subdomain-suffix {
  display: flex; align-items: center; padding: 0 13px;
  background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 0 var(--r-2) var(--r-2) 0;
  font-family: var(--f-mono); font-size: 13px; color: var(--fg-2); white-space: nowrap;
}
.pxo-sub-ok { color: var(--ok); }

/* password composite */
.pxo-inline-row { display: flex; gap: 8px; }
.pxo-inline-row .pxo-input { flex: 1; }

/* ---------- textarea counter ---------- */
.pxo-count { font-family: var(--f-mono); font-size: 11.5px; color: var(--fg-3); align-self: flex-end; }
.pxo-count.over { color: var(--err); }

/* ---------- chips (admin invites) ---------- */
.pxo-chips {
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  padding: 8px; min-height: 50px;
  background: var(--bg-inset); border: 1px solid var(--line-2); border-radius: var(--r-2);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.pxo-chips:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.pxo-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 6px 4px 11px; border-radius: var(--r-pill);
  background: var(--acc-soft); border: 1px solid var(--acc-line);
  font-family: var(--f-mono); font-size: 12.5px; color: var(--fg-0);
}
.pxo-chip button {
  width: 17px; height: 17px; display: grid; place-items: center;
  border-radius: 50%; color: var(--fg-2); font-size: 13px; line-height: 1;
}
.pxo-chip button:hover { background: var(--bg-1); color: var(--err); }
.pxo-chips input {
  flex: 1; min-width: 180px; border: 0; background: transparent;
  padding: 5px 6px; font-size: 14px; color: var(--fg-0);
}
.pxo-chips input:focus { outline: none; }
.pxo-chips input::placeholder { color: var(--fg-4); }

/* ---------- actions ---------- */
.pxo-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 26px; flex-wrap: wrap;
}
.pxo-actions .pxo-legal { font-size: 12.5px; color: var(--fg-3); line-height: 1.5; max-width: 44ch; }
.pxo-actions .pxo-legal a { color: var(--fg-1); text-decoration: underline; text-underline-offset: 2px; }
.pxo-actions .pxo-legal a:hover { color: var(--acc); }

/* ---------- spinner ---------- */
.pxo-spin {
  width: 15px; height: 15px; flex-shrink: 0; border-radius: 50%;
  border: 2px solid color-mix(in oklch, currentColor 30%, transparent);
  border-top-color: currentColor;
  animation: pxo-rot 0.7s linear infinite;
}
@keyframes pxo-rot { to { transform: rotate(360deg); } }

/* ---------- banners ---------- */
.pxo-banner {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px; margin-bottom: 16px;
  border: 1px solid var(--acc-line); background: var(--acc-soft);
  border-radius: var(--r-3); font-size: 13.5px; color: var(--fg-0); line-height: 1.5;
}
.pxo-banner.warn { border-color: color-mix(in oklch, var(--warn) 40%, transparent); background: color-mix(in oklch, var(--warn) 10%, transparent); }
.pxo-error {
  display: flex; flex-direction: column; gap: 3px;
  padding: 13px 16px; margin-bottom: 16px;
  border: 1px solid color-mix(in oklch, var(--err) 40%, transparent);
  background: color-mix(in oklch, var(--err) 8%, transparent);
  border-radius: var(--r-3); font-size: 13.5px; color: var(--fg-0); line-height: 1.5;
}
.pxo-error strong { color: var(--err); }
.pxo-error a { color: var(--acc); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- plan cards ---------- */
.pxo-interval { display: flex; justify-content: center; margin-bottom: 22px; }
.pxo-toggle {
  display: inline-flex; padding: 3px; gap: 2px;
  border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--bg-2);
}
.pxo-toggle button {
  padding: 7px 16px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; color: var(--fg-2);
  transition: all 0.16s var(--ease);
}
.pxo-toggle button[aria-pressed="true"] { background: var(--bg-1); color: var(--fg-0); box-shadow: var(--shadow-sm); }
.pxo-toggle .note { font-size: 11px; color: var(--acc); font-weight: 600; margin-left: 5px; }

.pxo-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .pxo-plans { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .pxo-plans { grid-template-columns: 1fr; } }

.pxo-plan {
  position: relative; display: flex; flex-direction: column; gap: 13px;
  text-align: left; padding: 22px;
  background: var(--bg-1); border: 1.5px solid var(--line-1); border-radius: var(--r-4);
  cursor: pointer; transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), transform 0.16s var(--ease);
}
.pxo-plan:hover { border-color: var(--line-3); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pxo-plan.selected {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--acc-soft), var(--shadow-md);
  background: linear-gradient(180deg, var(--acc-soft), var(--bg-1) 38%);
}
.pxo-plan .nm {
  font-family: var(--f-mono); font-size: 11.5px; font-weight: 500;
  color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.06em;
}
.pxo-plan.selected .nm { color: var(--acc); }
.pxo-plan .price { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.pxo-plan .price .u { font-size: 13px; color: var(--fg-2); font-weight: 500; margin-left: 4px; }
.pxo-plan .pitch { font-size: 13px; color: var(--fg-1); line-height: 1.5; }
.pxo-plan ul {
  list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line-1);
  display: flex; flex-direction: column; gap: 8px;
}
.pxo-plan li { font-size: 12.5px; color: var(--fg-1); padding-left: 19px; position: relative; line-height: 1.45; }
.pxo-plan li::before { content: ''; position: absolute; left: 0; top: 8px; width: 10px; height: 1px; background: var(--acc); }
.pxo-plan .check {
  position: absolute; top: 16px; right: 16px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--line-2); color: transparent; background: var(--bg-1);
  transition: all 0.16s var(--ease);
}
.pxo-plan.selected .check { background: var(--acc); border-color: var(--acc); color: var(--acc-fg); }
.pxo-plan .check svg { width: 12px; height: 12px; }
.pxo-plan .foot-note { font-size: 11.5px; color: var(--fg-3); }

.pxo-plans-note { margin-top: 16px; font-size: 13px; color: var(--fg-2); text-align: center; }
.pxo-plans-note a { color: var(--acc); }

/* ---------- provisioning progress ---------- */
.pxo-provision { display: flex; flex-direction: column; gap: 14px; padding: 8px 2px; }
.pxo-provision-step {
  display: flex; align-items: center; gap: 12px;
  font-size: 14.5px; color: var(--fg-3); transition: color 0.3s var(--ease);
}
.pxo-provision-step .dot {
  width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--line-2); background: var(--bg-1); color: var(--fg-3);
}
.pxo-provision-step .dot svg { width: 12px; height: 12px; }
.pxo-provision-step.active { color: var(--fg-0); }
.pxo-provision-step.active .dot { border-color: var(--acc); color: var(--acc); box-shadow: 0 0 0 4px var(--acc-soft); }
.pxo-provision-step.done { color: var(--fg-1); }
.pxo-provision-step.done .dot { background: var(--acc); border-color: var(--acc); color: var(--acc-fg); }

/* ---------- success ---------- */
.pxo-done { text-align: center; padding: 10px 0 4px; }
.pxo-done-mark {
  width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ok-soft); color: var(--ok);
  border: 1.5px solid color-mix(in oklch, var(--ok) 35%, transparent);
}
.pxo-done-mark svg { width: 28px; height: 28px; }
.pxo-done h2 { font-size: 26px; letter-spacing: -0.03em; }
.pxo-done > p { margin: 10px auto 0; max-width: 46ch; font-size: 14.5px; color: var(--fg-1); line-height: 1.6; }

.pxo-done-cards { display: flex; flex-direction: column; gap: 10px; margin: 26px 0 0; text-align: left; }
.pxo-kv {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px; flex-wrap: wrap;
  background: var(--bg-inset); border: 1px solid var(--line-1); border-radius: var(--r-3);
}
.pxo-kv .k {
  font-family: var(--f-mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--fg-3);
}
.pxo-kv .v { font-family: var(--f-mono); font-size: 13.5px; color: var(--fg-0); word-break: break-all; }
.pxo-kv a.v:hover { color: var(--acc); }

.pxo-invites { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.pxo-invites .pxo-chip { cursor: default; }
.pxo-invites-note { font-size: 12px; color: var(--ok); font-family: var(--f-mono); }

.pxo-next {
  margin-top: 26px; padding: 20px 22px; text-align: left;
  border: 1px solid var(--acc-line); border-radius: var(--r-3);
  background: linear-gradient(180deg, var(--acc-soft), transparent 90%);
}
.pxo-next h3 { font-size: 15px; display: flex; align-items: center; gap: 9px; }
.pxo-next h3 .blink-dot { flex-shrink: 0; }
.pxo-next p { margin-top: 8px; font-size: 13.5px; color: var(--fg-1); line-height: 1.6; }
.pxo-next p b { color: var(--fg-0); }

.pxo-done-actions { margin-top: 26px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- minimal footer ---------- */
.pxo-foot {
  border-top: 1px solid var(--line-1);
  padding: 22px var(--gx);
  display: flex; justify-content: center; gap: 22px; flex-wrap: wrap;
  font-family: var(--f-mono); font-size: 12px; color: var(--fg-3);
}
.pxo-foot a { color: var(--fg-2); }
.pxo-foot a:hover { color: var(--acc); }
