/* Onboarding funnel — builds on styles.css tokens */
.flow-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
}
.flow-aside {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(2rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.flow-aside::after {
  content: "";
  position: absolute; left: -80px; bottom: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(22,224,160,0.22), transparent 65%);
}
.flow-aside .brand { color: var(--cream); }
.flow-aside h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-top: 2rem; max-width: 18ch; }
.flow-aside p { color: rgba(245,240,230,0.72); max-width: 36ch; margin-top: 1rem; }
.steps { list-style: none; padding: 0; margin: 2.4rem 0 0; display: grid; gap: 1rem; position: relative; z-index: 1; }
.steps li { display: flex; align-items: center; gap: 0.9rem; font-size: 0.95rem; color: rgba(245,240,230,0.6); }
.steps li b {
  width: 30px; height: 30px; flex: none;
  border-radius: 50%;
  border: 1px solid rgba(245,240,230,0.3);
  display: grid; place-items: center;
  font-family: var(--display); font-size: 0.95rem;
}
.steps li.active { color: var(--cream); }
.steps li.active b { background: var(--brass); border-color: var(--brass); color: #fff; }
.steps li.done b { background: var(--sage-deep); border-color: var(--sage-deep); color: #fff; }

.flow-main {
  background: var(--paper);
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
}
.flow-card { width: min(100%, 480px); }
.flow-card .eyebrow { display: block; margin-bottom: 0.7rem; }
.flow-card h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 0.7rem; }
.flow-card .sub { color: var(--ink-soft); margin-bottom: 1.8rem; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; }
.field input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: var(--body);
  font-size: 1rem;
  background: var(--cream);
  color: var(--ink);
}
.field input:focus { outline: 2px solid var(--brass); outline-offset: 1px; border-color: var(--brass); }
.field .err { color: var(--clay); font-size: 0.82rem; margin-top: 0.35rem; min-height: 1rem; }

.opt {
  display: flex; gap: 0.9rem; align-items: flex-start;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--cream);
  margin-bottom: 1rem;
  cursor: pointer;
}
.opt input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brass); }
.opt span { font-size: 0.92rem; color: var(--ink-soft); }
.opt strong { display:block; color: var(--ink); margin-bottom: 0.2rem; }

.array-badge {
  display:inline-flex; align-items:center; gap:0.5rem;
  font-size:0.78rem; font-weight:600; letter-spacing:0.04em;
  background: var(--cream-deep); color: var(--sage-deep);
  padding:0.4rem 0.8rem; border-radius:999px; margin-bottom:1.4rem;
}

.tier-pick { display: grid; gap: 0.9rem; margin-bottom: 1.6rem; }
.tier-opt {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem 1.2rem;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  background: var(--cream);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.tier-opt:hover { transform: translateY(-2px); }
.tier-opt.sel { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(91,61,245,0.16); }
.tier-opt h3 { font-size: 1.2rem; }
.tier-opt p { margin: 0.2rem 0 0; font-size: 0.84rem; color: var(--ink-soft); }
.tier-opt .price { font-family: var(--display); font-size: 1.5rem; text-align: right; }
.tier-opt .price small { font-family: var(--body); font-size: 0.8rem; color: var(--sage-deep); }

.summary {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem;
  margin-bottom: 1.4rem;
}
.summary__row { display:flex; justify-content: space-between; font-size: 0.92rem; padding: 0.35rem 0; }
.summary__row.total { border-top: 1px solid var(--line); margin-top: 0.4rem; padding-top: 0.7rem; font-weight: 700; }
.summary__row .free { color: var(--sage-deep); font-weight: 700; }

.flow-actions { display: flex; gap: 0.8rem; margin-top: 0.4rem; }
.flow-actions .btn--ghost { flex: none; }
.flow-actions .btn--primary, .flow-actions .btn--brass { flex: 1; }

.back-home { display:inline-flex; gap:0.4rem; font-size:0.85rem; color:var(--sage-deep); text-decoration:none; margin-top:1.6rem; }

/* Approval / confirmation */
.approved { text-align: center; }
.approved__mark {
  width: 76px; height: 76px; margin: 0 auto 1.4rem;
  border-radius: 50%;
  background: var(--mint-deep); color: #fff;
  display: grid; place-items: center;
  animation: pop 0.5s cubic-bezier(.2,.9,.3,1.4);
}
@keyframes pop { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.approved h1 { margin-bottom: 0.8rem; }
.approved .msg {
  background: var(--cream);
  border: 1px solid var(--line);
  border-left: 4px solid var(--mint);
  border-radius: 12px;
  padding: 1.2rem 1.3rem;
  text-align: left;
  color: var(--ink-soft);
  font-size: 0.96rem;
  margin: 1.2rem 0 1.6rem;
}
.approved .nocharge { font-weight: 700; color: var(--ink); }

.hidden { display: none !important; }

/* ---------- Intro: Credit Account card + How it works ---------- */
.acct-card {
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 1.4rem;
  margin: 1.6rem 0 2rem;
  background: var(--surface);
}
.acct-card__head { margin-bottom: 1.1rem; }
.acct-card__title { display: block; font-family: var(--display); font-weight: 700; font-size: 1.3rem; }
.acct-card__plan { color: var(--ink-soft); font-size: 0.92rem; }
.acct-card__perks { text-align: center; color: var(--ink-soft); font-size: 0.84rem; margin: 0.9rem 0 0; }

.hiw-title { font-size: 1.4rem; margin-bottom: 0.2rem; }
.hiw-sub { color: var(--ink-soft); margin: 0 0 1.3rem; }
.hiw { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.3rem; }
.hiw li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.9rem; align-items: start; }
.hiw__no {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--line-strong); color: var(--ink);
  display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 0.9rem;
}
.hiw li strong { display: block; font-size: 1.02rem; }
.hiw li p { margin: 0.2rem 0 0; font-size: 0.88rem; color: var(--ink-soft); }
.hiw__tag {
  align-self: center; white-space: nowrap;
  background: var(--mint-soft); color: var(--mint-deep);
  font-size: 0.78rem; font-weight: 700; padding: 0.3rem 0.6rem; border-radius: 8px;
}
@media (max-width: 420px) { .hiw__tag { display: none; } }

