/* ==========================================================================
   MyCMMC.org — Quiz Stylesheet
   Extends style.css design system
   ========================================================================== */

/* ==========================================================================
   Quiz Layout
   ========================================================================== */

.quiz-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}

/* Quiz-specific header (slightly different from index) */
.quiz-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.quiz-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.quiz-header .logo {
  color: white;
}

.quiz-header .logo-svg { height: 26px; }

.quiz-back-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition-fast);
  text-decoration: none;
}

.quiz-back-link:hover {
  color: rgba(255,255,255,0.9);
}

.quiz-back-link svg {
  width: 14px;
  height: 14px;
}

.quiz-header-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.quiz-progress-container {
  background: rgba(255,255,255,0.1);
  height: 3px;
  width: 100%;
  position: sticky;
  top: 60px;
  z-index: 99;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--amber);
  border-radius: 0 2px 2px 0;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 8px rgba(212, 146, 11, 0.5);
}

/* ==========================================================================
   Quiz Stage Container
   ========================================================================== */

.quiz-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.quiz-stage-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-10) var(--container-px) var(--space-16);
  min-height: auto;
}

/* Phase label + question counter */
.quiz-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  animation: fadeSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.quiz-phase-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-blue);
  background: rgba(74,127,181,0.1);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(74,127,181,0.2);
}

.quiz-question-counter {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-light);
}

/* ==========================================================================
   Question Card
   ========================================================================== */

.quiz-question-card {
  width: 100%;
  max-width: 760px;
  animation: fadeSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quiz-question-text {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.25;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  max-width: 680px;
}

.quiz-question-helper {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-8);
  max-width: 60ch;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.quiz-question-helper svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--steel-blue);
}

/* ==========================================================================
   Answer Option Cards
   ========================================================================== */

.quiz-options {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
}

.quiz-options--grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.quiz-options--grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.quiz-options--list {
  grid-template-columns: 1fr;
}

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
  color: var(--color-text);
  width: 100%;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.quiz-option:hover {
  border-color: var(--steel-blue);
  background: rgba(74,127,181,0.04);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.quiz-option.selected {
  border-color: var(--steel-blue);
  background: rgba(74,127,181,0.08);
  box-shadow: 0 0 0 1px var(--steel-blue), var(--shadow-sm);
}

.quiz-option.selected .option-icon {
  background: var(--steel-blue);
  color: white;
  border-color: var(--steel-blue);
}

/* Urgency option */
.quiz-option.option-urgent {
  border-color: rgba(212,146,11,0.4);
  background: rgba(212,146,11,0.04);
}

.quiz-option.option-urgent:hover {
  border-color: var(--amber);
  background: rgba(212,146,11,0.08);
}

.quiz-option.option-urgent.selected {
  border-color: var(--amber);
  background: rgba(212,146,11,0.1);
  box-shadow: 0 0 0 1px var(--amber), var(--shadow-sm);
}

.option-urgency-badge {
  position: absolute;
  top: -1px;
  right: 14px;
  background: var(--amber);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 0 0 6px 6px;
}

.option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
  transition: all var(--transition-fast);
  color: var(--steel-blue);
}

.option-icon svg {
  width: 20px;
  height: 20px;
}

.option-content {
  flex: 1;
  min-width: 0;
}

.option-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.35;
  display: block;
  margin-bottom: 2px;
}

.option-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
  display: block;
}

/* Multi-select indicator */
.option-check {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid var(--color-border);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.option-check svg {
  width: 11px;
  height: 11px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.quiz-option.selected .option-check {
  background: var(--steel-blue);
  border-color: var(--steel-blue);
}

.quiz-option.selected .option-check svg {
  opacity: 1;
}

/* "Safe to select" option styling */
.quiz-option.option-safe {
  border-style: dashed;
  border-color: var(--color-border);
}

.quiz-option.option-safe:hover {
  border-style: solid;
}

/* Other text input option */
.quiz-option-other {
  grid-column: 1 / -1;
}

.other-input-wrapper {
  width: 100%;
  margin-top: var(--space-3);
  display: none;
}

.quiz-option.selected .other-input-wrapper {
  display: block;
}

.other-input-wrapper input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  border: 2px solid var(--steel-blue);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-fast);
}

