/* Syntonia Research — Mobile-first, no external dependencies */

:root {
  --bg:          #001A1C;
  --surface:     rgba(0, 242, 255, 0.04);
  --surface-2:   rgba(0, 242, 255, 0.08);
  --border:      rgba(0, 242, 255, 0.14);
  --accent:      #00F2FF;
  --orange:      #FF8A00;
  --text:        #E0F5F8;
  --text-muted:  rgba(224, 245, 248, 0.55);
  --green:       #52C41A;
  --yellow:      #FFB020;
  --red:         #FF4D4F;
  --radius:      14px;
  --radius-sm:   8px;
  --max-w:       520px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  padding: 0 0 60px;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 16px;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.logo-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.logo-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.card-accent {
  border-left: 3px solid var(--orange);
  background: rgba(255, 138, 0, 0.05);
}

/* ── Typography ──────────────────────────────────────────────────────────── */

h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 8px;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.body-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.body-text + .body-text { margin-top: 10px; }

.important-list {
  margin-top: 12px;
  padding-left: 0;
  list-style: none;
}

.important-list li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 3px 0 3px 16px;
  position: relative;
}

.important-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--orange);
}

/* ── Progress ────────────────────────────────────────────────────────────── */

.progress-wrap {
  margin-bottom: 20px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.progress-label {
  font-size: 13px;
  color: var(--text-muted);
}

.progress-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.progress-bar-bg {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--orange));
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ── GYR Badge ───────────────────────────────────────────────────────────── */

.gyr-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.gyr-green  { background: rgba(82, 196, 26, 0.12);  color: var(--green);  border: 1px solid rgba(82, 196, 26, 0.3);  }
.gyr-yellow { background: rgba(255, 176, 32, 0.12); color: var(--yellow); border: 1px solid rgba(255, 176, 32, 0.3); }
.gyr-red    { background: rgba(255, 77, 79, 0.12);  color: var(--red);    border: 1px solid rgba(255, 77, 79, 0.3);  }

.gyr-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.gyr-green  .gyr-dot { background: var(--green); }
.gyr-yellow .gyr-dot { background: var(--yellow); }
.gyr-red    .gyr-dot { background: var(--red); }

/* ── Scenario content ────────────────────────────────────────────────────── */

.scene-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.scene-text-content {
  font-size: 15px;
  color: var(--text);
  line-height: 1.55;
}

.question-box {
  background: rgba(0, 242, 255, 0.06);
  border: 1px solid rgba(0, 242, 255, 0.18);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.question-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}

.question-text {
  font-size: 16px;
  color: var(--text);
  line-height: 1.5;
  font-style: italic;
}

/* ── Options ─────────────────────────────────────────────────────────────── */

.options-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.option-item:hover {
  border-color: rgba(0, 242, 255, 0.35);
  background: var(--surface-2);
}

.option-item.selected {
  border-color: var(--accent);
  background: rgba(0, 242, 255, 0.08);
}

.option-item input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(0, 242, 255, 0.4);
  background: transparent;
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.option-item.selected input[type="radio"] {
  border-color: var(--accent);
  background: radial-gradient(circle, var(--accent) 40%, transparent 40%);
  box-shadow: 0 0 0 1px var(--accent);
}

.option-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.45;
}

/* ── Text fields ─────────────────────────────────────────────────────────── */

.field-group {
  margin-bottom: 16px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.privacy-hint {
  font-size: 12px;
  color: var(--orange);
  margin-bottom: 6px;
  line-height: 1.4;
}

textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  padding: 12px 14px;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.15s;
  outline: none;
}

textarea::placeholder { color: var(--text-muted); }

textarea:focus {
  border-color: rgba(0, 242, 255, 0.4);
  background: var(--surface-2);
}

/* ── Age grid ────────────────────────────────────────────────────────────── */

.age-section {
  margin-bottom: 20px;
}

.age-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: block;
}

.age-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.age-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
  line-height: 1.3;
}

.age-btn:hover {
  border-color: rgba(0, 242, 255, 0.35);
  background: var(--surface-2);
}

.age-btn.selected {
  border-color: var(--accent);
  background: rgba(0, 242, 255, 0.1);
  color: var(--accent);
  font-weight: 600;
}

/* ── Consent ─────────────────────────────────────────────────────────────── */

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 138, 0, 0.05);
  border: 1px solid rgba(255, 138, 0, 0.2);
  border-radius: var(--radius);
  margin-bottom: 20px;
  cursor: pointer;
}

.consent-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 5px;
  border: 2px solid rgba(255, 138, 0, 0.5);
  background: transparent;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.consent-row input[type="checkbox"]:checked {
  background: var(--orange);
  border-color: var(--orange);
}

.consent-row input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 6px; height: 10px;
  border: 2px solid #001A1C;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.consent-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  cursor: pointer;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
  outline: none;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #00C9D4);
  color: #001A1C;
  width: 100%;
}

.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  flex: 1;
}

.btn-ghost:hover {
  border-color: rgba(0, 242, 255, 0.3);
  color: var(--text);
}

.btn-skip {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 13px;
  padding: 13px 16px;
}

.btn-skip:hover { color: var(--text); }

.nav-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.nav-row .btn-primary { flex: 2; width: auto; }

/* ── Error ───────────────────────────────────────────────────────────────── */

.error-msg {
  background: rgba(255, 77, 79, 0.1);
  border: 1px solid rgba(255, 77, 79, 0.3);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 13px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

/* ── Thank you screen ────────────────────────────────────────────────────── */

.done-screen {
  text-align: center;
  padding: 40px 0;
}

.done-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.done-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

.done-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 340px;
  margin: 0 auto;
}

/* ── Loading ─────────────────────────────────────────────────────────────── */

.loading {
  text-align: center;
  padding: 80px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Divider ─────────────────────────────────────────────────────────────── */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ── Honeypot ────────────────────────────────────────────────────────────── */
.hp-field { display: none !important; }
