.riq-root,
.riq-root * {
  box-sizing: border-box;
}

.riq-root {
  --riq-purple: #7f77dd;
  --riq-purple-dark: #534ab7;
  --riq-purple-light: #eeedfe;
  --riq-purple-pale: #f7f6ff;
  --riq-text: #1a1a2e;
  --riq-text-muted: #6b6b8a;
  --riq-border: rgba(127, 119, 221, 0.15);
  --riq-bg: #faf9ff;
  --riq-card: #ffffff;
  --riq-radius: 16px;
  position: relative;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  color: var(--riq-text);
  font-family: "DM Sans", sans-serif;
}

.riq-root::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(127, 119, 221, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 80%, rgba(212, 83, 126, 0.05) 0%, transparent 70%),
    var(--riq-bg);
}

.riq-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-top: 1rem;
}

.riq-header-eyebrow {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--riq-purple);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.riq-header h1 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(26px, 5vw, 36px);
  color: var(--riq-text);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.riq-header p {
  font-size: 15px;
  color: var(--riq-text-muted);
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto;
}

.riq-progress-wrap {
  margin-bottom: 2rem;
}

.riq-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--riq-text-muted);
  margin-bottom: 8px;
}

.riq-progress-track {
  height: 3px;
  background: var(--riq-border);
  border-radius: 99px;
  overflow: hidden;
}

.riq-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--riq-purple), #d4537e);
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.riq-q-card {
  background: var(--riq-card);
  border: 1px solid var(--riq-border);
  border-radius: var(--riq-radius);
  padding: 2rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 24px rgba(127, 119, 221, 0.06);
}

.riq-q-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--riq-purple);
  background: var(--riq-purple-light);
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 1.25rem;
}

.riq-q-scenario {
  font-family: "DM Serif Display", serif;
  font-size: clamp(16px, 3vw, 19px);
  line-height: 1.55;
  color: var(--riq-text);
}

.riq-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.riq-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: var(--riq-card);
  border: 1px solid var(--riq-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  font-family: "DM Sans", sans-serif;
}

.riq-opt:hover {
  border-color: var(--riq-purple);
  background: var(--riq-purple-pale);
}

.riq-opt.riq-selected {
  border-color: var(--riq-purple);
  background: var(--riq-purple-light);
}

.riq-opt-letter {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--riq-purple-light);
  color: var(--riq-purple-dark);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s;
}

.riq-selected .riq-opt-letter {
  background: var(--riq-purple);
  color: #ffffff;
}

.riq-opt-text {
  font-size: 14px;
  color: var(--riq-text);
  line-height: 1.55;
  padding-top: 3px;
}

.riq-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 1rem;
}

.riq-btn {
  padding: 11px 22px;
  border-radius: 99px;
  border: 1px solid var(--riq-border);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  color: var(--riq-text-muted);
  background: var(--riq-card);
}

.riq-btn:hover:not(:disabled) {
  border-color: var(--riq-purple);
  color: var(--riq-purple);
}

.riq-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.riq-btn.riq-primary {
  background: var(--riq-purple);
  color: #ffffff;
  border-color: var(--riq-purple);
}

.riq-btn.riq-primary:hover:not(:disabled) {
  background: var(--riq-purple-dark);
  border-color: var(--riq-purple-dark);
  color: #ffffff;
}

.riq-btn.riq-primary:disabled {
  opacity: 0.4;
}

.riq-result-view[hidden] {
  display: none;
}

.riq-result-header {
  text-align: center;
  margin-bottom: 2rem;
}

.riq-result-eyebrow {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--riq-text-muted);
  margin-bottom: 0.5rem;
}

.riq-result-profile-name {
  font-family: "DM Serif Display", serif;
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.riq-result-desc {
  font-size: 15px;
  color: var(--riq-text-muted);
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto;
}

.riq-result-card {
  background: var(--riq-card);
  border: 1px solid var(--riq-border);
  border-radius: var(--riq-radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 24px rgba(127, 119, 221, 0.06);
}

.riq-result-card-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--riq-text-muted);
  margin-bottom: 1rem;
}

.riq-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.riq-pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.riq-pill {
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid;
}

.riq-strength {
  background: #e1f5ee;
  color: #0f6e56;
  border-color: rgba(15, 110, 86, 0.2);
}

.riq-edge {
  background: #faeeda;
  color: #854f0b;
  border-color: rgba(133, 79, 11, 0.2);
}

.riq-score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.riq-score-label {
  font-size: 13px;
  color: var(--riq-text-muted);
  min-width: 185px;
}

.riq-score-track {
  flex: 1;
  background: var(--riq-border);
  border-radius: 99px;
  height: 5px;
  overflow: hidden;
}

.riq-score-fill {
  height: 5px;
  border-radius: 99px;
  width: 0;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.riq-score-num {
  font-size: 13px;
  color: var(--riq-text-muted);
  min-width: 16px;
  text-align: right;
}

.riq-pattern-row {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--riq-border);
  font-size: 13px;
}

.riq-pattern-row:last-child {
  border-bottom: none;
}

.riq-pattern-name {
  font-weight: 500;
  color: var(--riq-text);
  min-width: 160px;
  flex-shrink: 0;
}

.riq-pattern-interp {
  color: var(--riq-text-muted);
  line-height: 1.55;
}

.riq-restart-wrap {
  text-align: center;
  margin-top: 1.5rem;
}

@media (max-width: 500px) {
  .riq-root {
    padding-inline: 0;
  }

  .riq-q-card,
  .riq-result-card {
    padding: 1.25rem;
  }

  .riq-two-col {
    grid-template-columns: 1fr;
  }

  .riq-score-label {
    min-width: 130px;
    font-size: 12px;
  }

  .riq-pattern-row {
    flex-direction: column;
    gap: 4px;
  }
}

.riq-lead-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.riq-lead-form input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--riq-border);
  border-radius: 12px;
  background: #fff;
  font-size: 16px;
  color: var(--riq-text);
  transition: all 0.2s ease;
}

.riq-lead-form input:focus {
  outline: none;
  border-color: var(--riq-purple);
  box-shadow: 0 0 0 4px rgba(127, 119, 221, 0.12);
}

.riq-lead-form .riq-btn {
  margin-top: 8px;
  width: 100%;
  border-radius: 8px;
}
