/* ============================================================
   New project — wizard setup flow
   ============================================================ */

.portal-main--project-new {
  max-width: 600px;
}

.portal-main--welcome-new {
  max-width: 660px;
}

.portal-main--welcome-new:has(.project-wizard--setup-chooser) {
  max-width: 540px;
}

/* ---------- Welcome first-run (#/dev/new/welcome) ---------- */

.project-wizard--welcome {
  gap: calc(var(--sp-6) * 1.1);
}

.project-wizard--welcome .wizard-header h1 {
  font-size: 1.875rem;
}

.project-wizard--welcome .wizard-panel-lead {
  font-size: var(--text-base);
  max-width: 44ch;
}

.project-wizard--welcome .wizard-panel-note {
  font-size: var(--text-md);
  max-width: 44ch;
}

.wizard-header--welcome .wizard-panel-lead {
  margin-bottom: var(--sp-2);
  color: var(--ink-2);
}

.wizard-panel-note {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 var(--sp-4);
  line-height: 1.45;
  color: var(--ink-4);
  max-width: 40ch;
}

.wizard-panel-note-icon {
  color: currentColor;
  line-height: 1;
}

.project-wizard--welcome .wizard-panel-fields {
  gap: calc(var(--sp-4) * 1.1);
}

.project-wizard--welcome .wizard-panel-fields .field-label-row .field-label,
.project-wizard--welcome .wizard-panel-fields > .field > .field-label {
  font-size: calc(var(--text-xs) * 1.1);
}

.project-wizard--welcome .wizard-panel-fields .field-hint--micro {
  font-size: calc(var(--text-xs) * 1.1);
}

.project-wizard--welcome .input {
  font-size: calc(var(--text-md) * 1.1);
  padding: 0.6rem 0.82rem;
}

.project-wizard--welcome .wizard-next,
.project-wizard--welcome .wizard-footer .btn-primary {
  font-size: calc(var(--text-md) * 1.1);
  padding: 0.5rem 1.1rem;
}

.hosting-provider-inline {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.hosting-provider-inline .provider-form {
  margin: 0;
}

/* Hosting provider chooser step (wizard) */
.hosting-provider-choice {
  margin-bottom: var(--sp-2);
}

.wizard-footer-note {
  font-size: var(--text-xs);
  color: var(--ink-4);
}

.project-wizard--welcome .setup-inline-lead {
  margin: 0 0 var(--sp-4);
  max-width: 44ch;
}

.project-wizard--welcome .setup-done h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.project-wizard--welcome .setup-done p {
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--ink-3);
}

.project-new-body {
  min-width: 0;
}

.project-new {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.project-new-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-8) 0;
  color: var(--ink-3);
  font-size: var(--text-sm);
}

.project-new-head h1 {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.035em;
  margin: 0 0 var(--sp-2);
}

.project-new-lead {
  margin: 0;
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 42ch;
}

/* ---------- Wizard shell ---------- */

.project-wizard {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.wizard-header h1 {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.035em;
  margin: 0 0 var(--sp-4);
  color: var(--ink);
}

/* ---------- Progress rail ---------- */

.wizard-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
}

.wizard-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
  min-width: 4.5rem;
}

.wizard-progress-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink-4);
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}

.wizard-progress-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--ink-4);
  transition: color var(--t-fast);
}

.wizard-progress-line {
  flex: 1;
  height: 1px;
  min-width: 1.5rem;
  margin: 0 var(--sp-2);
  margin-bottom: 1.35rem;
  background: var(--border);
  transition: background var(--t-fast);
}

.wizard-progress-line.is-done {
  background: var(--ink-3);
}

.wizard-progress-step.is-active .wizard-progress-dot {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--bg);
}

.wizard-progress-step.is-active .wizard-progress-num {
  color: var(--ink);
}

.wizard-progress-step.is-active .wizard-progress-label {
  color: var(--ink);
}

.wizard-progress-step.is-done .wizard-progress-dot {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.wizard-progress-step.is-done .wizard-progress-label {
  color: var(--ink-3);
}

.wizard-repo-mount {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  min-height: 4rem;
  overflow: visible;
}

.wizard-repo-mount .github-cta {
  margin: 0;
}

.wizard-inline-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-4) 0;
  color: var(--ink-3);
  font-size: var(--text-sm);
}

