/* First-run onboarding wizard (js/onboarding.js). */
html.onb-open, html.onb-open body { overflow: hidden; }

.onb-backdrop {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(6, 10, 20, 0.82);
  animation: onb-fade 0.2s ease-out;
}

.onb-card {
  width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 28px 28px 24px;
  border-radius: 18px;
  background: var(--card, #ffffff);
  color: var(--ink, #14182b);
  border: 1px solid var(--line, #e3e6ef);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  animation: onb-rise 0.25s ease-out;
}

.onb-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

.onb-dots { display: flex; justify-content: center; gap: 8px; list-style: none; margin: 0 0 20px; padding: 0; }
.onb-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--line, #d5d9e4);
  transition: background-color 0.2s, transform 0.2s;
}
.onb-dot.is-done { background: var(--product-accent, #3b5bdb); opacity: 0.55; }
.onb-dot.is-current { background: var(--product-accent, #3b5bdb); transform: scale(1.3); }

.onb-title {
  margin: 0 0 12px;
  font-size: var(--text-2xl, 1.5rem);
  font-weight: var(--font-semibold, 600);
  line-height: 1.25;
}
.onb-title:focus { outline: none; }
.onb-title:focus-visible { outline: 2px solid var(--product-accent, #3b5bdb); outline-offset: 4px; }

.onb-lede, .onb-note, .onb-stem { margin: 0 0 16px; line-height: 1.55; }
.onb-note { color: var(--muted, #5b6275); font-size: var(--text-sm, 0.9rem); }
.onb-center { text-align: center; }

.onb-options { border: 0; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.onb-legend { padding: 0; margin-bottom: 8px; font-weight: var(--font-semibold, 600); }
.onb-radio {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line, #e3e6ef);
  transition: border-color 0.15s, background-color 0.15s;
}
.onb-radio:hover { border-color: var(--product-accent, #3b5bdb); }
.onb-radio input { width: 18px; height: 18px; margin: 0; accent-color: var(--product-accent, #3b5bdb); }
.onb-radio:has(input:checked) { border-color: var(--product-accent, #3b5bdb); background: rgba(59, 91, 219, 0.08); }
.onb-radio:has(input:focus-visible) { outline: 2px solid var(--product-accent, #3b5bdb); outline-offset: 2px; }

.onb-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 16px; }
.onb-pill {
  flex: 1 1 0; min-width: 88px; min-height: 44px;
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: var(--font-semibold, 600);
  background: transparent; color: inherit;
  border: 2px solid var(--line, #d5d9e4);
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.onb-pill:hover { border-color: var(--product-accent, #3b5bdb); }
.onb-pill[aria-pressed="true"] {
  background: var(--product-accent, #3b5bdb); border-color: var(--product-accent, #3b5bdb); color: #fff;
}

.onb-answers { display: grid; gap: 8px; margin-bottom: 12px; }
.onb-answer {
  text-align: left; min-height: 44px; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  font: inherit; color: inherit; background: transparent;
  border: 1px solid var(--line, #e3e6ef);
  transition: border-color 0.15s, background-color 0.15s;
}
.onb-answer:hover:not(:disabled) { border-color: var(--product-accent, #3b5bdb); }
.onb-answer:disabled { cursor: default; opacity: 0.7; }
.onb-answer.is-correct { opacity: 1; border-color: #2f9e44; background: rgba(47, 158, 68, 0.1); }
.onb-answer.is-wrong { opacity: 1; border-color: #e03131; background: rgba(224, 49, 49, 0.08); }

.onb-feedback p { margin: 0 0 10px; line-height: 1.55; font-size: var(--text-sm, 0.95rem); }
.onb-verdict { font-weight: var(--font-semibold, 600); }
.onb-outro { font-style: italic; color: var(--muted, #5b6275); }

.onb-badge-wrap { display: flex; justify-content: center; margin: 4px 0 16px; }
.onb-badge-stop1 { stop-color: #4c6ef5; }
.onb-badge-stop2 { stop-color: #1c2f8a; }
.onb-badge-rim { stroke: rgba(255, 255, 255, 0.55); stroke-width: 3; }
.onb-badge-star { fill: #ffd43b; }

.onb-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.onb-btn {
  min-height: 44px; padding: 10px 22px; border-radius: 10px; cursor: pointer;
  font: inherit; font-weight: var(--font-semibold, 600);
  transition: background-color 0.15s, opacity 0.15s;
}
.onb-primary { background: var(--product-accent, #3b5bdb); color: #fff; border: 1px solid transparent; }
.onb-primary:hover:not(:disabled) { filter: brightness(1.08); }
.onb-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.onb-secondary { background: transparent; color: inherit; border: 1px solid var(--line, #d5d9e4); margin-right: auto; }
.onb-cta { width: 100%; min-height: 54px; font-size: 1.1rem; border-radius: 14px; }

.onb-btn:focus-visible, .onb-pill:focus-visible, .onb-answer:focus-visible {
  outline: 2px solid var(--product-accent, #3b5bdb); outline-offset: 2px;
}

@keyframes onb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes onb-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 480px) {
  .onb-backdrop { padding: 0; align-items: stretch; }
  .onb-card { max-width: none; max-height: none; height: 100%; border-radius: 0; padding: 22px 18px; }
  .onb-title { font-size: 1.3rem; }
  .onb-actions { position: sticky; bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .onb-backdrop, .onb-card { animation: none; }
  .onb-backdrop *, .onb-card * { transition: none !important; animation: none !important; }
  .onb-dot.is-current { transform: none; }
}
