/* ========================================================================
   Login & Onboarding — parent + student
   Centered split card on the botanical backdrop. Reads theme + depth tokens.
   ======================================================================== */

.ob-root {
  position: relative; z-index: 1;
  min-height: 100vh; width: 100%;
  display: grid; place-items: center;
  padding: 40px 24px;
}

/* ---- Floating light/dark toggle ---- */
.ob-theme-toggle {
  position: fixed; top: 22px; right: 22px; z-index: 50;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: var(--forest);
  background: var(--glass-bg);
  border: 1px solid var(--glass-br);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: var(--inset-sheen), var(--el-2);
  transition: transform .16s ease, box-shadow .16s ease, color .16s ease;
}
.ob-theme-toggle:hover { transform: translateY(-1px) rotate(-12deg); box-shadow: var(--inset-sheen), var(--el-3); color: var(--sage); }
.ob-theme-toggle:active { transform: translateY(0) scale(0.96); }
@media (max-width: 560px) { .ob-theme-toggle { top: 14px; right: 14px; } }

/* ---- The card shell ---- */
.ob-card {
  position: relative;
  width: min(1040px, 100%);
  min-height: 640px;
  display: grid; grid-template-columns: 380px 1fr;
  background: var(--surf);
  border: 1px solid var(--glass-br);
  border-radius: calc(var(--r-lg) + 6px);
  box-shadow: var(--inset-sheen), var(--el-4);
  overflow: hidden;
}
@media (max-width: 840px) {
  .ob-card { grid-template-columns: 1fr; min-height: 0; }
  .ob-rail { display: none; }
}

/* ---- Left brand rail ---- */
.ob-rail {
  position: relative;
  padding: 34px 32px;
  color: #EAF0D8;
  background:
    radial-gradient(120% 80% at 12% 8%, rgba(155,160,106,0.55) 0%, transparent 55%),
    radial-gradient(130% 90% at 100% 100%, rgba(60,100,143,0.42) 0%, transparent 58%),
    linear-gradient(158deg, #1C3D12 0%, #143109 60%, #0E2407 100%);
  background-color: #143109;
  display: flex; flex-direction: column;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.06);
  overflow: hidden;
}
.ob-rail::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: screen; opacity: 0.5;
}
.ob-rail > * { position: relative; z-index: 1; }