/* ---------- Step panels ---------- */

.wizard-stage {
  position: relative;
  overflow: visible;
  min-height: 10rem;
}

.wizard-panel {
  width: 100%;
}

.wizard-panel-lead {
  margin: 0 0 var(--sp-4);
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 40ch;
}

.wizard-progress-num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1;
}

.wizard-panel-fields {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.wizard-panel-fields .field {
  margin: 0;
}

.wizard-panel-fields .field-label-row .field-label,
.wizard-panel-fields > .field > .field-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}

.wizard-panel-fields .field-hint--micro {
  margin-top: var(--sp-1);
}

/* ---------- Site preview chip ---------- */

.site-preview {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  font-size: var(--text-sm);
  color: var(--ink-2);
  width: fit-content;
  max-width: 100%;
}

.site-preview[hidden] {
  display: none !important;
}

.site-preview .proj-icon {
  width: 1.125rem;
  height: 1.125rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.site-preview .proj-icon .site-favicon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-preview-host {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Choice cards ---------- */

.field--choice .field-label {
  margin-bottom: var(--sp-3);
}

.choice-cards {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.choice-card {
  display: block;
  position: relative;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}

.choice-card:hover {
  border-color: var(--border-strong);
}

.choice-card.is-selected {
  border-color: var(--ink);
  background: var(--primary-softer);
}

.choice-card-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-card-title {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.choice-card-hint {
  display: block;
  font-size: var(--text-xs);
  line-height: 1.45;
  color: var(--ink-3);
}

/* ---------- Repo picker ---------- */

.repo-picker {
  position: relative;
  width: 100%;
}

.repo-picker-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--text-md);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--t-fast);
}

.repo-picker-trigger:hover {
  border-color: var(--border-strong);
}

.repo-picker-trigger:focus-visible {
  outline: none;
  border-color: var(--ink);
  box-shadow: var(--shadow-focus);
}

.repo-picker.is-open .repo-picker-trigger {
  border-color: var(--ink);
}

.repo-picker-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}

.repo-picker-value--placeholder {
  color: var(--ink-3);
}

.repo-picker-chevron {
  flex-shrink: 0;
  color: var(--ink-4);
  transition: transform var(--t-fast);
}

.repo-picker.is-open .repo-picker-chevron {
  transform: rotate(180deg);
}

.repo-picker-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: block;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.repo-picker-search {
  padding: var(--sp-2);
  border-bottom: 1px solid var(--border);
}

.repo-picker-search-input {
  width: 100%;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
}

.repo-picker-search-input:focus {
  outline: none;
  border-color: var(--ink);
}

.repo-picker-list {
  max-height: 240px;
  overflow-y: auto;
}

.repo-picker-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: 0.55rem 0.75rem;
  border: none;
  background: transparent;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.repo-picker-option:hover {
  background: var(--surface);
}

.repo-picker-option.is-selected {
  background: var(--primary-softer);
}

.repo-picker-option-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.repo-picker-private {
  flex-shrink: 0;
  font-size: 10px;
}

.repo-picker-empty {
  margin: 0;
  padding: var(--sp-4);
  font-size: var(--text-sm);
  color: var(--ink-3);
  text-align: center;
}

/* ---------- Deploy disclosure (legacy — hosting uses tile picker) ---------- */

.wizard-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-top: var(--sp-5);
}

.wizard-back {
  flex-shrink: 0;
}

.wizard-footer-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-2);
  margin-left: auto;
  min-width: 0;
}

.wizard-next {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 9rem;
  justify-content: center;
}

.project-new-error {
  margin: 0;
  text-align: right;
  max-width: 22rem;
}

.project-new .github-cta {
  margin-top: var(--sp-2);
}

@media (max-width: 560px) {
  .wizard-progress-step {
    min-width: 3.5rem;
  }

  .wizard-progress-label {
    font-size: 0.6875rem;
  }

  .wizard-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .wizard-back {
    width: 100%;
    justify-content: center;
  }

  .wizard-footer-end {
    align-items: stretch;
    width: 100%;
  }

  .wizard-next {
    width: 100%;
  }

  .project-new-error {
    text-align: left;
    max-width: none;
  }
}

/* ============================================================
   Project setup — path chooser & confirmation
   ============================================================ */

