﻿:root {
  --bg-0: #f6fff9;
  --bg-1: #ffffff;
  --panel: rgba(255, 255, 255, 0.92);
  --stroke: rgba(23, 221, 167, 0.25);
  --text-0: #0f2a20;
  --text-1: #1d4d3c;
  --muted: #4a7f6c;
  --primary-0: #74fd57;
  --primary-1: #17dda7;
  --danger: #ff6d8a;
  --shadow-0: 0 20px 44px rgba(16, 57, 45, 0.14);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text-0);
  background:
    radial-gradient(circle at 12% 8%, rgba(116, 253, 87, 0.17), transparent 34%),
    radial-gradient(circle at 85% 12%, rgba(23, 221, 167, 0.2), transparent 36%),
    linear-gradient(152deg, var(--bg-0) 0%, var(--bg-1) 100%);
}

.page-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.quiz-shell {
  width: min(550px, 100%);
  border-radius: calc(var(--radius-lg) + 6px);
  border: 1px solid rgba(16, 57, 45, 0.12);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(249, 255, 252, 0.92));
  box-shadow: var(--shadow-0);
  backdrop-filter: blur(16px);
  padding: 22px;
}

.quiz-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(140deg, var(--primary-0), var(--primary-1));
  box-shadow: 0 0 18px rgba(116, 253, 87, 0.5);
}

.brand-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-1);
}

.step-indicator {
  margin: 0 0 0 auto;
  font-size: 0.85rem;
  color: var(--muted);
}

.progress-track {
  margin: 14px 0 22px;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(16, 57, 45, 0.12);
  overflow: hidden;
}

.progress-fill {
  display: block;
  width: 33.33%;
  height: 100%;
  background: linear-gradient(125deg, var(--primary-0), var(--primary-1));
  transition: width 260ms ease;
}

.quiz-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: var(--panel);
  padding: 24px;
}

.quiz-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1.15;
}

.quiz-subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  max-width: 60ch;
}

.quiz-form {
  margin-top: 22px;
}

.pro-section {
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid rgba(16, 57, 45, 0.14);
  border-radius: var(--radius-md);
  background: rgba(116, 253, 87, 0.08);
}

.pro-title {
  padding: 0 6px;
  color: var(--text-1);
  font-weight: 600;
}

.pro-options {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.pro-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(16, 57, 45, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-1);
  cursor: pointer;
}

.pro-option input {
  accent-color: #17dda7;
}

.license-group {
  margin-top: 12px;
}

.license-group .field-label + #purchaseEmailInput,
.license-group .field-label + #licenseInput {
  margin-bottom: 8px;
}

.license-group .field-label[for="purchaseEmailInput"] {
  margin-top: 8px;
}

#licenseInput,
#purchaseEmailInput {
  width: 100%;
  border: 1px solid rgba(16, 57, 45, 0.2);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-0);
  padding: 12px 14px;
  font: inherit;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

#licenseInput:focus,
#purchaseEmailInput:focus {
  border-color: rgba(116, 253, 87, 0.8);
  box-shadow: 0 0 0 4px rgba(116, 253, 87, 0.18);
  transform: translateY(-1px);
}

.field-label {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--text-1);
  font-weight: 500;
}

.select-wrap {
  position: relative;
}

.text-wrap #stepInput {
  width: 100%;
  min-height: 132px;
  border: 1px solid rgba(16, 57, 45, 0.2);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-0);
  padding: 14px;
  font: inherit;
  outline: none;
  resize: vertical;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.text-wrap #stepInput:focus {
  border-color: rgba(116, 253, 87, 0.8);
  box-shadow: 0 0 0 4px rgba(116, 253, 87, 0.18);
  transform: translateY(-1px);
}

select {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(16, 57, 45, 0.2);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-0);
  padding: 15px 45px 15px 14px;
  font: inherit;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

select:focus {
  border-color: rgba(116, 253, 87, 0.8);
  box-shadow: 0 0 0 4px rgba(116, 253, 87, 0.18);
  transform: translateY(-1px);
}

select option {
  color: #0f2a20;
}