.ob-brand { display: flex; align-items: center; gap: 11px; }
.ob-brand .mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: #EAF0D8;
  background: linear-gradient(160deg, rgba(255,255,255,0.18), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 6px 14px -6px rgba(0,0,0,0.5);
}
.ob-brand .wd { font-family: var(--fh); font-size: 1.12rem; line-height: 1; color: #F3F6E8; }
.ob-brand .wd small { display: block; font-family: var(--fb); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: #AFC089; margin-top: 4px; }

/* Rail headline (login mode) */
.ob-rail-lead { margin-top: 38px; }
.ob-rail-lead h2 { font-family: var(--fh); color: #F6F8EE; font-size: 1.82rem; line-height: 1.12; }
.ob-rail-lead p { font-family: var(--fp); color: #CAD6AE; font-size: 0.96rem; line-height: 1.6; margin-top: 12px; max-width: 30ch; }

.ob-values { margin-top: auto; display: flex; flex-direction: column; gap: 14px; padding-top: 28px; }
.ob-value { display: flex; gap: 12px; align-items: flex-start; }
.ob-value .vi {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; color: #DCE7BE;
  background: linear-gradient(160deg, rgba(255,255,255,0.16), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.14);
}
.ob-value .vt { font-family: var(--fp); font-weight: 600; color: #EFF3E2; font-size: 0.92rem; }
.ob-value .vs { font-family: var(--fb); color: #B9C79A; font-size: 0.78rem; margin-top: 2px; line-height: 1.45; }

/* Rail vertical stepper (signup mode) */
.ob-steps { margin-top: 40px; display: flex; flex-direction: column; gap: 2px; }
.ob-step { display: flex; gap: 13px; align-items: flex-start; padding: 4px 0; }
.ob-step .dot {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-family: var(--fb); font-size: 0.8rem;
  color: #AFC089; background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.18); transition: all .25s ease;
}
.ob-step .sl {
  position: relative; padding-top: 4px; white-space: nowrap;
  font-family: var(--fp); font-size: 0.9rem; color: #9FB07E; transition: color .25s ease;
}
.ob-step.done .dot { background: linear-gradient(160deg, #B9C683, #8E9A57); color: #143109; border-color: transparent; box-shadow: 0 4px 10px -4px rgba(0,0,0,0.5); }
.ob-step.active .dot { background: #F3F6E8; color: #143109; border-color: #F3F6E8; box-shadow: 0 0 0 4px rgba(243,246,232,0.18); }
.ob-step.done .sl, .ob-step.active .sl { color: #F1F5E5; font-weight: 600; }
/* connector line */
.ob-step + .ob-step { position: relative; }
.ob-step + .ob-step::before {
  content: ""; position: absolute; left: 13.5px; top: -10px; height: 12px; width: 1.5px;
  background: rgba(255,255,255,0.16);
}
.ob-step.done + .ob-step::before { background: rgba(185,198,131,0.7); }

.ob-rail-foot { margin-top: 26px; font-family: var(--fb); font-size: 0.76rem; color: #9FB07E; }

/* ---- Right content panel ---- */
.ob-panel {
  position: relative;
  padding: 40px 46px 36px;
  display: flex; flex-direction: column;
  min-width: 0;
}
@media (max-width: 560px) { .ob-panel { padding: 30px 24px 26px; } }

.ob-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; min-height: 30px; }
.ob-back {
  font-family: var(--fp); font-weight: 600; font-size: 0.86rem; color: var(--slate);
  background: 0; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 8px; border-radius: var(--r-sm); margin-left: -8px; transition: all .15s;
}
.ob-back:hover { background: var(--sage-m); color: var(--forest); }
.ob-progress-txt { font-family: var(--fb); font-size: 0.76rem; color: var(--muted); letter-spacing: 0.02em; }

.ob-head { margin: 14px 0 22px; }
.ob-head .eyebrow {
  font-family: var(--fb); color: var(--sage); letter-spacing: 0.14em;
  text-transform: uppercase; font-size: 0.7rem;
}
.ob-head h1 { font-family: var(--fh); color: var(--forest); font-size: 1.74rem; line-height: 1.08; margin-top: 6px; }
.ob-head p { font-family: var(--fp); color: var(--muted); font-size: 0.95rem; margin-top: 8px; line-height: 1.55; max-width: 46ch; }

.ob-body { flex: 1; min-height: 0; }

/* ---- Form fields ---- */
.ob-field { margin-bottom: 16px; }
.ob-field > label {
  display: block; font-family: var(--fp); font-weight: 600; font-size: 0.84rem;
  color: var(--ink-2); margin-bottom: 6px;
}
.ob-field .hint { font-family: var(--fb); font-size: 0.74rem; color: var(--muted); margin-top: 6px; }
.ob-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .ob-grid-2 { grid-template-columns: 1fr; } }

.ob-inputwrap { position: relative; display: flex; align-items: center; }
.ob-inputwrap .lead-ic { position: absolute; left: 13px; color: var(--sage); pointer-events: none; display: grid; }
.ob-inputwrap .input { padding-left: 40px; }
.ob-inputwrap .toggle {
  position: absolute; right: 8px; background: 0; border: 0; cursor: pointer;
  color: var(--muted); padding: 6px; border-radius: 8px; display: grid;
}
.ob-inputwrap .toggle:hover { color: var(--forest); background: var(--sage-m); }

/* ---- SSO + divider ---- */
.ob-sso { display: flex; flex-direction: column; gap: 10px; }
.ob-sso-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap;
  font-family: var(--fp); font-weight: 600; font-size: 0.94rem; color: var(--ink);
  background: var(--surf-raised); border: 1.5px solid var(--sage-l);
  border-radius: var(--r-md); padding: 12px 16px; cursor: pointer;
  box-shadow: var(--inset-sheen), var(--el-1); transition: all .16s ease;
}
.ob-sso-btn:hover { border-color: var(--sage); box-shadow: var(--inset-sheen), var(--el-2); transform: translateY(-1px); }
.ob-sso-btn .g { width: 18px; height: 18px; }
.ob-divider { display: flex; align-items: center; gap: 14px; margin: 20px 0; }
.ob-divider::before, .ob-divider::after { content: ""; height: 1px; flex: 1; background: var(--line-2); }
.ob-divider span { font-family: var(--fb); font-size: 0.76rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

/* ---- Role picker ---- */
.ob-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .ob-roles { grid-template-columns: 1fr; } }
.ob-role {
  position: relative; text-align: left; cursor: pointer;
  background: var(--surf); border: 1.5px solid var(--sage-l);
  border-radius: var(--r-lg); padding: 22px 20px;
  box-shadow: var(--inset-sheen), var(--el-1);
  transition: all .18s ease; display: flex; flex-direction: column; gap: 12px;
}
.ob-role:hover { transform: translateY(-3px); border-color: var(--sage); box-shadow: var(--inset-sheen), var(--el-3); }
.ob-role.sel { border-color: var(--forest); box-shadow: var(--inset-sheen), var(--el-3), inset 0 0 0 1px var(--forest); }
.ob-role .ri {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(158deg, var(--sage), color-mix(in oklab, var(--sage) 60%, var(--forest)));
  box-shadow: 0 8px 18px -8px rgba(20,49,9,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.ob-role.parent .ri { background: linear-gradient(158deg, var(--slate), var(--forest)); }
.ob-role .rt { font-family: var(--fh); font-size: 1.22rem; color: var(--forest); }
.ob-role .rs { font-family: var(--fp); font-size: 0.86rem; color: var(--muted); line-height: 1.5; }
.ob-role .rcheck {
  position: absolute; top: 16px; right: 16px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: var(--forest);
  opacity: 0; transform: scale(0.6); transition: all .2s ease;
}
.ob-role.sel .rcheck { opacity: 1; transform: scale(1); }

/* ---- Chip selectors (subjects, goals, days, heard) ---- */
.ob-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.ob-chip {
  font-family: var(--fp); font-weight: 600; font-size: 0.88rem; color: var(--ink-2);
  background: var(--surf-raised); border: 1.5px solid var(--sage-l);
  border-radius: var(--r-pill); padding: 9px 16px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  box-shadow: var(--el-1); transition: all .15s ease;
}
.ob-chip:hover { border-color: var(--sage); transform: translateY(-1px); }
.ob-chip.sel {
  color: #fff; border-color: transparent;
  background: linear-gradient(180deg, color-mix(in oklab, var(--sage) 90%, #fff), color-mix(in oklab, var(--sage) 78%, var(--forest)));
  box-shadow: var(--inset-sheen), 0 5px 13px -4px rgba(20,49,9,0.32);
}
.ob-chip .ck { width: 15px; height: 15px; display: grid; }

/* time-of-day grid */
.ob-tod { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.ob-tod-cell {
  text-align: center; cursor: pointer; padding: 16px 10px; border-radius: var(--r-md);
  background: var(--surf-raised); border: 1.5px solid var(--sage-l); box-shadow: var(--el-1);
  transition: all .15s ease;
}
.ob-tod-cell:hover { border-color: var(--sage); transform: translateY(-1px); }
.ob-tod-cell.sel { border-color: var(--forest); background: var(--sage-m); box-shadow: var(--inset-sheen), var(--el-2); }
.ob-tod-cell .ti { color: var(--sage); margin-bottom: 6px; display: grid; place-items: center; }
.ob-tod-cell.sel .ti { color: var(--forest); }
.ob-tod-cell .tl { font-family: var(--fp); font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.ob-tod-cell .tx { font-family: var(--fb); font-size: 0.72rem; color: var(--muted); margin-top: 2px; }

.ob-field-title { font-family: var(--fp); font-weight: 600; font-size: 0.84rem; color: var(--ink-2); margin: 0 0 10px; }
.ob-field-block + .ob-field-block { margin-top: 22px; }

/* segmented frequency */
.ob-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--surf-raised); border: 1.5px solid var(--sage-l); box-shadow: inset 0 1px 2px rgba(20,49,9,0.05); }
.ob-seg button { font-family: var(--fp); font-weight: 600; font-size: 0.85rem; color: var(--slate); border: 0; background: 0; padding: 8px 16px; border-radius: var(--r-pill); cursor: pointer; transition: all .15s; }
.ob-seg button.on { color: #fff; background: linear-gradient(180deg, color-mix(in oklab,var(--sage) 90%,#fff), color-mix(in oklab,var(--sage) 78%,var(--forest))); box-shadow: 0 4px 10px -3px rgba(20,49,9,0.3); }

/* ---- Footer / actions ---- */
.ob-foot { display: flex; align-items: center; gap: 14px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.ob-foot .grow { flex: 1; }
.ob-foot .btn { min-width: 120px; justify-content: center; white-space: nowrap; }
.ob-foot-note { font-family: var(--fp); font-size: 0.86rem; color: var(--muted); }
.ob-foot-note a, .ob-link { color: var(--sage); font-weight: 600; cursor: pointer; text-decoration: none; }
.ob-foot-note a:hover, .ob-link:hover { color: var(--forest); text-decoration: underline; }

.ob-checkrow { display: flex; align-items: flex-start; gap: 10px; margin-top: 6px; }
.ob-checkrow input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--sage); }
.ob-checkrow label { font-family: var(--fp); font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

/* ---- Confirmation ---- */
.ob-done { text-align: center; padding: 10px 0 0; display: flex; flex-direction: column; align-items: center; }
.ob-done .seal {
  width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(120% 120% at 30% 20%, color-mix(in oklab, var(--sage) 70%, #fff) 0%, var(--sage) 45%, var(--forest) 100%);
  box-shadow: var(--inset-sheen), 0 16px 34px -12px rgba(20,49,9,0.5);
  margin-bottom: 22px; opacity: 1;
}
@media (prefers-reduced-motion: no-preference) {
  .ob-done .seal { animation: ob-pop .5s cubic-bezier(.2,.9,.3,1.2) both; }
}
@keyframes ob-pop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.ob-summary {
  width: 100%; margin: 24px 0 4px; text-align: left;
  background: var(--surf-raised); border: 1px solid var(--sage-l); border-radius: var(--r-md);
  box-shadow: var(--inset-sheen), var(--el-1); overflow: hidden;
}
.ob-summary .row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 18px; }
.ob-summary .row + .row { border-top: 1px solid var(--line); }
.ob-summary .k { font-family: var(--fb); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.ob-summary .v { font-family: var(--fp); font-weight: 600; font-size: 0.92rem; color: var(--forest); text-align: right; }

/* informational note (e.g. self-paced — no schedule) */
.ob-note {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--blue-bg); border: 1px solid color-mix(in oklab, var(--blue) 22%, transparent);
  border-radius: var(--r-md); padding: 16px 18px; margin-top: 4px;
  font-family: var(--fp); font-size: 0.92rem; color: var(--ink-2); line-height: 1.55;
}
.ob-note b { color: var(--forest); }
.ob-note .ob-note-ic {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; background: var(--blue);
  box-shadow: 0 2px 6px -1px color-mix(in oklab, var(--blue) 50%, transparent);
}

/* step transition — base state is VISIBLE; animation is enhancement only */
.ob-anim { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .ob-anim { animation: ob-slide .35s ease; }
}
@keyframes ob-slide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