.setup-choice-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.setup-choice-header .setup-choice-eddy {
  display: block;
  margin: 0 0 var(--sp-3);
  /* Tools / envelope fly past the mark box */
  padding: 0 2.25rem 1.35rem 0;
  overflow: visible;
}

.setup-choice-header .setup-choice-eddy .eddy-figure {
  width: 96px;
  height: 96px;
  overflow: visible;
}

.setup-choice-header h1 {
  max-width: none;
  margin: 0 0 var(--sp-2);
  text-wrap: balance;
}

.setup-choice-context {
  margin: 0;
  color: var(--ink-3);
}

.setup-choice-header .wizard-panel-lead {
  max-width: none;
  margin-bottom: 0;
  text-wrap: pretty;
}

/* Chooser-only: calm Eddy, prop beats every few seconds (not the chat pace). */
.eddy.setup-choice-eddy[data-anim='working'] .eddy-figure,
.eddy.setup-choice-eddy[data-anim='mailing'] .eddy-figure {
  animation: none;
}

.eddy.setup-choice-eddy[data-anim='working'] .eddy-logo-head {
  animation: setup-choice-work-nod 4.2s ease-in-out infinite;
}

.eddy.setup-choice-eddy[data-anim='working'] .eddy-logo-line--long,
.eddy.setup-choice-eddy[data-anim='working'] .eddy-logo-line--short,
.eddy.setup-choice-eddy[data-anim='working'] .eddy-logo-swoosh {
  animation: none;
}

.eddy.setup-choice-eddy[data-anim='working'] .eddy-fx-wrench {
  animation: setup-choice-wrench 4.2s cubic-bezier(0.45, 0, 0.3, 1) infinite;
}

.eddy.setup-choice-eddy[data-anim='working'] .eddy-fx-nut {
  animation: setup-choice-nut 4.2s cubic-bezier(0.45, 0, 0.3, 1) infinite;
}

.eddy.setup-choice-eddy[data-anim='working'] .eddy-fx-tspark--1 {
  animation: setup-choice-spark 4.2s ease-out infinite;
}

.eddy.setup-choice-eddy[data-anim='working'] .eddy-fx-tspark--2 {
  animation: setup-choice-spark 4.2s ease-out 0.12s infinite;
}

.eddy.setup-choice-eddy[data-anim='mailing'] .eddy-logo-head {
  animation: none;
  transform: rotate(-3deg);
}

.eddy.setup-choice-eddy[data-anim='mailing'] .eddy-logo-eye {
  transform: translate(8px, 6px);
}

.eddy.setup-choice-eddy[data-anim='mailing'] .eddy-logo-line--long,
.eddy.setup-choice-eddy[data-anim='mailing'] .eddy-logo-line--short,
.eddy.setup-choice-eddy[data-anim='mailing'] .eddy-logo-swoosh {
  animation: none;
}

.eddy.setup-choice-eddy[data-anim='mailing'] .eddy-fx-envelope {
  animation: setup-choice-mail-fly 4.8s ease-in-out infinite;
}

.eddy.setup-choice-eddy[data-anim='mailing'] .eddy-fx-tspark--mail {
  animation: setup-choice-spark 4.8s ease-out 0.55s infinite;
}

@keyframes setup-choice-work-nod {
  0%, 8%, 100% { transform: rotate(0deg); }
  14%          { transform: rotate(5deg); }
  22%          { transform: rotate(0deg); }
}

@keyframes setup-choice-wrench {
  0%, 8%  { transform: rotate(14deg); }
  16%     { transform: rotate(-34deg); }
  20%     { transform: rotate(-31deg); }
  28%     { transform: rotate(14deg); }
  100%    { transform: rotate(14deg); }
}

@keyframes setup-choice-nut {
  0%, 8%  { transform: rotate(0deg); }
  16%     { transform: rotate(-60deg); }
  100%    { transform: rotate(-60deg); }
}

@keyframes setup-choice-spark {
  0%, 12% { opacity: 0; transform: scale(0.2); }
  16%     { opacity: 1; transform: scale(1.15); }
  24%     { opacity: 0; transform: scale(0.4); }
  100%    { opacity: 0; }
}

