/* ============================================================
   Start Your Project — Gateway Styles
   Dual-path entry into TradeForge OS
   ============================================================ */

/* --- Gateway Hero --- */
.sp-gateway-headline {
  text-align: center;
  font-size: 28px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 8px 0 0;
}
.sp-gateway-subtext {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 10px 0 0;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Dual-Path Grid --- */
.sp-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* --- Dual-Path Card --- */
.sp-dual-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  width: 100%;
  padding: 28px 20px;
  background: var(--panel);
  border: 1px solid rgba(140,106,62,.18);
  border-radius: 16px;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  font-size: inherit;
  transition: border-color .18s ease, transform .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.sp-dual-card:hover {
  border-color: rgba(140,106,62,.55);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.sp-dual-card:active {
  transform: translateY(0);
}

.sp-dual-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(140,106,62,.12);
  color: var(--bronze);
}

.sp-dual-title {
  font-size: 18px;
  font-weight: 750;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}
.sp-dual-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
  max-width: 240px;
}
.sp-dual-cta {
  margin-top: 4px;
  font-size: 13px;
  pointer-events: none;
}

/* --- Required field marker --- */
.sp-required {
  color: var(--bronze);
  font-weight: 600;
}

/* --- Form Error --- */
.sp-form-error {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(220,53,69,.12);
  border: 1px solid rgba(220,53,69,.3);
  color: #f5a0a8;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 10px;
}
.sp-form-error .sp-retry-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 12px;
  background: rgba(220,53,69,.15);
  border: 1px solid rgba(220,53,69,.3);
  border-radius: 6px;
  color: #f5a0a8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.sp-form-error .sp-retry-btn:hover {
  background: rgba(220,53,69,.25);
}

/* --- Back Button --- */
.sp-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 4px;
  margin-bottom: 12px;
  font-family: inherit;
  transition: color .15s;
}
.sp-back-btn:hover {
  color: #fff;
}
.sp-back-btn svg {
  flex-shrink: 0;
}

/* --- Flow Panels --- */
.sp-flow {
  display: none;
}
.sp-flow.active {
  display: block;
  animation: sp-flow-in .22s ease;
}
@keyframes sp-flow-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Flow guidance text --- */
.sp-flow-guidance {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 0;
  line-height: 1.5;
}

/* --- Legacy path cards (kept for portal pages) --- */
.sp-path-grid {
  display: grid;
  gap: 12px;
}
.sp-path-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 16px;
  background: var(--panel);
  border: 1px solid rgba(140,106,62,.18);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-family: inherit;
  font-size: inherit;
  transition: border-color .18s ease, transform .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.sp-path-card:hover {
  border-color: rgba(140,106,62,.55);
  transform: translateY(-1px);
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.sp-path-card:active {
  transform: translateY(0);
}
.sp-path-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(140,106,62,.12);
  color: var(--bronze);
}
.sp-path-content {
  flex: 1;
  min-width: 0;
}
.sp-path-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.25;
}
.sp-path-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
  line-height: 1.45;
}
.sp-path-cta {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 650;
  color: var(--bronze);
  letter-spacing: .02em;
}

/* --- Empty State Guidance --- */
.sp-empty-guidance {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(181,183,185,.1);
  border-radius: 12px;
  background: rgba(15,17,20,.25);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sp-guidance-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.sp-guidance-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(140,106,62,.15);
  color: var(--bronze);
  font-size: 12px;
  font-weight: 700;
}

/* --- Action Card List --- */
.sp-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.sp-action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(181,183,185,.1);
  border-radius: 12px;
  background: rgba(15,17,20,.2);
  transition: border-color .18s, background .18s;
  text-decoration: none;
}
.sp-action-card:hover {
  border-color: rgba(140,106,62,.4);
  background: rgba(140,106,62,.06);
  text-decoration: none;
}
.sp-action-card-inner {
  flex: 1;
  min-width: 0;
}
.sp-action-card-inner h3 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}
.sp-action-card-inner p {
  font-size: 12px;
  color: var(--muted);
  margin: 3px 0 0;
  line-height: 1.45;
}
.sp-action-arrow {
  flex-shrink: 0;
  color: var(--muted);
  opacity: .5;
}
.sp-action-card:hover .sp-action-arrow {
  color: var(--bronze);
  opacity: 1;
}

/* --- Form helpers --- */
.sp-panel { display: none }
.sp-panel.active { display: block }

.sp-group-title { font-size: 14px; font-weight: 700; color: #fff; margin-top: 10px }
.sp-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px }

/* --- Responsive --- */
@media (max-width: 900px) {
  .sp-two-col { grid-template-columns: 1fr }
}
@media (max-width: 600px) {
  .sp-dual-grid { grid-template-columns: 1fr }
  .sp-gateway-headline { font-size: 24px }
  .sp-dual-card { padding: 22px 16px }
}

/* --- Submit button with inline spinner --- */
.sp-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.sp-submit-btn .sp-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: sp-spin .7s linear infinite;
}
.sp-submit-btn.is-loading .sp-spinner { display: inline-block; }
.sp-submit-btn[disabled] { opacity: .75; cursor: progress; }

@keyframes sp-spin {
  to { transform: rotate(360deg); }
}

/* --- Confirmation state --- */
.sp-success {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid rgba(80, 170, 120, .35);
  background: rgba(60, 150, 100, .10);
  color: var(--text);
}
.sp-success-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(80, 170, 120, .18);
  color: #6ad59a;
}
.sp-success-body h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}
.sp-success-body p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.sp-dots span {
  display: inline-block;
  animation: sp-dot 1.2s infinite;
  opacity: .3;
}
.sp-dots span:nth-child(2) { animation-delay: .2s; }
.sp-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes sp-dot {
  0%, 60%, 100% { opacity: .3; }
  30% { opacity: 1; }
}
