/* OHC Styles - GrowthPains Brand v1.1 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  --green: #2E8B57;
  --green-light: #e8f5e9;
  --charcoal: #737373;
  --offwhite: #F7F7F7;
  --white: #FFFFFF;
  --taupe: #B8A58B;
  --blue: #3A8FD0;
  --high-bg: #FFF0F0;
  --high-text: #C62828;
  --medium-bg: #FFF8E1;
  --medium-text: #E65100;
  --low-bg: #E8F5E9;
  --low-text: #2E7D32;
}

html { font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--charcoal);
  background: var(--offwhite);
  line-height: 1.6em;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

/* Hide all steps except active */
.step { display: none; }
.step.active { display: block; }

/* Progress bar */
.progress-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 32px;
}

.progress-segment {
  flex: 1;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  transition: background 0.3s;
}

.progress-segment.filled {
  background: var(--green);
}

/* Back button */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--charcoal);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 24px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}
.back-link:hover { color: var(--green); }
.back-link svg { width: 16px; height: 16px; }

/* Section headings - matches SS typography */
.section-label {
  font-size: 1.75rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--green);
  margin-bottom: 16px;
  line-height: 1.25em;
}

.step-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 24px;
  line-height: 1.25em;
}

/* Form fields */
.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 6px;
  line-height: 1.6em;
  letter-spacing: -0.01em;
}

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 2px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
  color: #333;
  transition: border-color 0.2s;
  line-height: 1.6em;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
}

.field textarea {
  min-height: 80px;
  resize: vertical;
}

/* Honeypot */
.hp-field { position: absolute; left: -9999px; opacity: 0; }

/* Question blocks */
.question-block {
  margin-bottom: 28px;
}

.question-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 6px;
  line-height: 1.6em;
  letter-spacing: -0.01em;
}

.question-text {
  font-size: 1rem;
  color: var(--charcoal);
  margin-bottom: 12px;
  line-height: 1.6em;
}

/* Radio toggle bar */
.toggle-bar {
  display: flex;
  gap: 0;
  border: 1px solid #ddd;
  border-radius: 2px;
  overflow: hidden;
  background: var(--white);
}

.toggle-bar label {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--charcoal);
  border-right: 1px solid #ddd;
  user-select: none;
}

.toggle-bar label:last-child { border-right: none; }
.toggle-bar input { display: none; }

.toggle-bar label.selected {
  background: var(--green);
  color: var(--white);
}

/* Buttons - matches SS: weight 500, capitalize, letter-spacing 0.02em, 2px radius */
.btn-primary {
  display: inline-block;
  margin-top: 56px;
  background: var(--green);
  color: var(--white);
  border: none;
  padding: 12px 32px;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 2px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
  text-decoration: none;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

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

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--green);
  border: 1.5px solid var(--green);
  padding: 10px 28px;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 2px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  text-decoration: none;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

.btn-secondary:hover {
  background: var(--green);
  color: var(--white);
}

/* Capture form */
.capture-heading {
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--green);
  margin-bottom: 4px;
  line-height: 1.25em;
}

.capture-sub {
  font-size: 1rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 24px;
  line-height: 1.6em;
  letter-spacing: -0.01em;
}

.email-helper {
  font-size: 1rem;
  color: var(--charcoal);
  margin-top: 4px;
}

.consent-line {
  font-size: 0.75rem;
  color: var(--charcoal);
  margin-top: 16px;
}

.consent-line a {
  color: var(--blue);
  text-decoration: none;
}

.consent-line a:hover { text-decoration: underline; }

/* Results page - white background wrapper */
#step-results {
  background: var(--white);
  padding: 40px 28px 48px;
  border-radius: 0;
  margin: -32px -20px -48px;
}

.results-header {
  margin-bottom: 8px;
}

.results-confirm {
  font-size: 0.875rem;
  color: #999;
  margin-bottom: 24px;
}

.overall-statement {
  font-size: 1rem;
  color: var(--green);
  line-height: 1.6em;
  margin-bottom: 32px;
}

/* Priority sequence */
.priority-sequence {
  margin-bottom: 36px;
}

.priority-sequence h3 {
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--green);
  margin-bottom: 16px;
  line-height: 1.25em;
}

.priority-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.priority-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-top: 2px;
}

.priority-content {
  flex: 1;
}

.priority-area-name {
  font-weight: 500;
  color: #333;
  font-size: 1.375rem;
  margin-bottom: 2px;
  line-height: 1.25em;
}

.priority-rationale {
  font-size: 1rem;
  color: var(--charcoal);
  line-height: 1.6em;
}

/* Area findings */
.area-section {
  margin-bottom: 36px;
}

.area-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--offwhite);
}