/* Hold near chin, then launch up-right and fade; a new one settles back in. */
@keyframes setup-choice-mail-fly {
  0%, 10% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  28% {
    transform: translate(42px, -34px) rotate(14deg);
    opacity: 1;
  }
  40% {
    transform: translate(78px, -58px) rotate(22deg);
    opacity: 0;
  }
  41% {
    transform: translate(-10px, 10px) rotate(-10deg);
    opacity: 0;
  }
  55%, 100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eddy.setup-choice-eddy[data-anim='working'] .eddy-logo-head,
  .eddy.setup-choice-eddy[data-anim='working'] .eddy-fx-wrench,
  .eddy.setup-choice-eddy[data-anim='working'] .eddy-fx-nut,
  .eddy.setup-choice-eddy[data-anim='working'] .eddy-fx-tspark--1,
  .eddy.setup-choice-eddy[data-anim='working'] .eddy-fx-tspark--2,
  .eddy.setup-choice-eddy[data-anim='mailing'] .eddy-fx-envelope,
  .eddy.setup-choice-eddy[data-anim='mailing'] .eddy-fx-tspark--mail {
    animation: none !important;
  }
}

.project-wizard--setup-chooser .wizard-panel-lead {
  max-width: none;
}

.setup-choice-panel {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.setup-choice-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.setup-choice-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 1rem 1.05rem;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-ui);
  cursor: pointer;
  opacity: 0;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.setup-choice-row.is-ready {
  opacity: 1;
}

.setup-choice-row:hover {
  background: #ececee;
  transform: translateY(-1px);
}

.setup-choice-row.is-selected {
  background: var(--surface);
  border-color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transform: none;
}

.setup-choice-row.is-selected:hover {
  transform: none;
}

.setup-choice-row:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.setup-choice-radio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1.5px solid var(--ink-4);
  background: transparent;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.setup-choice-row:hover .setup-choice-radio {
  border-color: var(--ink-3);
}

.setup-choice-row.is-selected .setup-choice-radio {
  border-color: var(--primary);
  background: var(--primary);
  transform: scale(1.05);
}

.setup-choice-radio-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: transparent;
  transform: scale(0);
  transition: transform 0.2s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.15s ease;
}

.setup-choice-row.is-selected .setup-choice-radio-dot {
  background: #fff;
  transform: scale(1);
}

.setup-choice-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.setup-choice-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.setup-choice-desc {
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--ink-3);
}

.setup-choice-row.is-selected .setup-choice-desc {
  color: var(--ink-2);
}

.setup-choice-footer {
  display: flex;
  justify-content: flex-start;
}

.setup-choice-cta {
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: 2.6rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  white-space: normal;
  text-align: left;
  line-height: 1.3;
  opacity: 0;
}

.setup-choice-cta.is-ready {
  opacity: 1;
}

.setup-choice-cta-label {
  display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
  .setup-choice-row,
  .setup-choice-cta {
    opacity: 1;
  }

  .setup-choice-row:hover {
    transform: none;
  }
}

/* ============================================================
   Project setup — Connect GitHub
   ============================================================ */

.setup-github-mascot {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 0.85rem;
  margin: 0 0 var(--sp-4);
  padding: 0.5rem 0.75rem 0.65rem 0;
  overflow: visible;
  min-height: 6.75rem;
}

.setup-github-mascot .setup-github-eddy {
  display: block;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 2;
}

.setup-github-mascot .setup-github-eddy .eddy-figure {
  width: 96px;
  height: 96px;
  overflow: visible;
}

/* GSAP drives the glance / couple — keep idle float off. */
.eddy.setup-github-eddy[data-anim='idle'] .eddy-figure {
  animation: none;
}

.setup-github-fx {
  position: absolute;
  left: 4.6rem;
  bottom: 1.7rem;
  width: 5.5rem;
  height: 3.25rem;
  pointer-events: none;
  z-index: 3;
}

.setup-github-bit {
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 1.5px;
  background: #186cff;
  opacity: 0;
  transform: rotate(45deg);
  will-change: transform, opacity;
}

.setup-github-bit--2,
.setup-github-bit--4 {
  background: var(--ink);
  width: 6px;
  height: 6px;
}

.setup-github-bit--3 {
  width: 5px;
  height: 5px;
}

.setup-github-bit--5 {
  width: 7px;
  height: 7px;
  background: #186cff;
}

.setup-github-partner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 0.55rem;
  z-index: 2;
}