.other-input-wrapper input:focus {
  border-color: var(--steel-blue-light);
  box-shadow: 0 0 0 3px rgba(74,127,181,0.15);
}

.other-input-wrapper input::placeholder {
  color: var(--color-text-light);
}

/* Multi-select note */
.quiz-multiselect-note {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  font-style: italic;
  margin-bottom: var(--space-4);
}

/* ==========================================================================
   Navigation Buttons
   ========================================================================== */

.quiz-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  max-width: 760px;
}

.quiz-btn-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: all var(--transition-fast);
  cursor: pointer;
  font-family: var(--font-sans);
}

.quiz-btn-back:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
  background: var(--color-bg-alt);
}

.quiz-btn-back svg {
  width: 14px;
  height: 14px;
}

.quiz-btn-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  color: white;
  background: var(--navy);
  border: 2px solid var(--navy);
  padding: 12px 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quiz-btn-next:hover {
  background: var(--steel-blue);
  border-color: var(--steel-blue);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(74,127,181,0.25);
}

.quiz-btn-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.quiz-btn-next svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.quiz-btn-next:not(:disabled):hover svg {
  transform: translateX(3px);
}

/* ==========================================================================
   Results Page
   ========================================================================== */

.quiz-results {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: var(--space-12) var(--container-px) var(--space-20);
  animation: fadeSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Results hero */
.results-hero {
  background: var(--navy);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-12);
  margin-bottom: var(--space-8);
  position: relative;
  overflow: hidden;
  color: white;
}

.results-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 600 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='grid' width='40' height='40' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 40 0 L 0 0 0 40' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='600' height='300' fill='url(%23grid)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.results-hero-content { position: relative; z-index: 1; }

.results-level-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--space-3);
}

.results-level-display {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.results-level-number {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 7vw, 4rem);
  color: white;
  line-height: 1;
}

.results-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212,146,11,0.2);
  border: 1px solid rgba(212,146,11,0.4);
  color: var(--amber-light);
  font-size: var(--text-sm);
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.results-level-explanation {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.72);
  max-width: 560px;
  line-height: 1.65;
}

/* SPRS Score gauge */
.results-score-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-10);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.results-score-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-6);
  flex-wrap: wrap;
}

.results-score-title {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.results-score-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: none;
}

.results-score-number {
  font-family: var(--font-serif);
  font-size: var(--text-5xl);
  line-height: 1;
  font-weight: 400;
}

