/* ============ STUDLIN ONBOARDING — Remote-style ============ */
:root {
  --ink: #0E1F18;
  --forest: #14342A;
  --forest-deep: #0B201A;
  --forest-mid: #1B4536;
  --cream: #F6F1E6;
  --paper: #FBF7EE;
  --lime: #9EC83D;
  --lime-dk: #7FA82A;
  --lime-soft: #C5DD7F;
  --line: rgba(14,31,24,0.10);
  --line-strong: rgba(14,31,24,0.18);
  --line-dark: rgba(246,241,230,0.12);
  --muted: rgba(14,31,24,0.55);
  --muted-2: rgba(14,31,24,0.40);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01","cv11";
  overflow: hidden;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ============ SHELL ============ */
.shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 450px 1fr;
  overflow: hidden;
}

/* ============ LEFT PANEL — forest ============ */
.rail {
  background: var(--forest);
  color: var(--cream);
  padding: 48px 56px;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
}
.rail::after {
  content: "";
  position: absolute;
  left: -10%;
  bottom: -22%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 30% 30%,
      rgba(158,200,61,0.0) 0,
      rgba(158,200,61,0.0) 22px,
      rgba(158,200,61,0.18) 23px,
      rgba(158,200,61,0.18) 24px);
  filter: blur(0.2px);
  opacity: 0.45;
  pointer-events: none;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 56px;
  position: relative; z-index: 1;
}
.brand img {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 8px;
}
.brand .name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--cream);
}

.rail-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(246,241,230,0.10);
  border: 1px solid rgba(246,241,230,0.16);
  display: grid; place-items: center;
  margin-bottom: 22px;
  position: relative; z-index: 1;
}
.rail-icon svg { color: var(--lime); }

.rail h1 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 16px;
  color: var(--cream);
  position: relative; z-index: 1;
}
.rail p.lead {
  font-size: 15.5px;
  color: rgba(246,241,230,0.7);
  line-height: 1.55;
  max-width: 380px;
  margin: 0 0 40px;
  position: relative; z-index: 1;
}

/* Feature tiles in left panel (signup screen) */
.rail-tiles {
  display: flex; flex-direction: column; gap: 14px;
  position: relative; z-index: 1;
  max-width: 360px;
}
.rail-tile {
  background: rgba(246,241,230,0.05);
  border: 1px solid rgba(246,241,230,0.10);
  border-radius: 14px;
  padding: 16px 18px;
}
.rail-tile .ic {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(246,241,230,0.08);
  display: grid; place-items: center;
  color: var(--lime);
  margin-bottom: 10px;
}
.rail-tile .t {
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}
.rail-tile .s {
  font-size: 12.5px;
  color: rgba(246,241,230,0.6);
}

/* Stepper for later steps */
.stepper {
  display: flex; flex-direction: column; gap: 4px;
  position: relative; z-index: 1;
  margin-bottom: 36px;
}
.step {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 0;
  position: relative;
}
.step .dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(246,241,230,0.20);
  color: rgba(246,241,230,0.45);
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  flex: none;
  transition: all .25s cubic-bezier(.2,.85,.3,1);
}
.step.is-current .dot {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--forest);
}
.step.is-done .dot {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}
.step .name {
  font-size: 14.5px;
  font-weight: 500;
  color: rgba(246,241,230,0.45);
  letter-spacing: -0.01em;
  transition: color .2s;
}
.step.is-current .name { color: var(--cream); font-weight: 600; }
.step.is-done .name { color: rgba(246,241,230,0.78); }
.step + .step::before {
  content: "";
  position: absolute;
  left: 13px;
  top: -6px;
  width: 1.5px;
  height: 14px;
  background: rgba(246,241,230,0.14);
}

.rail-meta {
  margin-top: auto;
  padding-top: 28px;
  font-size: 13px;
  color: rgba(246,241,230,0.6);
  position: relative; z-index: 1;
}
.rail-meta .row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
}
.rail-meta a { color: rgba(246,241,230,0.85); cursor: pointer; }
.rail-meta a:hover { color: var(--cream); }