/* ---------- Password requirement checklist ---------- */
.pw-rules { list-style: none; margin: 0.7rem 0 0; padding: 0; display: grid; gap: 0.4rem; }
.pw-rules li { display: flex; align-items: center; gap: 0.55rem; font-size: 0.84rem; color: var(--ink-soft); }
.pw-dot {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--line-strong); position: relative; transition: all 0.2s ease;
}
.pw-rules li.ok { color: var(--mint-deep); }
.pw-rules li.ok .pw-dot { background: var(--mint-deep); border-color: var(--mint-deep); }
.pw-rules li.ok .pw-dot::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ---------- Plan picker ---------- */
.plan-pick { display: grid; gap: 0.9rem; margin-bottom: 1.4rem; }
.plan-opt {
  position: relative;
  display: grid; grid-template-columns: 1fr auto; gap: 0.8rem; align-items: start;
  padding: 1.2rem 1.25rem;
  border: 1.5px solid var(--line); border-radius: 16px; background: var(--cream);
  cursor: pointer; transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.plan-opt:hover { transform: translateY(-2px); }
.plan-opt.sel { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(91,61,245,0.16); }
.plan-opt__name { font-family: var(--display); font-weight: 700; font-size: 1.25rem; }
.plan-opt__line { color: var(--violet-deep); font-weight: 600; font-size: 0.86rem; margin-top: 0.15rem; }
.plan-opt__feats { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.25rem; }
.plan-opt__feats li { font-size: 0.84rem; color: var(--ink-soft); padding-left: 1.1rem; position: relative; }
.plan-opt__feats li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--mint);
}
.plan-opt__price { font-family: var(--display); font-size: 1.7rem; text-align: right; white-space: nowrap; }
.plan-opt__price small { font-family: var(--body); font-size: 0.8rem; color: var(--ink-soft); }
.plan-opt__badge {
  position: absolute; top: -10px; left: 1.25rem;
  background: var(--ink); color: var(--mint);
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.25rem 0.6rem; border-radius: 999px;
}

/* ---------- Payment step ---------- */
.pay-summary {
  border: 1px solid var(--line); border-radius: 16px; background: var(--cream);
  padding: 1.2rem; margin-bottom: 1.3rem;
}
.pay-summary__plan { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); margin-bottom: 0.7rem; }
.pay-summary__name { font-family: var(--display); font-weight: 700; font-size: 1.3rem; }
.pay-summary__sub { color: var(--ink-soft); font-size: 0.85rem; }
.pay-summary__price { font-family: var(--display); font-size: 1.7rem; }
.pay-summary__price small { font-family: var(--body); font-size: 0.82rem; color: var(--ink-soft); }
.pay-summary__rows .summary__row { padding: 0.3rem 0; }

.autopay {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem;
  margin-bottom: 1rem; background: var(--cream); cursor: pointer;
}
.autopay strong { display: block; font-size: 0.98rem; }
.autopay span { font-size: 0.83rem; color: var(--ink-soft); }
.switch { position: relative; flex: none; width: 46px; height: 27px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i {
  position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong);
  transition: background 0.2s ease;
}
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px;
  border-radius: 50%; background: #fff; transition: transform 0.2s ease; box-shadow: var(--shadow-sm);
}
.switch input:checked + i { background: var(--mint-deep); }
.switch input:checked + i::after { transform: translateX(19px); }

.agree { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.4rem; cursor: pointer; }
.agree input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--violet); }

.pay-note { font-size: 0.8rem; color: var(--ink-soft); margin: 0.9rem 0 0; line-height: 1.6; }
.pay-note code { background: var(--violet-soft); color: var(--violet-deep); padding: 0.1rem 0.35rem; border-radius: 6px; font-size: 0.82em; }

.after-pay {
  margin-top: 1.4rem; padding: 1.2rem; border-radius: 14px;
  background: var(--mint-soft); border: 1px solid rgba(5,176,125,0.25);
}
.after-pay__head { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--mint-deep); margin-bottom: 0.4rem; }
.after-pay p { margin: 0 0 0.9rem; font-size: 0.88rem; color: var(--ink-soft); }

/* ---------- Active confirmation ---------- */
.active-card {
  text-align: left; border: 1px solid var(--line); border-radius: 14px;
  background: var(--cream); padding: 1.1rem 1.2rem; margin-top: 0.4rem;
}
.active-card__row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; font-size: 0.92rem; }
.active-card__row + .active-card__row { border-top: 1px solid var(--line); }
.active-card__row b { text-align: right; }

@media (max-width: 860px) {
  .flow-shell { grid-template-columns: 1fr; }
  .flow-aside { display: none; }
}