.select-chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
  font-size: 1rem;
}

.error-msg {
  display: none;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 0.92rem;
}

.error-msg.visible {
  display: block;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.btn {
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.btn:not(:disabled):active {
  transform: translateY(0);
}

.btn.primary {
  color: #031f16;
  background: linear-gradient(120deg, var(--primary-0), var(--primary-1));
  box-shadow: 0 10px 24px rgba(23, 221, 167, 0.35);
}

.btn.ghost {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(16, 57, 45, 0.18);
}

.links-modal {
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: 16px;
  left: auto;
  transform: none;
  width: clamp(190px, 18vw, 300px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(16, 57, 45, 0.14);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(247, 255, 251, 0.96));
  box-shadow: 0 10px 24px rgba(10, 36, 28, 0.10);
  z-index: 50;
}

.links-modal__header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.links-modal__eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.links-modal__title {
  margin: 0;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
}

.links-modal__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.links-modal__list a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(16, 57, 45, 0.14);
  background: rgba(116, 253, 87, 0.08);
  color: var(--text-1);
  text-decoration: none;
  font-weight: 600;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.links-modal__list a::after {
  content: "↗";
  position: absolute;
  right: 16px;
  top: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.links-modal__list a {
  position: relative;
}

.links-modal__item-title {
  padding-right: 24px;
  font-size: 1rem;
  line-height: 1.2;
}

.links-modal__item-desc {
  padding-right: 24px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 400;
}

.links-modal__list a:hover {
  transform: translateY(-1px);
  border-color: rgba(23, 221, 167, 0.4);
  background: rgba(23, 221, 167, 0.12);
}

.result-pill {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 999px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: rgba(23, 221, 167, 0.16);
  border: 1px solid rgba(23, 221, 167, 0.32);
  color: #0f3f31;
  font-size: 0.92rem;
}

.email-contact-block {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(16, 57, 45, 0.14);
  border-radius: var(--radius-md);
  background: rgba(23, 221, 167, 0.08);
}

.email-contact-title {
  margin: 0 0 8px;
  color: var(--text-1);
  font-weight: 600;
}

.email-copy-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

#supportEmailInput {
  flex: 1;
  border: 1px solid rgba(16, 57, 45, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font: inherit;
  color: var(--text-0);
  background: rgba(255, 255, 255, 0.95);
}

.summary-text {
  width: 100%;
  min-height: 126px;
  border: 1px solid rgba(16, 57, 45, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font: inherit;
  color: var(--text-0);
  background: rgba(255, 255, 255, 0.95);
  resize: vertical;
}

@media (max-width: 620px) {
  .page-wrap {
    padding: 0;
    place-items: stretch;
  }

  .quiz-shell {
    width: 100vw;
    min-height: 100vh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    padding: 16px;
  }

  .quiz-card {
    padding: 16px;
  }

  .quiz-card {
    min-height: calc(100vh - 116px);
    display: flex;
    flex-direction: column;
  }

  .actions {
    justify-content: stretch;
    margin-top: auto;
    padding-top: 18px;
  }

  .btn {
    flex: 1;
  }

  .email-copy-row {
    flex-direction: column;
  }

  .step-indicator {
    width: 100%;
    margin-left: 0;
  }

  .links-modal {
    top: 12px;
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
    border-radius: 22px;
  }
}

@media (min-width: 621px) and (max-width: 1180px) {
  .links-modal {
    width: clamp(180px, 16vw, 240px);
    right: 12px;
    bottom: 12px;
  }

  .links-modal__title {
    font-size: 1.05rem;
  }

  .links-modal__eyebrow {
    font-size: 0.68rem;
  }

  .links-modal__list {
    gap: 8px;
    margin-top: 12px;
  }

  .links-modal__list a {
    padding: 10px 11px;
    border-radius: 14px;
  }

  .links-modal__item-title {
    font-size: 0.88rem;
  }

  .links-modal__item-desc {
    font-size: 0.76rem;
    line-height: 1.22;
  }

  .links-modal__list a::after {
    right: 10px;
    top: 10px;
  }
}