/* ============ RIGHT PANEL — form ============ */
.stage {
  background: var(--paper);
  overflow-y: auto;
  position: relative;
  display: flex; flex-direction: column;
}
.stage::-webkit-scrollbar { display: none; }
.stage { scrollbar-width: none; }

.stage-top {
  padding: 26px 48px;
  display: flex; justify-content: flex-end;
  font-size: 13.5px;
  color: var(--muted);
}
.stage-top a {
  color: var(--lime-dk);
  font-weight: 600;
  margin-left: 6px;
}
.stage-top a:hover { text-decoration: underline; }

.frame {
  flex: 1;
  display: flex; flex-direction: column;
  padding: 0 48px 36px;
  max-width: 620px;
  margin: 0 auto;
  width: 100%;
  opacity: 1; transform: none;
}
@keyframes stepIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.frame-head {
  text-align: center;
  margin-top: 16px;
  margin-bottom: 32px;
}
.frame-head h2 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
  color: var(--ink);
}
.frame-head h2 em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  color: var(--lime-dk);
  font-weight: 400;
}
.frame-head p {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ============ PROVIDER BUTTONS ============ */
.providers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.provider {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 13px 16px;
  background: white;
  color: var(--ink);
  border-radius: 14px;
  border: 1.5px solid var(--line);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  transition: all .15s;
}
.provider:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.provider.dark { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.provider.dark:hover { background: #1a2e26; }

/* ============ SIGNUP TRUST BLOCK ============ */
.signup-trust { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.trust-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink); background: var(--lime-soft, rgba(120,170,60,0.10)); border: 1px solid var(--line); border-radius: 99px; padding: 7px 13px; }
.tchip svg { width: 13px; height: 13px; color: var(--lime-dk); }
.signup-quote { position: relative; background: var(--ink); color: var(--cream); border-radius: 18px; padding: 24px 24px 20px; overflow: hidden; }
.signup-quote .sq-mark { position: absolute; top: 4px; right: 18px; font-family: 'Instrument Serif', serif; font-size: 92px; line-height: 1; color: var(--lime); opacity: 0.18; pointer-events: none; }
.signup-quote p { margin: 0 0 16px; font-size: 16px; line-height: 1.5; letter-spacing: -0.01em; position: relative; z-index: 1; }
.sq-by { display: flex; align-items: center; gap: 12px; }
.sq-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 15px; color: var(--ink); background: var(--lime); }
.sq-meta { display: flex; flex-direction: column; line-height: 1.3; }
.sq-meta strong { font-size: 14px; font-weight: 600; }
.sq-meta span { font-size: 12.5px; color: rgba(244,239,227,0.6); }
.trust-foot { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; color: var(--muted); }
.trust-foot strong { color: var(--ink); font-weight: 600; }
.tf-avatars { display: flex; }
.tf-avatars span { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--paper); margin-left: -8px; }
.tf-avatars span:first-child { margin-left: 0; }
.tf-avatars span:nth-child(1) { background: #8FB14A; }
.tf-avatars span:nth-child(2) { background: #C9A24B; }
.tf-avatars span:nth-child(3) { background: #5B8C7E; }
.tf-avatars span:nth-child(4) { background: #A4724B; }

.divider {
  display: flex; align-items: center; gap: 14px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 22px 0;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ============ INPUT — floating-label style ============ */
.field { margin-bottom: 14px; position: relative; }
.input-wrap {
  position: relative;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  background: white;
  transition: all .15s;
}
.input-wrap.has-error { border-color: #C4544A; background: #FCF1EF; }
.input-wrap.is-focused { border-color: var(--ink); }
.input-wrap label {
  position: absolute;
  top: 14px;
  left: 18px;
  font-size: 15px;
  color: var(--muted);
  pointer-events: none;
  transition: all .15s cubic-bezier(.2,.85,.3,1);
  background: transparent;
  padding: 0 4px;
}
.input-wrap.has-value label,
.input-wrap.is-focused label {
  top: -7px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: white;
}
.input-wrap.has-error label { color: #C4544A; }
.input-wrap.has-error.has-value label,
.input-wrap.has-error.is-focused label { background: #FCF1EF; }
.input-wrap input,
.input-wrap select {
  width: 100%;
  padding: 14px 18px;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  font-family: inherit;
  border-radius: 14px;
}
.input-wrap .pwd-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: none;
}
.input-wrap .pwd-toggle:hover { color: var(--ink); background: var(--paper); }
.input-wrap select { appearance: none; padding-right: 44px; cursor: pointer; }
.input-wrap .chev {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.field-hint {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
  padding-left: 4px;
}
.field-hint strong { color: var(--ink); font-weight: 600; }
.field-error {
  font-size: 12.5px;
  color: #C4544A;
  margin-top: 6px;
  padding-left: 4px;
}
.field-error strong { font-weight: 700; }

/* School autocomplete -- StepProfile's school field, same shared
   cross-user directory + "did you mean" duplicate check the main app's
   own Settings SchoolSelect uses (see studlin-app.jsx), a lean copy of it
   since onboarding is a separate, unbundled entry point. */
.school-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  background: white;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 28px -12px rgba(14,31,24,0.25);
}
.school-dropdown-item {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.school-dropdown-item:last-child { border-bottom: none; }
.school-dropdown-item:hover, .school-dropdown-empty:hover { background: var(--paper); }
.school-dropdown-empty {
  padding: 10px 16px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
}
.school-suggest {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid #9EC83D66;
  background: #9EC83D14;
  font-size: 12.5px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.school-suggest button {
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.school-suggest .use-btn { background: #9EC83D; color: #14342A; border: none; }
.school-suggest .keep-btn { background: transparent; color: var(--muted); border: 1px solid var(--line-strong); font-weight: 500; }

/* Password checklist */
.pw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  margin-top: 14px;
  padding: 0 4px;
}
.pw-grid .pwi {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.pw-grid .pwi .d {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted-2);
  flex: none;
  transition: all .2s;
}
.pw-grid .pwi.ok { color: var(--lime-dk); }
.pw-grid .pwi.ok .d { background: var(--lime-dk); transform: scale(1.4); }
.pw-grid .pwi.ok .ck { color: var(--lime-dk); display: inline-flex; }
.pw-grid .pwi .ck { display: none; }

/* ============ OPTION CARDS (later steps) ============ */
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.opt-grid.full { grid-template-columns: 1fr; }
.opt {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: all .2s cubic-bezier(.2,.85,.3,1);
  text-align: left;
  color: var(--ink);
  font-family: inherit;
  width: 100%;
}
.opt:hover { border-color: var(--line-strong); }
.opt.is-selected {
  background: rgba(158,200,61,0.10);
  border-color: var(--lime-dk);
}
.opt .ic {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--paper);
  display: grid; place-items: center;
  color: var(--forest);
  flex: none;
  border: 1px solid var(--line);
}
.opt.is-selected .ic {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--lime);
}
.opt .body { flex: 1; min-width: 0; }
.opt .body .lbl { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.opt .body .desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.opt .check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid; place-items: center;
  flex: none;
  color: transparent;
  transition: all .2s;
}
.opt.is-selected .check {
  border-color: var(--lime-dk);
  background: var(--lime-dk);
  color: white;
}

/* Plans */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.plan {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  position: relative;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--ink);
  transition: all .2s;
}
.plan:hover { border-color: var(--line-strong); }
.plan.is-selected { border-color: var(--lime-dk); background: rgba(158,200,61,0.06); }
.plan-tag {
  position: absolute; top: -10px; left: 18px;
  background: var(--lime); color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 99px;
}
.plan-tag.dark { background: var(--ink); color: var(--lime); }
.bill-toggle { display: flex; gap: 4px; background: var(--card2, #f0ece0); border: 1px solid var(--line); padding: 4px; border-radius: 99px; width: fit-content; margin: 0 auto 22px; }
.bill-toggle button { border: none; background: transparent; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--muted); padding: 8px 18px; border-radius: 99px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: all .2s; }
.bill-toggle button.on { background: var(--ink); color: #fff; }
.bill-toggle .save { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; font-weight: 700; background: var(--lime); color: var(--ink); padding: 2px 6px; border-radius: 99px; letter-spacing: 0.04em; }
.paywall-foot { margin-top: 12px; text-align: center; }
.paywall-mode { grid-template-columns: 1fr; }
.paywall-stage { max-width: 880px; margin: 0 auto; }
.paywall-stage .stage-top { justify-content: center; }
.paywall-mode .frame { max-width: 820px; margin: 0 auto; }
.paywall-mode .frame-head h2 { font-size: 38px; }
.paywall-mode .plans { gap: 16px; }
.paywall-mode .plan { padding: 28px; }
.paywall-mode .plan h3 { font-size: 26px; }
.paywall-mode .plan .pp strong { font-size: 36px; }
.pw-compare { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.pw-compare s { opacity: 0.6; }
.pw-compare strong { color: var(--ink); }
.pw-skip { background: none; border: none; font-family: inherit; font-size: 13px; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; transition: color .2s; }
.pw-skip:hover { color: var(--ink); }
.plan h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}
.plan .pp {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}
.plan .pp strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.plan li {
  display: flex; gap: 9px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}
.plan li .ck {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--lime); color: var(--ink);
  display: grid; place-items: center;
  flex: none;
  margin-top: 1px;
}

/* Preview tiles */
.preview {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 24px;
}
.preview-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.preview-tile { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.preview-tile.lime { background: var(--lime); border-color: var(--lime); }
.preview-tile .pt-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.preview-tile.lime .pt-label { color: rgba(14,31,24,0.55); }
.preview-tile .pt-value {
  font-family: 'Caveat', cursive;
  font-size: 28px;
  font-weight: 700;
  line-height: 0.9;
  color: var(--ink);
}
.preview-tile .pt-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Checkbox */
.checkbox {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 4px 4px;
  cursor: pointer;
  margin-bottom: 10px;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.55;
}
.checkbox .box {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--line-strong);
  display: grid; place-items: center;
  flex: none;
  color: transparent;
  background: white;
  transition: all .15s;
  margin-top: 1px;
}
.checkbox.is-checked .box {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}
.checkbox a { color: var(--lime-dk); font-weight: 600; }
.checkbox a:hover { text-decoration: underline; }

/* ============ FOOTER + CTA ============ */
.stage-foot {
  margin-top: auto;
  padding: 32px 48px 28px;
  text-align: center;
}
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink);
  color: var(--cream);
  padding: 14px 36px;
  border-radius: 99px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: none;
  transition: all .15s;
  font-family: inherit;
  min-width: 220px;
  justify-content: center;
}
.cta:hover { background: var(--forest); transform: translateY(-1px); }
.cta:disabled { background: rgba(14,31,24,0.15); color: rgba(14,31,24,0.4); cursor: not-allowed; transform: none; }
.cta.lime { background: var(--lime); color: var(--ink); }
.cta.lime:hover { background: var(--lime-dk); }
.cta .arrow { transition: transform .2s; }
.cta:hover:not(:disabled) .arrow { transform: translateX(3px); }

.stage-links {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--muted);
}
.stage-links a {
  color: var(--lime-dk);
  font-weight: 600;
  margin: 0 4px;
}
.stage-links a:hover { text-decoration: underline; }

/* ============ FINAL STEP (welcome) ============ */
.celebrate {
  text-align: center;
  padding: 28px 0 16px;
}
.celebrate-glyph {
  width: 92px; height: 92px;
  border-radius: 22px;
  background: var(--ink);
  margin: 0 auto 22px;
  display: grid; place-items: center;
  box-shadow: 0 24px 60px -20px rgba(158,200,61,0.5);
  animation: bigPop .6s cubic-bezier(.2,.85,.3,1);
}
.celebrate-glyph img { width: 56px; height: 56px; border-radius: 12px; }
@keyframes bigPop {
  from { opacity: 0; transform: scale(0.5) rotate(-6deg); }
  to { opacity: 1; transform: none; }
}
.checklist {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 6px 18px;
  margin: 24px 0;
}
.cl-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.cl-item:last-child { border-bottom: none; }
.cl-item .box {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid; place-items: center;
  flex: none;
  color: transparent;
  transition: all .2s;
}
.cl-item.done .box {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}
.cl-item .text { flex: 1; font-size: 14.5px; color: var(--ink); font-weight: 500; }
.cl-item.done .text { opacity: 0.55; text-decoration: line-through; }
.cl-item .reward {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--lime-dk);
  font-weight: 700;
}

.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 999; }
.confetti i {
  position: absolute;
  width: 8px; height: 14px;
  border-radius: 2px;
  animation: fall 3s cubic-bezier(.2,.85,.3,1) forwards;
}
@keyframes fall {
  0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ============ STEP TRANSITIONS ============ */
.step-content {
  transition: opacity 0.3s cubic-bezier(.2,.8,.2,1), transform 0.3s cubic-bezier(.2,.8,.2,1);
}
.step-content.is-entering {
  opacity: 1; transform: none;
}
.step-content.is-leaving { opacity: 0; transform: translateY(12px); }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .stage-top, .frame, .stage-foot { padding-left: 24px; padding-right: 24px; }
  .opt-grid { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .frame-head h2 { font-size: 26px; }
}


/* ============ TUTORIAL THEATER (transition-driven) ============ */
.tut-veil { position: fixed; inset: 0; z-index: 60; background: rgba(10,20,16,0.55); backdrop-filter: blur(7px); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .25s ease; }
.tut-veil.on { opacity: 1; }
.tut-stage { width: min(560px, 92vw); background: var(--forest, #14342A); border: 1px solid rgba(246,241,230,0.10); border-radius: 24px; padding: 26px; box-shadow: 0 40px 90px -30px rgba(0,0,0,0.65); transform: translateY(28px) scale(.94); transition: transform .5s cubic-bezier(.2,.9,.25,1.18); }
.tut-veil.on .tut-stage { transform: none; }
.tut-cap { color: #F6F1E6; text-align: center; font-size: 15px; font-weight: 600; margin: 18px 0 4px; letter-spacing: -0.01em; }
.tut-bar { height: 4px; border-radius: 99px; background: rgba(246,241,230,0.12); overflow: hidden; margin: 14px 0 16px; }
.tut-bar i { display: block; height: 100%; width: 0; background: var(--lime); border-radius: 99px; transition: width 3.8s linear; }
.tut-veil.on .tut-bar i { width: 100%; }
.tut-skip { width: 100%; padding: 13px; border: none; border-radius: 12px; background: var(--lime); color: var(--ink, #0E1F18); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: transform .15s ease, filter .2s; }
.tut-skip:hover { filter: brightness(1.06); }

/* demo stage */
.demo { height: 240px; border-radius: 16px; background: rgba(246,241,230,0.05); border: 1px solid rgba(246,241,230,0.10); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }

/* dashboard demo */
.dm-window { width: 82%; background: #FBF7EE; border-radius: 14px; padding: 14px; opacity: 0; transform: translateY(18px); transition: opacity .5s ease .1s, transform .5s cubic-bezier(.2,.8,.2,1) .1s; }
.demo.on .dm-window { opacity: 1; transform: none; }
.dm-greet { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.dm-hi { font-size: 13px; font-weight: 700; color: #0E1F18; }
.dm-pill { font-family: 'JetBrains Mono', monospace; font-size: 9px; background: #0E1F18; color: #C8F53E; padding: 3px 8px; border-radius: 99px; font-weight: 700; }
.dm-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.dm-tile { background: #fff; border: 1px solid rgba(14,31,24,0.08); border-radius: 10px; padding: 10px; height: 84px; opacity: 0; transform: scale(.8) translateY(8px); transition: opacity .45s ease, transform .45s cubic-bezier(.2,.9,.3,1.3); }
.dm-tile.t1 { transition-delay: .35s; } .dm-tile.t2 { transition-delay: .55s; } .dm-tile.t3 { transition-delay: .75s; }
.demo.on .dm-tile { opacity: 1; transform: none; }
.dm-tlab { font-family: 'JetBrains Mono', monospace; font-size: 8px; letter-spacing: .1em; text-transform: uppercase; color: rgba(14,31,24,0.45); margin-bottom: 8px; }
.dm-big { font-size: 26px; font-weight: 800; color: #0E1F18; line-height: 1; }
.dm-spark { display: block; height: 34px; border-radius: 6px; background: #9EC83D; opacity: .85; transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(.2,.8,.2,1) .85s; }
.demo.on .dm-spark { transform: scaleX(1); }
.dm-bars { display: flex; align-items: flex-end; gap: 4px; height: 34px; }
.dm-bars b { flex: 1; background: #9EC83D; border-radius: 3px 3px 0 0; transform: scaleY(0); transform-origin: bottom; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.dm-bars b:nth-child(1) { height: 40%; transition-delay: .9s; }
.dm-bars b:nth-child(2) { height: 65%; transition-delay: 1.0s; }
.dm-bars b:nth-child(3) { height: 50%; transition-delay: 1.1s; }
.dm-bars b:nth-child(4) { height: 90%; transition-delay: 1.2s; }
.dm-bars b:nth-child(5) { height: 72%; transition-delay: 1.3s; }
.demo.on .dm-bars b { transform: scaleY(1); }

/* focus demo */
.dm-focus { position: relative; width: 160px; height: 160px; display: flex; align-items: center; justify-content: center; }
.dm-timer { width: 160px; height: 160px; transform: rotate(-90deg); }
.dm-timer .track { fill: none; stroke: rgba(246,241,230,0.12); stroke-width: 7; }
.dm-timer .prog { fill: none; stroke: #C8F53E; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 3.2s cubic-bezier(.3,.1,.3,1) .3s; }
.demo.on .dm-timer .prog { stroke-dashoffset: 82; }
.dm-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.dm-time { font-family: 'JetBrains Mono', monospace; font-size: 28px; font-weight: 700; color: #F6F1E6; }
.dm-lab { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .22em; color: #C8F53E; font-weight: 700; opacity: 0; transition: opacity .5s ease 1s; }
.demo.on .dm-lab { opacity: 1; }

/* flashcards demo */
.dm-doc { position: absolute; left: 40px; top: 50%; width: 74px; height: 92px; background: #FBF7EE; border-radius: 8px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; opacity: 0; transform: translateY(-50%) translateX(-40px); transition: opacity .55s ease .05s, transform .55s cubic-bezier(.2,.8,.2,1) .05s; }
.demo.on .dm-doc { opacity: 1; transform: translateY(-50%); }
.dm-doc span { font-family: 'JetBrains Mono', monospace; font-size: 8.5px; color: rgba(14,31,24,0.55); font-weight: 700; }
.dm-fan { position: absolute; right: 44px; top: 50%; width: 180px; height: 120px; transform: translateY(-50%); }
.dm-card { position: absolute; width: 150px; padding: 16px 14px; background: #fff; border-radius: 12px; font-size: 12px; font-weight: 600; color: #0E1F18; box-shadow: 0 14px 30px -14px rgba(0,0,0,0.45); opacity: 0; transform: translateX(-120px) scale(.7); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.9,.3,1.2); }
.dm-card.c1 { top: 0; transition-delay: 1.1s; }
.dm-card.c2 { top: 32px; transition-delay: 1.35s; }
.dm-card.c3 { top: 64px; transition-delay: 1.6s; }
.demo.on .dm-card.c1 { opacity: 1; transform: rotate(-8deg); }
.demo.on .dm-card.c2 { opacity: 1; transform: rotate(2deg); }
.demo.on .dm-card.c3 { opacity: 1; transform: rotate(9deg); }

/* tutor demo */
.dm-chat { width: 78%; display: flex; flex-direction: column; gap: 10px; }
.dm-bub { max-width: 85%; padding: 11px 14px; border-radius: 14px; font-size: 12.5px; line-height: 1.5; opacity: 0; transform: translateY(10px) scale(.9); transition: opacity .4s ease, transform .4s cubic-bezier(.2,.9,.3,1.2); }
.dm-bub.me { align-self: flex-end; background: #C8F53E; color: #0E1F18; font-weight: 600; border-bottom-right-radius: 4px; transition-delay: .2s; }
.dm-bub.ai { align-self: flex-start; background: rgba(246,241,230,0.10); color: #F6F1E6; border-bottom-left-radius: 4px; transition-delay: 1s; position: relative; }
.demo.on .dm-bub { opacity: 1; transform: none; }
.dm-dots { display: inline-flex; gap: 4px; opacity: 1; transition: opacity .25s ease 1.9s; }
.demo.on .dm-dots { opacity: 0; }
.dm-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(246,241,230,0.55); }
.dm-ans { display: block; opacity: 0; max-height: 0; overflow: hidden; transition: opacity .5s ease 2s, max-height .5s ease 2s; }
.demo.on .dm-ans { opacity: 1; max-height: 120px; }

/* streak demo */
.dm-streak { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.dm-flame { color: #C8F53E; opacity: 0; transform: scale(0) rotate(-14deg); transition: opacity .5s ease 1.8s, transform .7s cubic-bezier(.2,.9,.3,1.4) 1.8s; filter: drop-shadow(0 0 18px rgba(200,245,62,0.45)); }
.demo.on .dm-flame { opacity: 1; transform: none; }
.dm-days { display: flex; gap: 8px; }
.dm-day { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; color: rgba(246,241,230,0.4); background: rgba(246,241,230,0.08); transform: scale(.85); transition: all .35s cubic-bezier(.2,.9,.3,1.3); }
.demo.on .dm-day { background: #C8F53E; color: #0E1F18; transform: scale(1); }
.dm-dlab { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: rgba(246,241,230,0.55); opacity: 0; transition: opacity .5s ease 2.1s; }
.demo.on .dm-dlab { opacity: 1; }

/* confetti (transition-driven) */
.confetti2 { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 70; }
.confetti2 i { position: absolute; top: 0; width: 8px; height: 14px; border-radius: 2px; }

/* checklist additions */
.cl-item { position: relative; }
.cl-play { display: inline-flex; align-items: center; gap: 5px; font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--lime-dk, #7FA82A); border: 1px solid rgba(126,168,42,0.35); border-radius: 99px; padding: 4px 10px; margin-right: 10px; transition: all .2s; flex-shrink: 0; }
.cl-item:hover .cl-play { background: var(--lime); border-color: var(--lime); color: var(--ink, #0E1F18); }
.reward.pop { transform: translateY(-8px) scale(1.4); transition: transform .25s cubic-bezier(.2,.9,.3,1.4); }
.reward { transition: transform .4s ease; }
.xp-foot { margin-top: 22px; }
.xp-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.xp-row strong { font-family: 'JetBrains Mono', monospace; color: var(--ink, #0E1F18); }
.xp-track { height: 6px; background: rgba(14,31,24,0.08); border-radius: 99px; overflow: hidden; }
.xp-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--lime-dk, #7FA82A), var(--lime, #9EC83D)); border-radius: 99px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.bonus-banner { text-align: center; padding: 14px; border-radius: 12px; background: var(--lime); color: var(--ink, #0E1F18); font-weight: 800; font-size: 14px; letter-spacing: -0.01em; }


/* ============ 3D MOTION OVERHAUL ============ */
/* checklist: 3D cascade in, hover tilt, flip on complete */
.checklist { perspective: 1200px; transform-style: preserve-3d; }
.cl-item {
  animation: clIn3d .7s cubic-bezier(.2,.9,.25,1.15) both;
  transform-style: preserve-3d;
  transition: transform .35s cubic-bezier(.2,.9,.3,1.3), box-shadow .35s ease, background .25s ease, border-color .25s ease;
  will-change: transform;
}
@keyframes clIn3d {
  0% { opacity: 0; transform: rotateX(-42deg) translateY(34px) translateZ(-60px); filter: blur(5px); }
  60% { filter: blur(0); }
  100% { opacity: 1; transform: none; }
}
.cl-item:not(.done):hover {
  transform: translateZ(26px) rotateX(4deg) scale(1.012);
  box-shadow: 0 18px 40px -18px rgba(14,31,24,0.35);
  z-index: 2;
}
.cl-item.done { animation: clFlip3d .65s cubic-bezier(.2,.85,.3,1.2) both; }
@keyframes clFlip3d {
  0% { transform: rotateX(0); }
  38% { transform: rotateX(-24deg) translateZ(34px) scale(1.03); }
  72% { transform: rotateX(9deg) translateZ(10px); }
  100% { transform: none; }
}
.cl-item .box { transition: transform .3s cubic-bezier(.2,.9,.3,1.5), background .2s, color .2s; }
.cl-item.done .box { animation: boxPop .5s cubic-bezier(.2,.9,.3,1.6) both .1s; }
@keyframes boxPop { 0% { transform: scale(1) rotate(0); } 50% { transform: scale(1.5) rotate(14deg); } 100% { transform: scale(1); } }

/* glyph: floating 3D coin */
.celebrate { perspective: 900px; }
.celebrate-glyph {
  animation: glyphLand 1s cubic-bezier(.2,.85,.3,1.15) both, glyphFloat 4.5s ease-in-out 1.2s infinite;
  transform-style: preserve-3d;
  box-shadow: 0 24px 50px -18px rgba(126,168,42,0.55);
}
@keyframes glyphLand {
  0% { opacity: 0; transform: translateZ(220px) rotateY(140deg) rotateX(28deg) scale(.5); filter: blur(8px); }
  65% { filter: blur(0); }
  82% { transform: translateZ(-12px) rotateY(-9deg) scale(1.05); }
  100% { opacity: 1; transform: none; }
}
@keyframes glyphFloat {
  0%,100% { transform: translateY(0) rotateY(0) rotateX(0); }
  25% { transform: translateY(-7px) rotateY(7deg) rotateX(3deg); }
  60% { transform: translateY(3px) rotateY(-6deg) rotateX(-2deg); }
}

/* watch pill shimmer */
.cl-play { position: relative; overflow: hidden; }
.cl-play::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 36px; left: -48px;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.55), transparent);
  animation: pillSheen 2.8s ease-in-out infinite;
}
@keyframes pillSheen { 0%, 55% { left: -48px; } 85%, 100% { left: 120%; } }

/* tutorial theater: cinematic 3D entrance */
.tut-veil { perspective: 1300px; }
.tut-stage {
  transform: rotateX(22deg) translateY(70px) translateZ(-120px) scale(.86);
  transition: transform .65s cubic-bezier(.18,.9,.22,1.12), opacity .4s ease;
  opacity: 0;
  transform-style: preserve-3d;
  position: relative;
}
.tut-veil.on .tut-stage { transform: none; opacity: 1; }
/* spinning glow ring removed */
.demo { perspective: 800px; transform-style: preserve-3d; }
.demo > * { transform-style: preserve-3d; }

/* demo scenes get depth */
@keyframes dmRise {
  0% { opacity: 0; transform: rotateX(34deg) translateY(40px) translateZ(-80px); filter: blur(6px); }
  70% { filter: blur(0); }
  100% { opacity: 1; transform: rotateX(6deg); }
}
.dm-window { animation-fill-mode: both; box-shadow: 0 30px 60px -24px rgba(0,0,0,0.55); }
/* focus tilt removed */
@keyframes dmCard {
  0% { opacity: 0; transform: translateX(-130px) rotateY(70deg) translateZ(-70px) scale(.6); }
  100% { opacity: 1; transform: translateX(0) rotate(var(--r)) translateZ(0) scale(1); }
}
.dm-card { box-shadow: 0 22px 44px -16px rgba(0,0,0,0.55); }
.dm-flame { animation-name: dmFlame3d !important; }
@keyframes dmFlame3d {
  0% { opacity: 0; transform: scale(0) rotateY(220deg) translateZ(80px); }
  60% { transform: scale(1.2) rotateY(-16deg); }
  100% { opacity: 1; transform: scale(1) rotateY(0); }
}

/* bonus banner: 3D slam */
.bonus-banner { animation: slam3d .7s cubic-bezier(.2,.9,.3,1.25) both !important; transform-style: preserve-3d; }
@keyframes slam3d {
  0% { opacity: 0; transform: translateZ(180px) rotateX(-50deg) scale(1.25); filter: blur(6px); }
  60% { filter: blur(0); }
  78% { transform: translateZ(-8px) rotateX(6deg) scale(.985); }
  100% { opacity: 1; transform: none; }
}

/* xp pill pop: arcs up in 3D */
@keyframes xpPop {
  0% { transform: none; }
  35% { transform: translateY(-14px) translateZ(60px) rotateX(18deg) scale(1.6); }
  100% { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cl-item, .celebrate-glyph, .tut-stage, .dm-window, .dm-focus, .bonus-banner { animation: none !important; transition: opacity .2s ease !important; }
}