.area-heading h3 {
  font-size: 1.375rem;
  font-weight: 500;
  color: #333;
  line-height: 1.25em;
}

.priority-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-high { background: var(--high-bg); color: var(--high-text); }
.badge-medium { background: var(--medium-bg); color: var(--medium-text); }
.badge-low { background: var(--low-bg); color: var(--low-text); }

/* Finding card */
.finding-card {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--offwhite);
}

.finding-card:last-child { border-bottom: none; padding-bottom: 0; }

.finding-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
  line-height: 1.25em;
}

.finding-question {
  background: rgba(46, 139, 87, 0.06);
  padding: 14px 16px;
  border-radius: 2px;
  margin-bottom: 12px;
}

.finding-answer {
  font-size: 1rem;
  margin-bottom: 12px;
}

.finding-answer strong { color: #333; }

.finding-detail {
  margin-bottom: 10px;
}

.finding-detail-label {
  font-size: 1rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  margin-bottom: 4px;
  line-height: 1.6em;
}

.finding-detail p {
  font-size: 1rem;
  line-height: 1.6em;
  color: var(--charcoal);
}

.finding-badge { display: none; }

/* Friction line */
.friction-line {
  font-size: 1rem;
  color: var(--charcoal);
  line-height: 1.6em;
  margin-bottom: 36px;
  padding-top: 8px;
}

/* CTA section */
.cta-section {
  background: rgba(46, 139, 87, 0.06);
  padding: 28px 24px;
  border-radius: 2px;
  text-align: center;
  margin-bottom: 24px;
}

.cta-section p {
  font-size: 1rem;
  color: var(--charcoal);
  line-height: 1.6em;
  margin-bottom: 12px;
}

.cta-section p:last-of-type { margin-bottom: 20px; }

.cta-section .btn-primary {
  padding: 14px 40px;
  font-size: 1rem;
}

/* Share links */
.share-links {
  text-align: center;
  font-size: 0.875rem;
  color: #999;
  margin-bottom: 32px;
}

.share-links a,
.share-links button {
  color: var(--blue);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
}

.share-links a:hover,
.share-links button:hover { text-decoration: underline; }

.share-links .sep {
  margin: 0 10px;
  color: #ccc;
}

/* Second email modal/inline */
.second-email-row {
  display: none;
  margin-top: 12px;
  text-align: center;
}

.second-email-row.visible { display: block; }

.second-email-row input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 2px;
  font-size: 0.875rem;
  font-family: inherit;
  width: 240px;
  margin-right: 8px;
}

.second-email-row button {
  padding: 8px 16px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 2px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.second-email-status {
  font-size: 0.875rem;
  color: var(--green);
  margin-top: 6px;
}

/* Copy confirmation */
.copy-confirm {
  font-size: 0.875rem;
  color: var(--green);
  display: inline-block;
  margin-left: 6px;
}

/* Caveat */
.caveat {
  font-size: 0.875rem;
  color: #bbb;
  line-height: 1.6em;
  text-align: center;
  margin-top: 24px;
}

/* Loading spinner */
.spinner {
  display: none;
  text-align: center;
  padding: 60px 0;
}

.spinner.active { display: block; }

.spinner-circle {
  width: 40px;
  height: 40px;
  border: 3px solid #eee;
  border-top-color: var(--green);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}

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

.spinner-text {
  font-size: 0.875rem;
  color: #999;
}

/* Error */
.error-msg {
  color: var(--high-text);
  font-size: 0.875rem;
  margin-top: 4px;
}

/* Validation highlight */
.field.invalid input,
.field.invalid select {
  border-color: var(--high-text);
}

.question-block.invalid .toggle-bar {
  border-color: var(--high-text);
}

/* Responsive */
@media (max-width: 480px) {
  .container { padding: 24px 16px 40px; }

  #step-results {
    margin: -24px -16px -40px;
    padding: 24px 16px;
  }

  .toggle-bar label {
    font-size: 0.75rem;
    padding: 10px 4px;
  }

  .second-email-row input { width: 100%; margin-bottom: 8px; margin-right: 0; }
  .second-email-row button { width: 100%; }
  .second-email-row { display: none; }
  .second-email-row.visible { display: flex; flex-direction: column; gap: 8px; align-items: center; }

  .cta-section { padding: 24px 16px; }
  .cta-section .btn-primary { width: 100%; }
}

/* Remove extra margin on buttons inside specific contexts */
.cta-section .btn-primary { margin-top: 0; }
.second-email-row button { margin-top: 0; }
form .btn-primary { margin-top: 32px; }

.finding-question .finding-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
  line-height: 1.25em;
}
.finding-question .finding-q-text {
  font-size: 1rem;
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.6em;
}

.impact-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.impact-row .priority-badge {
  font-size: 0.6875rem;
}