.setup-github-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  border: 1.5px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  will-change: transform, box-shadow;
}

.setup-github-mascot.is-linked .setup-github-mark,
.setup-github-mark.is-linked {
  background: var(--ink);
  color: #fff;
}

.setup-github-mascot.is-linked .setup-github-fx {
  display: none;
}

.setup-github-panel {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.setup-github-action {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  align-items: stretch;
  width: 100%;
}

.setup-github-action-loading {
  display: flex;
  align-items: center;
  min-height: 4.5rem;
}

.setup-github-card {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  width: 100%;
  padding: 1.05rem 1.1rem;
  text-align: left;
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-ui);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.setup-github-card:hover {
  background: var(--surface-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(8, 19, 55, 0.08);
}

.setup-github-card:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.setup-github-card:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.setup-github-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
}

.setup-github-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.setup-github-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.setup-github-card-desc {
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--ink-3);
}

.setup-github-card-arrow {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--ink-3);
  transition: transform 0.2s ease, color 0.2s ease;
}

.setup-github-card:hover .setup-github-card-arrow {
  color: var(--ink);
  transform: translateX(2px);
}

.setup-github-action .github-connected {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: none;
}

.setup-github-action .wizard-panel-fields,
.setup-github-action .repo-suggestion {
  width: 100%;
}

.setup-github-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  width: 100%;
}

.setup-github-cta {
  align-self: flex-start;
  gap: 0.55rem;
}

.setup-github-cta-label {
  display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
  .setup-github-partner,
  .setup-github-mark {
    opacity: 1 !important;
    transform: none !important;
  }

  .setup-github-fx {
    display: none;
  }

  .setup-github-card:hover {
    transform: none;
  }
}

.setup-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-8) 0;
  color: var(--ink-3);
  font-size: var(--text-sm);
}

.setup-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-3);
  padding: var(--sp-5) 0;
}

.setup-done-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary);
}

.setup-done h3 {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.setup-done p {
  margin: 0;
  max-width: 38ch;
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--ink-3);
}

/* Eddy greets first-run users above the welcome title. */
.wizard-hello-eddy {
  display: block;
  margin-bottom: var(--sp-2);
}

/* Calm presence — wink only, no levitation (same idea as auth). */
.wizard-hello-eddy.eddy[data-anim='idle'] .eddy-figure {
  animation: welcome-eddy-alive 7s ease-in-out infinite;
}

.wizard-hello-eddy.eddy[data-anim='idle'] .eddy-logo-trail {
  animation: none;
}

.wizard-hello-eddy.eddy[data-anim='idle'] .eddy-logo-eye {
  animation: welcome-eddy-wink 6.2s ease-in-out infinite;
}

@keyframes welcome-eddy-alive {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  40% {
    transform: scale(1.015) rotate(-0.6deg);
  }
  70% {
    transform: scale(1.008) rotate(0.4deg);
  }
}

@keyframes welcome-eddy-wink {
  0%,
  86%,
  94%,
  100% {
    transform: scaleY(1);
  }
  88%,
  91% {
    transform: scaleY(0.08);
  }
}

/* One-shot glance toward the URL field if the user hasn't started. */
.wizard-hello-eddy.eddy[data-anim='hint'] .eddy-figure {
  animation: welcome-eddy-glance 1.4s cubic-bezier(0.3, 1, 0.4, 1) both;
}

.wizard-hello-eddy.eddy[data-anim='hint'] .eddy-logo-head {
  animation: welcome-eddy-look 1.4s ease-in-out both;
}

.wizard-hello-eddy.eddy[data-anim='hint'] .eddy-logo-eye {
  animation: welcome-eddy-eye-down 1.4s ease-in-out both;
}

.wizard-hello-eddy.eddy[data-anim='hint'] .eddy-logo-swoosh {
  animation: welcome-eddy-wag 1.4s ease-in-out both;
}

@keyframes welcome-eddy-glance {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  35% {
    transform: translateY(4px) rotate(3deg);
  }
  55% {
    transform: translateY(6px) rotate(4deg);
  }
  78% {
    transform: translateY(2px) rotate(1deg);
  }
}

@keyframes welcome-eddy-look {
  0%,
  100% {
    transform: rotate(0deg);
  }
  40%,
  60% {
    transform: rotate(8deg);
  }
}

