/* ===================================================
   CheckMy.llc — Wizard Styles
   Mobile-first: base styles target 375px+
   =================================================== */

/* --- Screen visibility --- */
.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* --- Wizard layout --- */
.wizard-main {
  min-height: calc(100vh - 160px);
  background: var(--light);
}

.wizard-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.wizard-header-logo {
  height: 40px;
  width: auto;
}

/* --- Back link --- */
.back-link {
  display: inline-block;
  color: var(--gray);
  font-size: 0.875rem;
  margin-bottom: 24px;
  min-height: 44px;
  line-height: 44px;
  touch-action: manipulation;
}

.back-link:hover {
  color: var(--navy);
}

/* --- Headings --- */
.wizard-container h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.3;
}

.wizard-subtext {
  color: var(--muted);
  font-size: 0.938rem;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* --- State search --- */
.state-search-wrap {
  margin-bottom: 24px;
}

.state-search-input {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 1rem;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease;
}

.state-search-input::placeholder {
  color: var(--gray);
}

.state-search-input:focus {
  border-color: var(--green);
}

/* --- State grid --- */
.state-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

/* --- State card --- */
.state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 14px 12px;
  font-family: inherit;
  color: var(--navy);
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  touch-action: manipulation;
  min-height: 56px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.state-card:hover {
  border-color: var(--green);
  background: #f0fdf4;
}

.state-card:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.state-card-name {
  font-size: 0.938rem;
  font-weight: 500;
}

.state-card-count {
  font-size: 0.688rem;
  color: var(--gray);
  font-weight: 400;
}

.state-card.state-card-tapped {
  border-color: var(--green);
  background: #dcfce7;
}

/* --- Empty state message --- */
.state-empty {
  text-align: center;
  padding: 48px 0;
}

.state-empty p {
  color: var(--muted);
  font-size: 1.063rem;
  margin-bottom: 24px;
}

/* --- Status colors (for future use) --- */
.color-green { color: var(--green); }
.color-yellow { color: var(--amber); }
.color-red { color: var(--red); }
.bg-green { background-color: var(--green); }
.bg-yellow { background-color: var(--amber); }
.bg-red { background-color: var(--red); }

/* ===================================================
   What We Check section (Screen 1)
   =================================================== */

.wwc-section {
  margin-top: 16px;
  padding: 28px 24px;
  background: #f1f5f9;
  border-radius: 12px;
}

.wwc-heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.wwc-intro {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.wwc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.wwc-pill {
  padding: 10px 14px;
  font-size: 0.813rem;
  font-weight: 500;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}

.wwc-detail {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 12px;
}

.wwc-note {
  font-size: 0.75rem;
  color: var(--gray);
  line-height: 1.5;
  margin-bottom: 0;
}

/* ===================================================
   Questionnaire (Screen 2)
   =================================================== */

/* --- State heading --- */
.q-state-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
}

/* --- Progress bar --- */
.q-progress-wrap {
  margin-bottom: 32px;
}

.q-progress-text {
  font-size: 0.813rem;
  color: var(--gray);
  margin-bottom: 8px;
}

.q-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.q-progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 4px;
  transition: width 0.3s ease;
  min-width: 0;
}

/* --- Category label --- */
.q-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray);
  margin-bottom: 8px;
}

/* --- Question text --- */
.q-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 24px;
  max-width: 600px;
  min-height: 105px;
  outline: none;
}

/* --- Inline hint (first sentence of why_it_matters) --- */
.q-hint {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  margin: -4px 0 24px 0;
  padding: 0;
}

/* --- Why it matters --- */
.q-why-wrap {
  margin-bottom: 32px;
}

.q-why-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--green);
  cursor: pointer;
  padding: 4px 0;
  touch-action: manipulation;
  min-height: 44px;
}

.q-why-toggle:hover {
  color: var(--green-hover);
}

.q-why-chevron {
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 0.75rem;
}

.q-why-toggle.open .q-why-chevron {
  transform: rotate(90deg);
}

.q-why-content {
  margin-top: 12px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

.q-why-content p {
  margin-bottom: 8px;
}

.q-why-content p:last-child {
  margin-bottom: 0;
}

.q-statute {
  font-size: 0.813rem;
  color: var(--gray);
  font-style: italic;
}

/* --- Answer buttons --- */
.q-answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.q-answer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 14px 24px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  border: 2px solid;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.q-answer-btn:active {
  transform: scale(0.98);
}

.q-answer-yes {
  color: #166534;
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.4);
}

.q-answer-yes:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: var(--green);
}

.q-answer-yes.selected {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}

