/* Phase F steps 3–4: questions in the toast, a revealed task, and the first-run card. */

.toast.has-question {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  max-width: min(580px, calc(100vw - 32px));
  line-height: 1.5;
}

.toast.has-question .toast-text {
  flex: 1 1 260px;
}

.toast-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.toast .toast-actions button {
  margin-left: 0;
}

.toast.has-question .toast-actions {
  flex-wrap: wrap;
}

.toast .toast-primary {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--cta);
  background: var(--cta);
  color: #000;
  text-decoration: none;
}

.toast .toast-primary:hover {
  background: var(--bg);
  color: var(--text);
}

.task-card.is-revealed {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.first-run {
  margin: 0 0 var(--space-6);
  padding: 22px 24px 24px;
  border: 1px solid var(--line);
  background: var(--bg);
  box-shadow: 8px 8px 0 var(--accent);
}

.first-run-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.first-run h2 {
  margin: 0;
  font: 400 2rem/1.05 var(--font-heading);
}

.first-run-progress {
  font: 700 .65rem var(--font-ui);
  letter-spacing: .1em;
}

.first-run-lede {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1rem;
}

.first-run ol {
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  list-style: none;
}

.first-run li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.first-run li:last-child {
  border-bottom: 0;
}

.first-run li.next {
  background: var(--surface);
}

.first-run-check {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  font: 700 .7rem var(--font-ui);
}

.first-run li.done .first-run-check {
  background: var(--text);
  color: var(--bg);
}

.first-run h3 {
  margin: 0;
  font: 400 1.25rem/1.2 var(--font-heading);
}

.first-run li.done h3 {
  color: var(--muted);
  text-decoration: line-through;
}

.first-run li p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: .95rem;
}

.first-run-action .primary-button,
.first-run-action .secondary-button {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.first-run-action button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.first-run-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.first-run-complete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.first-run-complete .first-run-lede {
  margin: 4px 0 0;
}

.first-run-buttons {
  display: flex;
  gap: 9px;
}

[data-theme="dark"] .first-run-action .secondary-button {
  background: #000;
  color: #fff;
}

@media (max-width: 720px) {
  .toast.has-question .toast-primary {
    min-height: 44px;
  }

  .first-run {
    padding: 18px 16px 20px;
    box-shadow: 6px 6px 0 var(--accent);
  }

  .first-run h2 {
    font-size: 1.7rem;
  }

  .first-run li {
    grid-template-columns: 28px 1fr;
  }

  .first-run-action {
    grid-column: 2;
  }

  .first-run-action:empty {
    display: none;
  }

  .first-run-action .primary-button,
  .first-run-action .secondary-button,
  .first-run-buttons button {
    width: 100%;
    max-width: none;
    min-height: 44px;
    white-space: normal;
  }

  .first-run-buttons {
    width: 100%;
  }

  .first-run-buttons button {
    flex: 1;
  }
}
