/* =====================================================================
   Onboarding wizard — monochrome restyle to match demo / index landing.
   Inter font, black/white/gray palette, line-art accents.
   Layout / markup IDs / JS logic untouched.
   ===================================================================== */

:root {
  --ink:        #0a0a0a;
  --ink-2:      #525252;
  --ink-3:      #737373;
  --line:       #e5e5e5;
  --line-soft:  #f0f0f0;
  --bg:         #ffffff;
  --bg-soft:    #fafafa;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100vh; overflow: hidden; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex; flex-direction: column;
}
a { color: var(--ink); }

.ob-container {
  flex: 1 1 auto;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 28px 16px;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

/* ── Top bar ─────────────────────────────────────────── */
.ob-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.ob-brand {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.ob-brand-edition {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--ink-3);
  margin-left: 8px;
}
.ob-exit {
  font-size: 13px;
  color: var(--ink-3);
  text-decoration: none;
  transition: color .12s;
}
.ob-exit:hover { color: var(--ink); }

/* ── Stepper ─────────────────────────────────────────── */
.ob-stepper {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.ob-step-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  background: white;
  color: var(--ink-3);
  border: 1px solid var(--line);
  transition: background .15s, color .15s, border-color .15s;
}
.ob-step-dot.active,
.ob-step-dot.done {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.ob-step-bar {
  flex: 1;
  height: 2px;
  background: var(--line);
  border-radius: 6px;
  max-width: 40px;
}
.ob-step-bar.done { background: var(--ink); }
.ob-step-label {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ── Step container ─────────────────────────────────── */
.ob-step { display: none; }
.ob-step.active {
  display: flex; flex-direction: column;
  flex: 1 1 auto; min-height: 0;
  animation: ob-fade-in .2s ease-out;
}
@keyframes ob-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ob-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 26px;
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  overflow: auto;
  min-height: 0;
}
.ob-h1 {
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.018em;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
}
.ob-sub {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 16px;
}

/* ── Phase 5: 5-step journey preview on step 1 ── */
.ob-journey-preview {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 18px;
  background: var(--bg-soft);
}
.ob-jp-eyebrow {
  font-size: 11px; font-weight: 500;
  color: var(--ink-3); letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.ob-jp-rail {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: nowrap; overflow-x: auto;
}
.ob-jp-step {
  display: flex; align-items: center; gap: 6px;
  flex: 0 0 auto;
}
.ob-jp-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: white;
  border: 1.5px solid var(--ink-3);
  color: var(--ink-2);
  font-size: 11px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ob-jp-step.first .ob-jp-num {
  background: var(--ink); color: white; border-color: var(--ink);
}
.ob-jp-label {
  font-size: 12px; color: var(--ink); font-weight: 500;
  white-space: nowrap;
}
.ob-jp-arrow {
  color: var(--ink-3); font-size: 11px;
  flex-shrink: 0;
}
@media (max-width: 540px) {
  .ob-jp-label { display: none; }
  .ob-jp-arrow { display: none; }
  .ob-jp-rail { justify-content: space-between; gap: 0; }
  .ob-jp-step { gap: 0; }
}

/* ── Fields ─────────────────────────────────────────── */
.ob-field { margin-bottom: 14px; }
.ob-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.ob-field-help {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 6px;
  line-height: 1.45;
}
input.ob-input,
select.ob-input,
.ob-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14.5px;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--ink);
  transition: border-color .12s;
}
input.ob-input:focus,
select.ob-input:focus,
.ob-input:focus {
  outline: none;
  border-color: var(--ink);
}

/* ── Pills ──────────────────────────────────────────── */
.ob-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ob-pill {
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.ob-pill:hover {
  border-color: var(--ink);
  background: var(--bg-soft);
}
/* onboarding.js marks the chosen button with .selected (not .active); style
   both so the pick is always visible. */
.ob-pill.active,
.ob-pill.selected {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

/* ── Section cards (step 1) ─────────────────────────── */
.ob-sections-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 4px;
}
.ob-section-card {
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 18px;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: border-color .12s, background .12s, transform .12s;
}
.ob-section-card:hover {
  border-color: var(--ink);
  background: var(--bg-soft);
  transform: translateY(-1px);
}
/* onboarding.js marks the chosen card with .selected (not .active). Give it a
   clear dark ring + tint so it reads as "selected", distinct from plain hover. */
.ob-section-card.active,
.ob-section-card.selected {
  border-color: var(--ink);
  background: var(--bg-soft);
  box-shadow: 0 0 0 2px var(--ink);
}
/* Hide emoji glyph blocks — keep DOM intact for onboarding.js */
.ob-section-emoji,
.ob-final-icon {
  font-size: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
}
.ob-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}
.ob-section-detail {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 2px;
}
.ob-section-plus {
  font-weight: 600;
  color: var(--ink-3);
  margin: 0 4px;
}
.ob-section-meta {
  font-size: 11.5px;
  color: var(--ink-3);
}
.ob-section-tag {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: white;
  border: 1px solid var(--ink);
  padding: 3px 8px;
  border-radius: 999px;
}

/* ── Score slider ───────────────────────────────────── */
.ob-score-display {
  text-align: center;
  font-size: 36px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 8px 0 14px;
}
.ob-score-detail {
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 14px;
}
input[type="range"].ob-slider {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 4px;
  background: var(--line);
  border-radius: 6px;
  outline: none;
}
input[type="range"].ob-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
input[type="range"].ob-slider::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  border: 2px solid white;
}

/* ── Date ───────────────────────────────────────────── */
.ob-date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ob-date-shortcuts {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 10px;
}
.ob-date-info {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--ink-2);
  margin-top: 14px;
  line-height: 1.55;
}
.ob-date-info strong { color: var(--ink); font-weight: 600; }

/* ── Summary card ───────────────────────────────────── */
.ob-summary {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.ob-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.ob-summary-row:last-child { border-bottom: none; }
.ob-summary-key { color: var(--ink-3); }
.ob-summary-val { color: var(--ink); font-weight: 500; }

/* ── Actions / buttons ──────────────────────────────── */
.ob-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  flex: 0 0 auto;
}
.ob-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ink);
  color: white;
  border: 1px solid var(--ink);
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
}
.ob-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  opacity: 0.92;
}
.ob-btn:disabled {
  background: #bbb;
  border-color: #bbb;
  cursor: not-allowed;
  opacity: 1;
  transform: none;
}
.ob-btn-secondary {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}
.ob-btn-secondary:hover:not(:disabled) {
  background: var(--bg-soft);
  border-color: var(--ink-3);
}

/* ── Error / messages ───────────────────────────────── */
.ob-error {
  color: #b91c1c;
  font-size: 13px;
  margin-top: 10px;
  min-height: 18px;
}
.ob-final-msg {
  font-size: 15px;
  color: var(--ink-2);
  text-align: center;
  margin: 10px 0 22px;
}

/* ── Sign-in widget on final step ───────────────────── */
#auth-widget {
  display: flex;
  justify-content: center;
  margin: 16px 0 8px;
}

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .ob-container { padding: 18px 18px 48px; }
  .ob-card { padding: 24px 20px; }
  .ob-h1 { font-size: 22px; }
  .ob-date-grid { grid-template-columns: 1fr; }
  .ob-actions { flex-direction: column-reverse; align-items: stretch; }
  .ob-btn { justify-content: center; }
}