.q-answer-no {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.4);
}

.q-answer-no:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--red);
}

.q-answer-no.selected {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
}

.q-answer-unsure {
  color: #92400e;
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.4);
}

.q-answer-unsure:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--amber);
}

.q-answer-unsure.selected {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--amber);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

/* --- Question nav --- */
.q-nav {
  margin-top: 8px;
}

.q-back-btn {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}

/* ===================================================
   Scorecard Email Capture (bottom of scorecard)
   =================================================== */

.sc-email-capture {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 32px;
}

.sc-email-heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.sc-email-subtext {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.sc-email-form {
  max-width: 400px;
  margin: 0 auto;
}

.sc-email-input {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 1rem;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  outline: none;
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}

.sc-email-input:focus {
  border-color: var(--green);
}

.sc-fy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  text-align: left;
}

.sc-fy-label {
  font-size: 0.875rem;
  color: var(--text);
  white-space: nowrap;
}

.sc-fy-select {
  flex: 1;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease;
  cursor: pointer;
}

.sc-fy-select:focus {
  border-color: var(--green);
}

.sc-fy-select:disabled {
  opacity: 0.6;
  cursor: default;
}

.sc-email-btn {
  width: 100%;
  min-height: 48px;
  touch-action: manipulation;
}

.sc-email-btn:disabled {
  background: #86efac;
  cursor: default;
}

.sc-email-fine-print {
  font-size: 0.75rem;
  color: var(--gray);
  margin-top: 12px;
  margin-bottom: 0;
  line-height: 1.5;
}

.sc-email-success {
  max-width: 400px;
  margin: 0 auto;
}

.sc-pdf-btn {
  width: 100%;
  min-height: 48px;
  touch-action: manipulation;
}

/* ===================================================
   Scorecard (Screen 4)
   =================================================== */

/* --- Header --- */
.sc-header {
  margin-bottom: 32px;
}

.sc-header h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.sc-state {
  color: var(--muted);
  font-size: 0.938rem;
  margin-bottom: 4px;
}

.sc-meta {
  color: var(--gray);
  font-size: 0.75rem;
}

/* --- Overall score --- */
.sc-overall {
  text-align: center;
  padding: 32px 0;
  margin-bottom: 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.sc-grade {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.sc-percent {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.sc-summary {
  color: var(--muted);
  font-size: 0.938rem;
  margin-bottom: 20px;
}

.sc-bar {
  width: 80%;
  max-width: 400px;
  height: 12px;
  background: var(--line);
  border-radius: 6px;
  overflow: hidden;
  margin: 0 auto 16px;
}

.sc-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
}

.sc-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--muted);
}

.sc-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* --- Status dots --- */
.sc-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sc-dot-green { background: var(--green); }
.sc-dot-yellow { background: var(--amber); }
.sc-dot-red { background: var(--red); }

/* --- Sections --- */
.sc-section {
  margin-bottom: 32px;
}

.sc-section h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
}

/* --- Top risks --- */
.sc-risk-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.sc-risk-red { border-left-color: var(--red); }
.sc-risk-yellow { border-left-color: var(--amber); }

.sc-risk-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.sc-risk-cite {
  font-size: 0.75rem;
  color: var(--gray);
  font-style: italic;
  margin-bottom: 6px;
}

.sc-risk-text {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 6px;
}

.sc-risk-rec {
  font-size: 0.875rem;
  color: var(--navy);
  line-height: 1.5;
}

/* --- Badges --- */
.sc-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
}

.sc-badge-required {
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
}

.sc-badge-recommended {
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}

/* --- Category cards --- */
.sc-cat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.sc-cat-header {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 16px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.938rem;
  cursor: pointer;
  text-align: left;
  gap: 12px;
  touch-action: manipulation;
  min-height: 48px;
}

.sc-cat-header:hover {
  background: var(--light);
}

.sc-cat-name {
  flex: 1;
  font-weight: 600;
  color: var(--navy);
}

.sc-cat-score {
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
}

.sc-cat-chevron {
  font-size: 0.75rem;
  color: var(--gray);
  transition: transform 0.2s ease;
}

.sc-cat-header.open .sc-cat-chevron {
  transform: rotate(90deg);
}

.sc-cat-body {
  padding: 0 16px 16px;
}

/* --- Provisions --- */
.sc-prov {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #f1f5f9;
}

.sc-prov:first-child {
  border-top: none;
}

.sc-prov .sc-dot {
  margin-top: 5px;
}

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

.sc-prov-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 2px;
}