.results-score-number.score-red { color: #C0392B; }
.results-score-number.score-yellow { color: var(--amber); }
.results-score-number.score-green { color: #27AE60; }

.results-score-denom {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-weight: 400;
}

/* Gauge bar */
.score-gauge-track {
  height: 12px;
  background: var(--color-bg-alt);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: var(--space-3);
  border: 1px solid var(--color-border);
}

.score-gauge-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.score-gauge-fill.fill-red {
  background: linear-gradient(90deg, #E74C3C, #C0392B);
}

.score-gauge-fill.fill-yellow {
  background: linear-gradient(90deg, var(--amber-light), var(--amber));
}

.score-gauge-fill.fill-green {
  background: linear-gradient(90deg, #2ECC71, #27AE60);
}

.score-gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-light);
}

.score-verdict {
  margin-top: var(--space-5);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.55;
}

.score-verdict.verdict-red {
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.2);
  color: #C0392B;
}

.score-verdict.verdict-yellow {
  background: rgba(212,146,11,0.08);
  border: 1px solid rgba(212,146,11,0.25);
  color: #A07208;
}

.score-verdict.verdict-green {
  background: rgba(39,174,96,0.08);
  border: 1px solid rgba(39,174,96,0.25);
  color: #1E8449;
}

[data-theme="dark"] .score-verdict.verdict-red { color: #E74C3C; }
[data-theme="dark"] .score-verdict.verdict-yellow { color: var(--amber-light); }
[data-theme="dark"] .score-verdict.verdict-green { color: #2ECC71; }

/* Key Findings */
.results-findings {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-10);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.results-section-title {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.results-section-title .section-title-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(74,127,181,0.1);
  border: 1px solid rgba(74,127,181,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--steel-blue);
}

.results-section-title .section-title-icon svg {
  width: 14px;
  height: 14px;
}

.findings-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.finding-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid;
}

.finding-item.finding-critical {
  background: rgba(192,57,43,0.05);
  border-color: rgba(192,57,43,0.2);
}

.finding-item.finding-major {
  background: rgba(212,146,11,0.05);
  border-color: rgba(212,146,11,0.2);
}

.finding-item.finding-positive {
  background: rgba(39,174,96,0.05);
  border-color: rgba(39,174,96,0.2);
}

.finding-item.finding-info {
  background: rgba(74,127,181,0.05);
  border-color: rgba(74,127,181,0.2);
}

.finding-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.finding-critical .finding-icon { background: rgba(192,57,43,0.15); color: #C0392B; }
.finding-major .finding-icon { background: rgba(212,146,11,0.15); color: var(--amber); }
.finding-positive .finding-icon { background: rgba(39,174,96,0.15); color: #27AE60; }
.finding-info .finding-icon { background: rgba(74,127,181,0.15); color: var(--steel-blue); }

.finding-icon svg { width: 11px; height: 11px; }

.finding-text {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-text);
  max-width: none;
}

.finding-text strong {
  font-weight: 600;
  display: block;
  margin-bottom: 1px;
}

.finding-control {
  font-size: var(--text-xs);
  font-family: monospace;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
}

/* Cost estimate */
.results-cost {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-10);
  margin-bottom: var(--space-6);
}

.cost-comparison-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-6);
  align-items: center;
  margin-top: var(--space-6);
}

.cost-col {
  text-align: center;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
}

.cost-col--traditional {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.cost-col--mycmmc {
  background: var(--navy);
  border: 2px solid var(--steel-blue);
}

.cost-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
  display: block;
}

.cost-col--mycmmc .cost-label {
  color: rgba(255,255,255,0.5);
}

.cost-range {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  color: var(--color-text);
  line-height: 1.1;
  margin-bottom: var(--space-2);
  display: block;
}

.cost-col--mycmmc .cost-range {
  color: var(--amber-light);
}

.cost-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  max-width: none;
  line-height: 1.5;
}

.cost-col--mycmmc .cost-note {
  color: rgba(255,255,255,0.5);
}

.cost-vs {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cost-savings-note {
  text-align: center;
  margin-top: var(--space-5);
  font-size: var(--text-sm);
  color: var(--steel-blue);
  font-weight: 600;
}

/* Recommended next steps */
.results-next-steps {
  margin-bottom: var(--space-8);
}

.next-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.next-step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-10) var(--space-10);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.next-step-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--steel-blue);
}

.next-step-card--featured {
  border-color: var(--steel-blue);
  background: linear-gradient(160deg, rgba(74,127,181,0.06), rgba(74,127,181,0.02));
}

.next-step-badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
}

.next-step-badge--free {
  background: rgba(39,174,96,0.12);
  color: #27AE60;
  border: 1px solid rgba(39,174,96,0.25);
}

.next-step-badge--match {
  background: rgba(74,127,181,0.12);
  color: var(--steel-blue);
  border: 1px solid rgba(74,127,181,0.25);
}

.next-step-badge--docs {
  background: rgba(212,146,11,0.12);
  color: var(--amber);
  border: 1px solid rgba(212,146,11,0.25);
}

.next-step-title {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.next-step-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  flex: 1;
  max-width: none;
}

/* Lead Capture Form */
.lead-form-container {
  background: var(--color-surface);
  border: 2px solid var(--steel-blue);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-10);
  margin-bottom: var(--space-8);
  display: none;
  animation: fadeSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.lead-form-container.visible {
  display: block;
}

