/* Onboarding / first-run — local styles. */

/* Drop the .aq-ob ancestor — page renders its own scroll root. */
.ob-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1400px;
  position: relative;
  z-index: 1;
}

/* ── Header ──────────────────────────────────────────────────── */
.ob-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--aq-line);
}
.ob-header-meta { flex: 1; min-width: 0; }
.ob-header-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--aq-ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--aq-text-faint);
  margin-bottom: 12px;
}
.ob-divider {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--aq-text-faint);
  opacity: 0.5;
}
.ob-header h1 {
  margin: 0 0 8px;
  font-family: var(--aq-ff-display);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--aq-text);
  text-wrap: pretty;
}
.ob-header p {
  margin: 0;
  max-width: 56ch;
  font-size: 14px;
  color: var(--aq-text-dim);
  line-height: 1.55;
}
.ob-header-actions { display: flex; gap: 8px; }

/* ── Buttons ─────────────────────────────────────────────────── */
.ob-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--aq-text);
  border: 1px solid var(--aq-text);
  border-radius: 7px;
  color: #08090b;
  font: inherit; font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.ob-btn:hover { background: rgba(255,255,255,0.92); }
.ob-btn.ghost {
  background: var(--aq-surface-2);
  border-color: var(--aq-line);
  color: var(--aq-text);
  font-weight: 400;
}
.ob-btn.ghost:hover { background: rgba(255,255,255,0.06); border-color: var(--aq-line-strong); }
.ob-btn.sm { padding: 5px 11px; font-size: 11.5px; }

.ob-link {
  background: transparent; border: 0; padding: 0;
  color: var(--aq-accent);
  font: inherit; font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}
.ob-link:hover { text-decoration: underline; }

/* ── Two-col row (checklist + resources) ─────────────────────── */
.ob-row {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  align-items: start;
}
.ob-row-2 {
  grid-template-columns: 1fr 1fr;
}

/* ── Cards ───────────────────────────────────────────────────── */
.ob-card {
  background: var(--aq-surface);
  border: 1px solid var(--aq-line);
  border-radius: 10px;
  overflow: hidden;
}
.ob-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--aq-line);
}
.ob-card-head h2 {
  margin: 0 0 2px;
  font-family: var(--aq-ff-display);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--aq-text);
  letter-spacing: -0.005em;
}
.ob-card-head p {
  margin: 0;
  font-size: 11.5px;
  color: var(--aq-text-faint);
}
.ob-card-foot {
  padding: 10px 18px;
  border-top: 1px solid var(--aq-line);
  background: var(--aq-surface-2);
  font-size: 11.5px;
  color: var(--aq-text-faint);
}

/* ── Checklist ───────────────────────────────────────────────── */
.ob-checklist {
  background: var(--aq-surface);
  border: 1px solid var(--aq-line);
  border-radius: 12px;
  overflow: hidden;
}
.ob-checklist-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--aq-line);
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--aq-accent) 8%, transparent), transparent 50%),
    var(--aq-surface);
}
.ob-checklist-head h2 {
  margin: 0 0 4px;
  font-family: var(--aq-ff-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--aq-text);
  letter-spacing: -0.012em;
}
.ob-checklist-head p { margin: 0; font-size: 12.5px; color: var(--aq-text-dim); }

.ob-progress-ring { flex-shrink: 0; }
.ob-progress-text {
  fill: var(--aq-text);
  font-family: var(--aq-ff-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.ob-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ob-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--aq-line);
  position: relative;
}
.ob-step:last-child { border-bottom: 0; }
.ob-step.is-active {
  background: color-mix(in srgb, var(--aq-accent) 4%, transparent);
}
.ob-step.is-active::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--aq-accent);
}