.sc-priority-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.sc-empathy {
  font-size: 0.875rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
  margin-top: 12px;
  margin-bottom: 0;
  line-height: 1.5;
}

.sc-prov-cite {
  font-size: 0.75rem;
  color: var(--gray);
  font-style: italic;
  margin-bottom: 4px;
}

.sc-prov-risk {
  font-size: 0.813rem;
  color: var(--gray);
  line-height: 1.5;
  margin-bottom: 4px;
}

.sc-prov-rec {
  font-size: 0.813rem;
  color: var(--navy);
  line-height: 1.5;
}

/* --- Minutes.llc CTA --- */
.sc-cta-card {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 32px;
}

.sc-cta-text {
  font-size: 1.063rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 20px;
  line-height: 1.5;
}

.sc-cta-btn {
  margin-bottom: 12px;
}

.sc-cta-disclaimer {
  font-size: 0.75rem;
  color: var(--gray);
}

/* --- Fix CTA button (Minutes.llc cross-sell per provision) --- */
.fix-cta-button {
  display: block;
  text-align: center;
  padding: 14px 24px;
  background: #22c55e;
  color: #ffffff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  min-height: 44px;
  touch-action: manipulation;
  margin-top: 8px;
  transition: background-color 0.2s ease;
}

.fix-cta-button:hover {
  background: #16a34a;
  text-decoration: none;
  color: #ffffff;
}

.fix-cta-disclaimer {
  font-size: 0.688rem;
  color: var(--gray);
  text-align: center;
  margin-top: 6px;
  margin-bottom: 0;
}

/* --- Actions bar --- */
.sc-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.sc-action-btn {
  width: 100%;
  min-height: 48px;
}

.sc-action-secondary {
  background: var(--white);
  color: var(--navy);
  border: 2px solid var(--line);
}

.sc-action-secondary:hover {
  background: var(--light);
  border-color: #d1d5db;
}

/* --- Scorecard disclaimer --- */
.sc-disclaimer {
  font-size: 0.75rem;
  color: var(--gray);
  line-height: 1.6;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

/* ===================================================
   Tablet (600px+)
   =================================================== */
@media (min-width: 600px) {
  .wizard-container {
    padding: 48px 32px 80px;
  }

  .wizard-container h1 {
    font-size: 1.75rem;
  }

  .state-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .state-continue-btn {
    width: auto;
    min-width: 240px;
    margin-left: auto;
    margin-right: auto;
  }

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

  .q-text {
    font-size: 1.5rem;
    min-height: 126px;
  }

  .q-answers {
    flex-direction: row;
  }

  .q-answer-btn {
    flex: 1;
  }

  .sc-actions {
    flex-direction: row;
    justify-content: center;
  }

  .sc-action-btn {
    width: auto;
    min-width: 200px;
  }
}

/* ===================================================
   Desktop (900px+)
   =================================================== */
@media (min-width: 900px) {
  .wizard-container h1 {
    font-size: 2rem;
  }

  .state-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .sc-header h2 {
    font-size: 1.625rem;
  }
}

/* ===================================================
   Scorecard Gate (pre-email reveal)
   =================================================== */
.sc-gated-header {
  opacity: 0.7;
  cursor: default;
}

.sc-gated-header .sc-cat-chevron {
  display: none;
}

.sc-gate-overlay {
  position: relative;
  margin: 0 0 24px 0;
  border-radius: 12px;
  overflow: hidden;
}

.sc-gate-blur-preview {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sc-gate-blur-line {
  height: 14px;
  background: linear-gradient(90deg, #E5E7EB 0%, #F3F4F6 50%, #E5E7EB 100%);
  border-radius: 4px;
  width: 100%;
  filter: blur(2px);
}

.sc-gate-blur-line.short {
  width: 65%;
}

.sc-gate-prompt {
  text-align: center;
  padding: 0 20px 8px;
}

.sc-gate-heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.sc-gate-sub {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto;
}

.sc-gated-body {
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.sc-gated-section {
  transition: opacity 0.3s ease;
}

/* ===================================================
   Print
   =================================================== */
@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .sc-actions,
  .sc-cta-card,
  .sc-email-capture {
    display: none !important;
  }

  .screen {
    display: block !important;
  }

  #screen-state-select,
  #screen-questionnaire {
    display: none !important;
  }

  .sc-cat-body {
    display: block !important;
  }

  .sc-cat-body[hidden] {
    display: block !important;
  }

  .sc-cat-chevron {
    display: none;
  }

  .wizard-main {
    background: var(--white);
  }

  .sc-overall,
  .sc-cat-card,
  .sc-risk-card {
    break-inside: avoid;
  }
}