.lead-form-title {
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.lead-form-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  max-width: none;
}

.lead-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.form-field label .required {
  color: #C0392B;
  margin-left: 2px;
}

.form-field label .optional {
  color: var(--color-text-light);
  font-weight: 400;
  font-size: var(--text-xs);
  margin-left: 4px;
}

.form-field input,
.form-field select {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--steel-blue);
  box-shadow: 0 0 0 3px rgba(74,127,181,0.15);
}

.form-field input::placeholder {
  color: var(--color-text-light);
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1L6 7L11 1' stroke='%235A6580' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.lead-form-submit {
  margin-top: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.lead-form-privacy {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: none;
}

.lead-form-privacy svg {
  width: 13px;
  height: 13px;
  color: var(--color-text-light);
  flex-shrink: 0;
}

/* Form success state */
.form-success {
  display: none;
  text-align: center;
  padding: var(--space-10);
  animation: fadeSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-success.visible {
  display: block;
}

.form-success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(39,174,96,0.1);
  border: 2px solid rgba(39,174,96,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
  color: #27AE60;
}

.form-success-icon svg { width: 28px; height: 28px; }

.form-success h3 {
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.form-success p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  max-width: 44ch;
  margin: 0 auto;
}

/* Results download */
.results-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-download:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
  background: var(--color-bg-alt);
}

.btn-download svg { width: 15px; height: 15px; }

/* ==========================================================================
   Transition overlay
   ========================================================================== */

.quiz-transition-out {
  animation: fadeSlideOut 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes fadeSlideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-16px);
  }
}

/* ==========================================================================
   Quiz Footer
   ========================================================================== */

.quiz-footer-note {
  background: var(--navy);
  padding: var(--space-4) 0;
  text-align: center;
}

.quiz-footer-note p {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.3);
  max-width: none;
  margin: 0 auto;
}

/* ==========================================================================
   Print (Download Results)
   ========================================================================== */

@media print {
  .quiz-header,
  .quiz-progress-container,
  .quiz-nav,
  .next-steps-grid,
  .results-actions,
  .lead-form-container,
  .quiz-footer-note,
  .quiz-stage-wrapper > *:not(.quiz-results) {
    display: none !important;
  }

  .quiz-results {
    padding: 0;
    max-width: 100%;
  }

  .results-hero { background: #1B2A4A !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cost-col--mycmmc { background: #1B2A4A !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  body { font-size: 13px; }
}

/* ==========================================================================
   Responsive — Tablet
   ========================================================================== */

@media (max-width: 900px) {
  .quiz-options--grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .next-steps-grid {
    grid-template-columns: 1fr;
  }

  .cost-comparison-row {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .cost-vs {
    display: none;
  }

  .results-hero {
    padding: var(--space-8);
  }

  .results-score-section,
  .results-findings,
  .results-cost,
  .lead-form-container {
    padding: var(--space-6);
  }
}

/* ==========================================================================
   Responsive — Mobile
   ========================================================================== */

@media (max-width: 600px) {
  .quiz-stage-wrapper {
    padding: var(--space-8) var(--space-5) var(--space-12);
    min-height: auto;
  }

  .quiz-options--grid-2 {
    grid-template-columns: 1fr;
  }

  .quiz-options--grid-3 {
    grid-template-columns: 1fr;
  }

  .quiz-question-text {
    font-size: 1.4rem;
  }

  .quiz-results {
    padding: var(--space-6) var(--space-5) var(--space-10);
  }

  .results-hero {
    padding: var(--space-6);
  }

  .results-score-header {
    flex-direction: column;
    gap: var(--space-3);
  }

  .results-score-section,
  .results-findings,
  .results-cost,
  .lead-form-container {
    padding: var(--space-5) var(--space-5);
  }

  .lead-form-grid {
    grid-template-columns: 1fr;
  }

  .lead-form-grid .form-field--full {
    grid-column: 1;
  }

  .quiz-header-title {
    display: none;
  }

  .quiz-results {
    max-width: 100%;
  }
}
