/* Cavix Path B — first-run tips + role-aware Quick help
   Classes must match onboarding-help.js. Touch targets ≥48px. */

.cavix-firstrun-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px max(20px, env(safe-area-inset-bottom, 0px));
  background: rgba(42, 37, 32, 0.52);
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.cavix-firstrun-overlay[hidden] {
  display: none !important;
}

.cavix-firstrun-card {
  width: 100%;
  max-width: 420px;
  max-height: min(88dvh, 720px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--paper, #f2efe7);
  color: var(--ink, #2a2520);
  border: 1px solid var(--line, #d6cdb9);
  border-radius: 18px;
  padding: 18px 16px 16px;
  box-shadow: 0 18px 40px rgba(42, 37, 32, 0.18);
  box-sizing: border-box;
}

.cavix-firstrun-kicker {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c8501e;
  margin: 0 0 6px;
}

.cavix-firstrun-title {
  font-family: Inter, system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  line-height: 1.2;
}

.cavix-firstrun-sub {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: #6b6353;
}

.cavix-firstrun-steps {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.cavix-firstrun-steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  background: var(--paper-dim, #eae6dc);
  border-radius: 12px;
}

.cavix-firstrun-num {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: #c8501e;
  flex-shrink: 0;
}

.cavix-firstrun-step-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 2px;
  line-height: 1.3;
  color: var(--ink, #2a2520);
}

.cavix-firstrun-step-body {
  font-size: 13px;
  line-height: 1.45;
  color: #6b6353;
  margin: 0;
}

.cavix-checklist {
  list-style: none;
  margin: 0 0 14px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  background: var(--paper-dim, #eae6dc);
  border: 1px solid var(--line, #d6cdb9);
  border-radius: 12px;
}

.cavix-checklist[hidden] {
  display: none !important;
}

.cavix-checklist li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  line-height: 1.35;
  margin: 0;
  padding: 0;
}

.cavix-check-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  box-sizing: border-box;
  flex-shrink: 0;
}

.cavix-check-done .cavix-check-mark {
  background: #c8501e;
  color: #fff;
  border: 1px solid #c8501e;
}

.cavix-check-todo .cavix-check-mark {
  background: transparent;
  color: transparent;
  border: 1.5px solid var(--line, #d6cdb9);
}

.cavix-check-done .cavix-check-label {
  color: var(--ink, #2a2520);
  font-weight: 600;
}

.cavix-check-todo .cavix-check-label {
  color: #6b6353;
}

.cavix-firstrun-actions {
  display: grid;
  gap: 8px;
}

.cavix-firstrun-actions button {
  min-height: 48px;
  border-radius: 12px;
  font: 700 15px/1.2 Inter, system-ui, sans-serif;
  cursor: pointer;
  padding: 12px 16px;
  box-sizing: border-box;
  width: 100%;
}

.cavix-firstrun-primary {
  border: none;
  background: #c8501e;
  color: #fff;
}

.cavix-firstrun-primary:hover {
  background: #b3471a;
}

.cavix-firstrun-primary:active {
  background: #9a3c16;
}

.cavix-firstrun-ghost {
  border: 1.5px solid var(--line, #d6cdb9);
  background: transparent;
  color: var(--ink, #2a2520);
}

.cavix-firstrun-ghost:hover {
  background: rgba(42, 37, 32, 0.04);
}

.cavix-firstrun-skip {
  border: none;
  background: transparent;
  color: #6b6353;
  font: 600 13px/1.2 Inter, system-ui, sans-serif !important;
  min-height: 40px !important;
  padding: 6px 8px !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cavix-firstrun-skip:hover {
  color: var(--ink, #2a2520);
}

.cavix-firstrun-skip[hidden] {
  display: none !important;
}

.cavix-firstrun-actions button:focus-visible {
  outline: 2px solid #c8501e;
  outline-offset: 2px;
}

@media (min-width: 560px) {
  .cavix-firstrun-overlay {
    align-items: center;
    padding: 24px;
  }
}

/* Role-aware Quick help panel (Settings) */
.cavix-role-help {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: var(--paper-dim, #eae6dc);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--ink-soft, #6b6353);
  line-height: 1.5;
  text-align: left;
}

.cavix-role-help-title {
  font-weight: 700;
  color: var(--ink, #2a2520);
  margin: 0 0 6px;
  font-size: 13px;
}

.cavix-role-help p {
  margin: 0 0 6px;
}

.cavix-role-help p:last-child {
  margin-bottom: 0;
}

.cavix-role-help b {
  color: var(--ink, #2a2520);
}

.cavix-role-help a {
  color: #c8501e;
  font-weight: 600;
}

.cavix-role-help button[data-cavix-replay-tips],
.cavix-role-help .ml-toggle-btn[data-cavix-replay-tips] {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  box-sizing: border-box;
}

.cavix-replay-tips-btn { width: 100%; min-height: 48px; margin-top: 8px; }