@keyframes welcome-eddy-eye-down {
  0%,
  100% {
    transform: translate(0, 0);
  }
  35%,
  65% {
    transform: translate(4px, 10px);
  }
}

@keyframes welcome-eddy-wag {
  0%,
  100% {
    transform: rotate(0deg);
  }
  40%,
  60% {
    transform: rotate(-10deg);
  }
}

/* Soft URL highlight paired with Eddy's glance hint. */
.project-wizard--welcome .wizard-panel-fields > .field.is-hinted .input {
  animation: welcome-url-hint 1.35s ease-in-out both;
}

@keyframes welcome-url-hint {
  0%,
  100% {
    border-color: var(--border);
    box-shadow: none;
  }
  35%,
  55% {
    border-color: var(--primary);
    box-shadow:
      0 0 0 3px var(--primary-soft),
      0 0 0 6px var(--primary-softer);
  }
}

/* Progressive name field — expands once the URL looks real. */
.welcome-name-reveal {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  /* Cancel flex gap while collapsed so URL sits tight alone. */
  margin-top: calc(-1 * var(--sp-4) * 1.1);
  transition:
    grid-template-rows 0.34s cubic-bezier(0.3, 1, 0.4, 1),
    opacity 0.28s ease,
    margin-top 0.34s cubic-bezier(0.3, 1, 0.4, 1);
}

.welcome-name-reveal.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 0;
}

.welcome-name-reveal-inner {
  overflow: hidden;
  min-height: 0;
}

/* After the expand settles, let the focus ring paint outside the clip. */
.welcome-name-reveal.is-settled .welcome-name-reveal-inner {
  overflow: visible;
}

.welcome-name-reveal.is-open .welcome-name-field {
  animation: welcome-name-settle 0.4s cubic-bezier(0.3, 1, 0.4, 1) both;
}

@keyframes welcome-name-settle {
  from {
    transform: translateY(-6px);
  }
  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wizard-hello-eddy.eddy[data-anim='idle'] .eddy-figure,
  .wizard-hello-eddy.eddy[data-anim='idle'] .eddy-logo-eye,
  .wizard-hello-eddy.eddy[data-anim='hint'] .eddy-figure,
  .wizard-hello-eddy.eddy[data-anim='hint'] .eddy-logo-head,
  .wizard-hello-eddy.eddy[data-anim='hint'] .eddy-logo-eye,
  .wizard-hello-eddy.eddy[data-anim='hint'] .eddy-logo-swoosh,
  .welcome-name-reveal.is-open .welcome-name-field,
  .project-wizard--welcome .wizard-panel-fields > .field.is-hinted .input {
    animation: none;
  }

  .welcome-name-reveal {
    transition: none;
  }
}

/* Completion ceremony (self-setup finished). */
.setup-done--complete {
  padding: var(--sp-6) 0;
}

.setup-done--complete p {
  max-width: 46ch;
}

.setup-complete-eddy {
  /* The zzz/spark fx extend past the mark; give them air. */
  padding: var(--sp-2) var(--sp-3) 0 0;
}

/* ---------- Repo suggestion ("Is this the one?") ---------- */

.repo-suggestion {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  border: 1px solid var(--primary-ring);
  background: var(--primary-softer);
  border-radius: var(--radius-lg);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-2);
  flex-wrap: wrap;
}

.repo-suggestion-body {
  flex: 1;
  min-width: 220px;
}

.repo-suggestion-kicker {
  margin: 0 0 2px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.repo-suggestion-name {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-md);
  color: var(--ink);
  word-break: break-all;
}

.repo-suggestion-note {
  margin: 2px 0 0;
  font-size: var(--text-sm);
  color: var(--ink-3);
}

.repo-suggestion-actions {
  display: flex;
  gap: var(--sp-2);
}

.repo-picker-match {
  margin-left: auto;
}

/* ---------- Hosting autodetect suggestion ---------- */

.hosting-suggestion {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  border: 1px solid var(--primary-ring);
  background: var(--primary-softer);
  border-radius: var(--radius-lg);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}

.hosting-suggestion img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.hosting-suggestion p {
  flex: 1;
  min-width: 220px;
  margin: 0;
  font-size: var(--text-md);
  color: var(--ink-2);
}

.hosting-suggestion p strong {
  color: var(--ink);
}