.ob-step-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--aq-surface-2);
  border: 1px solid var(--aq-line);
  color: var(--aq-text-faint);
  font-family: var(--aq-ff-display);
  font-size: 13.5px;
  font-weight: 500;
  flex-shrink: 0;
  margin-top: 2px;
}
.ob-step-icon.is-done {
  background: color-mix(in srgb, var(--aq-success) 16%, transparent);
  border-color: var(--aq-success);
  color: var(--aq-success);
}
.ob-step-icon.is-active {
  background: var(--aq-accent);
  border-color: var(--aq-accent);
  color: white;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--aq-accent) 16%, transparent);
}

.ob-step-body { min-width: 0; }
.ob-step-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.ob-step h3 {
  margin: 0;
  font-family: var(--aq-ff-display);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--aq-text);
  letter-spacing: -0.005em;
}
.ob-step.is-done h3 {
  color: var(--aq-text-dim);
  text-decoration: line-through;
  text-decoration-color: var(--aq-text-faint);
  text-decoration-thickness: 1px;
}
.ob-step-eta {
  font-family: var(--aq-ff-mono);
  font-size: 10.5px;
  color: var(--aq-text-faint);
  letter-spacing: 0.04em;
}
.ob-step p {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--aq-text-dim);
  line-height: 1.55;
}
.ob-step.is-done p { color: var(--aq-text-faint); }

.ob-step-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: var(--aq-surface-2);
  border: 1px solid var(--aq-line);
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--aq-text-dim);
  line-height: 1.5;
}
.ob-step-hint svg { color: var(--aq-accent); flex-shrink: 0; margin-top: 2px; }

