/* Spark test — compact centered card layout */

.spark-page {
  min-height: 100vh;
}

.spark-shell {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 2rem) 1.25rem 4rem;
  min-height: 100vh;
}

/* Intro only: gentle vertical center. Test/results stay top-aligned. */
.spark-shell:has(#spark-intro:not(.hidden)) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
  padding-bottom: 2rem;
}

.spark-test {
  width: 100%;
}

.spark-test .spark-card {
  width: 100%;
}

.spark-panel {
  width: 100%;
}

.spark-panel.hidden {
  display: none;
}

.spark-intro {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spark-bullets {
  list-style: none;
  text-align: left;
  margin: 0 auto 2rem;
  padding: 0;
  width: fit-content;
  max-width: 100%;
}

.spark-intro h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.spark-lead {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-width: 36rem;
}

.spark-bullets li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.625rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.spark-bullets li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1rem;
}

.spark-start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 10.5rem;
}

.spark-btn-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spark-spin 0.7s linear infinite;
  flex-shrink: 0;
}

.spark-start-btn.is-loading .spark-btn-spinner {
  display: inline-block;
}

.spark-start-btn.is-loading {
  cursor: wait;
  opacity: 0.92;
}

.spark-start-btn:disabled {
  cursor: wait;
}

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

.spark-note {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--text-dim);
}

/* Test card */
.spark-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.spark-progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.spark-bar {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.75rem;
}

.spark-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.spark-question {
  font-size: 1.125rem;
  line-height: 1.55;
  font-weight: 500;
  margin-bottom: 1.5rem;
  min-height: 3.5rem;
}

.spark-scale {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.spark-scale-hint {
  font-size: 0.6875rem;
  color: var(--text-dim);
  width: 3.5rem;
  flex-shrink: 0;
  text-align: center;
}

.spark-scale-hint:last-child {
  text-align: center;
}

.spark-choices {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
}

.spark-choice {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-bright);
  background: var(--bg-alt);
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font);
}

.spark-choice:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.spark-choice:disabled {
  opacity: 0.5;
  cursor: wait;
}

.spark-choice.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow-hi);
}

.spark-scale-caption {
  margin-top: 0.875rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
}

.spark-error {
  margin-top: 1rem;
  color: var(--red);
  font-size: 0.875rem;
  text-align: center;
}

.spark-error.hidden {
  display: none;
}

/* Results — gamified archetype card */
.spark-results {
  text-align: center;
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.spark-results h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.arcade-card {
  margin-bottom: 1.25rem;
  text-align: left;
}

.arcade-card-frame {
  position: relative;
  border-radius: 1.125rem;
  overflow: hidden;
  border: 3px solid rgba(212, 175, 120, 0.45);
  background: #121820;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.arcade-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.875rem 0.875rem 0.5rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 100%);
}

.arcade-sync-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  min-height: 3.25rem;
  padding: 0.25rem 0.5rem;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: linear-gradient(145deg, #2a2218, #1a1510);
  border: 1px solid rgba(212, 175, 120, 0.5);
}

.arcade-sync-value {
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1;
  color: #f0dcc0;
}

.arcade-sync-label {
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a89070;
  margin-top: 0.125rem;
}

.arcade-card-actions {
  display: flex;
  gap: 0.375rem;
}

.arcade-icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  color: #e8edf5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.arcade-icon-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.arcade-icon-btn:hover {
  background: rgba(79, 142, 247, 0.2);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.arcade-card-art {
  position: relative;
  aspect-ratio: 400 / 280;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
}

.arcade-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.arcade-card-art-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12) 0%, transparent 42%, transparent 100%);
  pointer-events: none;
}

.arcade-card-nameplate {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, #1e2430 0%, #161c26 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.arcade-card-class {
  font-size: 1.375rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0;
  color: #f2f6fc;
}

.arcade-card-subtitle {
  margin: 0;
  font-size: 0.8125rem;
  color: #9eb0c4;
}

.arcade-card-keywords {
  margin: 0;
  padding: 0.5rem 1rem;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a9cb0;
  background: #141a22;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.arcade-card-story {
  padding: 1rem 1rem 0.875rem;
  background: linear-gradient(180deg, #2a2620 0%, #221e18 100%);
  border-bottom: 1px solid rgba(212, 175, 120, 0.15);
}

.arcade-card-relating {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #e8e0d4;
}

.arcade-card-traits {
  list-style: none;
  margin: 0;
  padding: 0;
}

.arcade-card-traits li {
  position: relative;
  padding-left: 1.125rem;
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #c8beb0;
}

.arcade-card-traits li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.5rem;
  color: #d4af78;
}

.arcade-card-disclaimer {
  margin: 0;
  padding: 0.625rem 1rem;
  font-size: 0.6875rem;
  line-height: 1.55;
  color: #7a8494;
  background: #10141a;
  font-style: italic;
}

.arcade-card-brand {
  margin: 0;
  padding: 0.5rem 1rem 0.75rem;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: #5a6474;
  background: #0c1016;
}

.share-hook {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.spark-cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.spark-cta-row .btn {
  width: 100%;
  justify-content: center;
}

/* Archetype accent themes */
.arcade-card[data-archetype='architect'] .arcade-card-frame {
  border-color: rgba(168, 181, 160, 0.55);
}
.arcade-card[data-archetype='architect'] .arcade-sync-badge {
  border-color: rgba(168, 181, 160, 0.5);
}
.arcade-card[data-archetype='architect'] .arcade-sync-value { color: #d8e4d0; }

.arcade-card[data-archetype='creator'] .arcade-card-frame {
  border-color: rgba(158, 196, 212, 0.55);
}
.arcade-card[data-archetype='creator'] .arcade-sync-badge {
  border-color: rgba(158, 196, 212, 0.5);
}
.arcade-card[data-archetype='creator'] .arcade-sync-value { color: #d4eef8; }

.arcade-card[data-archetype='mentor'] .arcade-card-frame {
  border-color: rgba(158, 196, 168, 0.55);
}
.arcade-card[data-archetype='mentor'] .arcade-sync-badge {
  border-color: rgba(158, 196, 168, 0.5);
}
.arcade-card[data-archetype='mentor'] .arcade-sync-value { color: #d8f0e0; }

.arcade-card[data-archetype='champion'] .arcade-card-frame {
  border-color: rgba(232, 196, 168, 0.55);
}
.arcade-card[data-archetype='champion'] .arcade-sync-badge {
  border-color: rgba(232, 196, 168, 0.5);
}
.arcade-card[data-archetype='champion'] .arcade-sync-value { color: #f8dcc8; }

/* Spark shell uses shared nav responsive rules in styles.css */
body.spark-page .spark-shell,
body.spark-page .spark-panel,
body.spark-page .spark-card {
  overflow-wrap: break-word;
  min-width: 0;
}

@media (max-width: 767px) {
  body.spark-page .nav-link-waitlist {
    display: none;
  }
}

@media (max-width: 480px) {
  body.spark-page .spark-shell {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  body.spark-page .spark-shell:has(#spark-intro:not(.hidden)) {
    padding-top: var(--nav-h);
  }

  .spark-card {
    padding: 1.5rem 1rem 1.25rem;
  }

  .spark-scale {
    flex-direction: column;
    gap: 0.5rem;
  }

  .spark-scale-hint {
    width: auto;
  }

  .spark-choices {
    width: 100%;
  }

  .spark-choice {
    flex: 1;
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  .spark-start-btn {
    width: 100%;
    max-width: 20rem;
  }
}