/* ── KPI strip (empty state variant) ────────────────────────── */
.ob-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--aq-line);
  border: 1px solid var(--aq-line);
  border-radius: 10px;
  overflow: hidden;
}
.ob-kpi {
  background: var(--aq-surface);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ob-kpi-label {
  font-family: var(--aq-ff-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aq-text-faint);
}
.ob-kpi-value {
  font-family: var(--aq-ff-display);
  font-size: 26px;
  font-weight: 500;
  color: var(--aq-text);
  letter-spacing: -0.012em;
  line-height: 1.1;
}
.ob-kpi-value.is-empty { color: var(--aq-text-faint); }
.ob-kpi-sub {
  font-size: 11.5px;
  color: var(--aq-text-faint);
}

/* ── Empty: Screens ─────────────────────────────────────────── */
.ob-empty .ob-empty-body {
  padding: 28px 22px 24px;
  text-align: center;
}
.ob-empty-illus {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 20px;
}
.ob-mini-screen {
  width: 80px; height: 56px;
  background: var(--aq-surface-2);
  border: 1px solid var(--aq-line);
  border-radius: 6px;
  position: relative;
}
.ob-mini-screen::after {
  content: "";
  position: absolute;
  bottom: -8px; left: 50%;
  transform: translateX(-50%);
  width: 30px; height: 6px;
  background: var(--aq-line);
  border-radius: 0 0 4px 4px;
}
.ob-mini-screen-active {
  width: 110px; height: 76px;
  background: linear-gradient(135deg, oklch(0.20 0.03 220), oklch(0.12 0.02 240));
  border-color: var(--aq-line-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--aq-accent) 10%, transparent);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.ob-pairing-code {
  font-family: var(--aq-ff-mono);
  font-size: 18px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ob-pairing-code span { background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 3px; }
.ob-pairing-label {
  font-family: var(--aq-ff-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.ob-empty h3 {
  margin: 0 0 4px;
  font-family: var(--aq-ff-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--aq-text);
  letter-spacing: -0.008em;
}
.ob-empty p {
  margin: 0 auto 16px;
  font-size: 12.5px;
  color: var(--aq-text-dim);
  line-height: 1.55;
  max-width: 42ch;
}
.ob-empty-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

/* ── Library preview ────────────────────────────────────────── */
.ob-lib-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--aq-line);
}
.ob-lib-card {
  background: var(--aq-surface);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}
.ob-lib-thumb {
  width: 40px; height: 40px;
  background: var(--aq-surface-2);
  border: 1px solid var(--aq-line);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 22px;
}
.ob-lib-meta b {
  display: block;
  font-size: 12.5px;
  color: var(--aq-text);
  font-weight: 500;
  margin-bottom: 2px;
}
.ob-lib-meta i {
  font-size: 11px;
  color: var(--aq-text-faint);
  font-style: italic;
}
.ob-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--aq-surface-2);
  border: 1px solid var(--aq-line);
  border-radius: 5px;
  padding: 4px 9px;
  color: var(--aq-text-dim);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.ob-add-btn:hover { color: var(--aq-text); border-color: var(--aq-line-strong); }

/* ── Templates ──────────────────────────────────────────────── */
.ob-tpl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--aq-line);
}
.ob-tpl-card {
  background: var(--aq-surface);
  padding: 14px 16px 16px;
  cursor: pointer;
  transition: background 0.12s;
}
.ob-tpl-card:hover { background: rgba(255,255,255,0.018); }
.ob-tpl-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, oklch(0.22 0.03 220), oklch(0.13 0.02 240));
  border: 1px solid var(--aq-line);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 32px;
  position: relative;
  margin-bottom: 10px;
}
.ob-tpl-frame {
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 4px;
}
.ob-tpl-meta b {
  display: block;
  font-size: 12.5px;
  color: var(--aq-text);
  font-weight: 500;
  margin-bottom: 2px;
}
.ob-tpl-meta span {
  font-family: var(--aq-ff-mono);
  font-size: 10px;
  color: var(--aq-text-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Resources rail ─────────────────────────────────────────── */
.ob-resources {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 80px;
}
.ob-side-card {
  background: var(--aq-surface);
  border: 1px solid var(--aq-line);
  border-radius: 10px;
  padding: 14px 16px;
}
.ob-side-card h3 {
  margin: 0 0 10px;
  font-family: var(--aq-ff-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--aq-text-faint);
}

.ob-vids {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ob-vids li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}
.ob-vid-thumb {
  width: 48px; height: 32px;
  background: linear-gradient(135deg, oklch(0.22 0.03 220), oklch(0.13 0.02 240));
  border: 1px solid var(--aq-line);
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 11px;
  flex-shrink: 0;
}
.ob-vids b {
  display: block;
  font-size: 12px;
  color: var(--aq-text);
  font-weight: 500;
  margin-bottom: 2px;
}
.ob-vids span {
  font-size: 10.5px;
  color: var(--aq-text-faint);
  font-family: var(--aq-ff-mono);
  letter-spacing: 0.02em;
}

/* Helper / human card */
.ob-helper {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: flex-start;
}
.ob-helper-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.55 0.10 280), oklch(0.35 0.06 310));
  color: white;
  font-family: var(--aq-ff-display);
  font-size: 18px;
  font-weight: 600;
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.12);
}
.ob-helper-online {
  position: absolute;
  bottom: 0; right: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--aq-success);
  border: 2px solid var(--aq-surface);
  box-shadow: 0 0 6px var(--aq-success);
}
.ob-helper-body h3 {
  margin: 0 0 4px;
  font-family: var(--aq-ff-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--aq-text);
  letter-spacing: 0;
  text-transform: none;
}
.ob-helper-body p {
  margin: 0 0 12px;
  font-size: 11.5px;
  color: var(--aq-text-dim);
  line-height: 1.5;
}
.ob-helper-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Tips */
.ob-tips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ob-tips li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: flex-start;
  font-size: 11.5px;
  color: var(--aq-text-dim);
  line-height: 1.55;
}
.ob-tips svg { color: var(--aq-accent); margin-top: 2px; }
.ob-tips b { color: var(--aq-text); font-weight: 500; }

/* ── Footer ──────────────────────────────────────────────────── */
.ob-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px 0;
  font-size: 12px;
  color: var(--aq-text-faint);
}
