/* =============================================================
   Essential 8 Assessment — Scoped Styles (final)
   ============================================================= */

.e8-wrap * { box-sizing: border-box; margin: 0; padding: 0; }
.e8-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.6; color: #1a1a2e;
  max-width: 820px; margin: 0 auto; padding: 24px 16px 48px;
}
.e8-hidden { display: none !important; }

/* ── Load error ────────────────────────────────────────────── */
.e8-load-error { text-align: center; padding: 48px 24px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 12px; color: #991b1b; }
.e8-load-error p { font-size: 1.05rem; margin-bottom: 20px; }

/* ── Honeypot ──────────────────────────────────────────────── */
.e8-hp { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ── Header ────────────────────────────────────────────────── */
.e8-header { text-align: center; margin-bottom: 32px; }
.e8-title  { font-size: 2rem; font-weight: 700; color: #12263f; line-height: 1.25; margin-bottom: 12px; }
.e8-subtitle { font-size: 1.05rem; color: #4a5568; max-width: 620px; margin: 0 auto 12px; }
.e8-time-estimate { display: inline-block; font-size: 0.875rem; color: #6b7280; background: #f3f4f6; padding: 4px 14px; border-radius: 999px; margin-bottom: 20px; }

/* ── Progress dots ─────────────────────────────────────────── */
.e8-dots-wrap { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.e8-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #d1d5db; background: #fff; cursor: pointer; transition: transform 0.15s, border-color 0.2s, background 0.2s; }
.e8-dot:hover { transform: scale(1.15); border-color: #6b7280; }
.e8-dot-active { border-color: #2563eb !important; box-shadow: 0 0 0 3px rgba(37,99,235,.25); transform: scale(1.1); }
.e8-dot-3 { background: #16a34a; border-color: #16a34a; }
.e8-dot-2 { background: #ca8a04; border-color: #ca8a04; }
.e8-dot-1 { background: #ea580c; border-color: #ea580c; }
.e8-dot-0 { background: #dc2626; border-color: #dc2626; }

/* ── Progress bar ──────────────────────────────────────────── */
.e8-progress-label { font-size: 0.875rem; color: #6b7280; margin-bottom: 8px; }
.e8-progress-track { height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.e8-progress-fill  { height: 100%; background: linear-gradient(90deg, #2563eb, #3b82f6); border-radius: 999px; transition: width 0.4s ease; }

/* ── Wizard viewport ───────────────────────────────────────── */
.e8-wizard-viewport { position: relative; overflow: hidden; transition: height 0.35s ease; }
.e8-wizard-screen {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06); outline: none;
  position: absolute; top: 0; left: 0; width: 100%;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.35s ease;
  will-change: transform, opacity;
}
.e8-wizard-screen.e8-screen-active   { position: relative; transform: translateX(0);    opacity: 1; pointer-events: auto; }
.e8-wizard-screen:not(.e8-screen-active) { pointer-events: none; }
.e8-screen-right        { transform: translateX(110%);  opacity: 0; }
.e8-screen-left         { transform: translateX(-110%); opacity: 0; }
.e8-screen-enter-right  { transform: translateX(110%);  opacity: 0; }
.e8-screen-enter-left   { transform: translateX(-110%); opacity: 0; }
.e8-screen-exit-left    { transform: translateX(-110%); opacity: 0; }
.e8-screen-exit-right   { transform: translateX(110%);  opacity: 0; }

/* ── Revisit banner ────────────────────────────────────────── */
.e8-revisit-banner { display: flex; align-items: center; gap: 8px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; font-size: 0.875rem; font-weight: 500; padding: 10px 14px; border-radius: 8px; margin-bottom: 20px; }

/* ── Control header ────────────────────────────────────────── */
.e8-wizard-ctrl-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 2px solid #f0f4ff; }
.e8-control-number { flex-shrink: 0; min-width: 52px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #2563eb; color: #fff; font-weight: 800; font-size: 1.3rem; border-radius: 12px; line-height: 1; }
.e8-of-label    { font-size: 0.6rem; font-weight: 500; opacity: .75; margin-top: 2px; }
.e8-control-label { font-size: 1.25rem; font-weight: 700; color: #12263f; margin-bottom: 6px; }
.e8-control-intro { font-size: 0.93rem; color: #4a5568; }

/* ── Questions ─────────────────────────────────────────────── */
.e8-questions { display: flex; flex-direction: column; }
.e8-question-row { padding: 16px 0; border-bottom: 1px solid #f3f4f6; border-radius: 8px; }
.e8-question-row:last-child { border-bottom: none; }
.e8-unanswered-highlight { background: #fff8f8; border: 1px solid #fecaca !important; padding: 12px; margin-bottom: 4px; }
.e8-question-row.e8-answered .e8-q-check { opacity: 1; transform: scale(1); }
.e8-question-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.e8-q-check { flex-shrink: 0; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; background: #16a34a; color: #fff; border-radius: 50%; font-size: 0.75rem; font-weight: 700; opacity: 0; transform: scale(0.5); transition: opacity 0.2s, transform 0.2s; margin-top: 2px; }
.e8-question-text { font-size: 0.975rem; color: #374151; flex: 1; }
.e8-screen-unanswered { color: #dc2626; font-size: 0.875rem; margin-top: 12px; padding: 10px 14px; background: #fef2f2; border-radius: 6px; }

/* ── Radio buttons ─────────────────────────────────────────── */
.e8-radio-group { display: flex; gap: 10px; padding-left: 32px; flex-wrap: wrap; align-items: center; }
.e8-radio-label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 8px 22px; border: 2px solid #d1d5db; border-radius: 999px; font-size: 0.9rem; font-weight: 500; color: #374151; background: #fff; transition: border-color 0.15s, background 0.15s, color 0.15s; user-select: none; min-width: 90px; justify-content: center; }
.e8-radio-label:hover { border-color: #2563eb; color: #2563eb; }
.e8-radio-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
/* Drive selected state purely from browser checked property */
.e8-radio-label:has(.e8-radio-input:checked) { background: #2563eb; border-color: #2563eb; color: #fff; }
/* Fallback for browsers without :has() support */
.e8-radio-label.e8-selected { background: #2563eb; border-color: #2563eb; color: #fff; }

/* ── Tooltip ───────────────────────────────────────────────── */
.e8-partial-tip-wrap { position: relative; display: inline-flex; align-items: center; }
.e8-partial-tip-btn { width: 20px; height: 20px; border-radius: 50%; background: #e5e7eb; border: none; cursor: pointer; font-size: 0.75rem; font-weight: 700; color: #6b7280; display: inline-flex; align-items: center; justify-content: center; transition: background 0.15s; flex-shrink: 0; font-family: inherit; }
.e8-partial-tip-btn:hover { background: #d1d5db; color: #374151; }
.e8-tooltip { display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #1f2937; color: #fff; font-size: 0.8rem; line-height: 1.4; padding: 8px 12px; border-radius: 8px; width: 220px; text-align: left; box-shadow: 0 4px 12px rgba(0,0,0,.2); z-index: 10; pointer-events: none; }
.e8-tooltip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #1f2937; }
.e8-tooltip.e8-tooltip-visible { display: block; }

/* ── Keyboard hint ─────────────────────────────────────────── */
.e8-keyboard-hint { text-align: center; font-size: 0.8rem; color: #9ca3af; margin-top: 12px; }

/* ── Wizard nav ────────────────────────────────────────────── */
.e8-wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 12px; }

/* ── Buttons ───────────────────────────────────────────────── */
.e8-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 13px 32px; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none; border: 2px solid transparent; transition: opacity 0.15s, transform 0.1s, background 0.15s; line-height: 1; font-family: inherit; }
.e8-btn:hover  { opacity: 0.9; transform: translateY(-1px); }
.e8-btn:active { transform: translateY(0); }
.e8-btn-primary   { background: #2563eb; color: #fff !important; border-color: #2563eb; }
.e8-btn-primary:disabled { background: #9ca3af; border-color: #9ca3af; cursor: not-allowed; transform: none; opacity: 1; }
.e8-btn-secondary { background: #fff; color: #374151; border-color: #d1d5db; }
.e8-btn-secondary:hover { border-color: #2563eb; color: #2563eb; opacity: 1; }
.e8-btn-last { background: #16a34a !important; border-color: #16a34a !important; }
.e8-btn-full { width: 100%; }
.e8-btn-icon { font-size: 0.9rem; }
.e8-text-btn { background: none; border: none; color: #6b7280; font-size: 0.875rem; cursor: pointer; text-decoration: underline; padding: 0; font-family: inherit; }
.e8-text-btn:hover { color: #374151; }

/* ── Review card ───────────────────────────────────────────── */
.e8-review-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 36px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.e8-review-card .e8-title    { font-size: 1.6rem; margin-bottom: 8px; }
.e8-review-card .e8-subtitle { font-size: 0.95rem; margin-bottom: 24px; }
.e8-rv-section  { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #f3f4f6; }
.e8-rv-section:last-child { border-bottom: none; margin-bottom: 0; }
.e8-rv-ctrl-label { font-size: 0.95rem; font-weight: 700; color: #12263f; margin-bottom: 10px; }
.e8-rv-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 6px 0; border-bottom: 1px solid #f9fafb; }
.e8-rv-row:last-child { border-bottom: none; }
.e8-rv-q   { font-size: 0.875rem; color: #4a5568; flex: 1; }
.e8-rv-ans { font-size: 0.8rem; font-weight: 700; white-space: nowrap; padding: 2px 10px; border-radius: 999px; }
.e8-rv-yes     { background: #dcfce7; color: #15803d; }
.e8-rv-partial { background: #fef9c3; color: #854d0e; }
.e8-rv-no      { background: #fee2e2; color: #991b1b; }
.e8-review-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; gap: 12px; flex-wrap: wrap; }


/* ── Pre-lead partial results preview ─────────────────────── */
.e8-prelead-preview { margin: 22px 0 26px; }
.e8-preview-card { border: 1px solid #e5e7eb; border-left: 5px solid #2563eb; border-radius: 14px; padding: 22px; background: #fff; text-align: left; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.e8-preview-kicker { font-size: 0.75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #64748b; margin-bottom: 8px; }
.e8-preview-rating { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.e8-preview-rating span { font-size: 1.8rem; line-height: 1; }
.e8-preview-rating strong { font-size: 1.45rem; color: #12263f; }
.e8-preview-rating em { font-style: normal; font-size: 0.8rem; font-weight: 800; color: #fff; background: #12263f; padding: 3px 8px; border-radius: 999px; }
.e8-preview-copy { color: #374151; font-size: 0.95rem; line-height: 1.6; margin-bottom: 16px; }
.e8-preview-subtitle { font-size: 0.8rem; font-weight: 800; color: #12263f; margin-bottom: 8px; }
.e8-preview-risk-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.e8-preview-risk-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 11px; background: rgba(255,255,255,.72); border: 1px solid rgba(148,163,184,.3); border-radius: 8px; }
.e8-preview-risk-list strong { font-size: 0.86rem; color: #1a202c; }
.e8-preview-risk-list span { font-size: 0.78rem; color: #64748b; white-space: nowrap; }
.e8-preview-no-risks { font-size: 0.88rem; color: #374151; margin-bottom: 14px; }
.e8-preview-lock { font-size: 0.82rem; color: #475569; background: #f8fafc; border-radius: 8px; padding: 10px 12px; }
.e8-preview-card.e8-ml-3 { border-left-color: #16a34a; }
.e8-preview-card.e8-ml-2 { border-left-color: #ca8a04; }
.e8-preview-card.e8-ml-1 { border-left-color: #ea580c; }
.e8-preview-card.e8-ml-0 { border-left-color: #dc2626; }

/* ── Lead card ─────────────────────────────────────────────── */
.e8-lead-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 40px; max-width: 560px; margin: 0 auto; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.e8-step-indicator { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #2563eb; margin-bottom: 10px; }
.e8-lead-card .e8-title    { font-size: 1.6rem; margin-bottom: 10px; }
.e8-lead-card .e8-subtitle { font-size: 0.97rem; margin-bottom: 28px; }
.e8-form-row { display: flex; gap: 16px; }
.e8-form-row .e8-form-field { flex: 1; }
.e8-form-field { margin-bottom: 18px; }
.e8-label { display: block; font-size: 0.875rem; font-weight: 600; color: #374151; margin-bottom: 6px; }
.e8-req   { color: #dc2626; }
.e8-optional-tag { font-size: 0.75rem; font-weight: 400; color: #9ca3af; margin-left: 4px; font-style: italic; }
.e8-input-wrap { position: relative; }
.e8-input { width: 100%; padding: 10px 14px; border: 2px solid #d1d5db; border-radius: 8px; font-size: 1rem; color: #111827; outline: none; transition: border-color 0.15s; font-family: inherit; }
.e8-input:focus { border-color: #2563eb; }
.e8-input.e8-input-error   { border-color: #dc2626; }
.e8-input.e8-input-success { border-color: #16a34a; padding-right: 38px; }
.e8-field-tick { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #16a34a; font-weight: 700; font-size: 1rem; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.e8-field-valid .e8-field-tick { opacity: 1; }
.e8-field-error { display: block; font-size: 0.8rem; color: #dc2626; margin-top: 4px; }
.e8-privacy-note { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 500; color: #374151; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 10px 14px; margin-bottom: 20px; }
.e8-privacy-icon { font-size: 1.1rem; flex-shrink: 0; }
.e8-submit-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; padding: 10px 14px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 14px; }
.e8-submit-note  { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; padding: 10px 14px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 14px; font-weight: 500; }
.e8-back-link { text-align: center; margin-top: 16px; }

/* ── Results ───────────────────────────────────────────────── */
.e8-overall-badge { display: flex; align-items: center; gap: 20px; padding: 28px; border-radius: 14px; margin-bottom: 20px; }
.e8-overall-emoji { font-size: 3.5rem; line-height: 1; flex-shrink: 0; }
.e8-overall-title { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .7; margin-bottom: 4px; }
.e8-overall-label { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.e8-ml-tag        { font-size: 1rem; font-weight: 600; opacity: .55; }
.e8-benchmark-note { font-size: 0.85rem; margin-top: 6px; opacity: .8; font-style: italic; }
.e8-rating-reason  { font-size: 0.82rem; margin-top: 6px; opacity: .7; font-style: italic; line-height: 1.5; }
.e8-ml-definition  { font-size: 0.78rem; margin-top: 6px; opacity: .55; }
.e8-results-narrative { font-size: 1.05rem; color: #1f2937; font-weight: 500; margin-bottom: 20px; padding: 16px 20px; background: #f8fafc; border-radius: 10px; border-left: 4px solid #2563eb; }
.e8-results-intro { font-size: 0.95rem; color: #4a5568; margin-bottom: 24px; padding: 14px 18px; background: #fff; border-radius: 8px; border: 1px solid #e5e7eb; }
.e8-results-actions { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.e8-section-title  { font-size: 1.15rem; font-weight: 700; color: #12263f; margin-bottom: 14px; }
.e8-result-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 20px; margin-bottom: 12px; border-left: 5px solid #e5e7eb; }
.e8-result-card-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.e8-result-emoji       { font-size: 1.6rem; flex-shrink: 0; margin-top: 2px; }
.e8-result-card-title  { flex: 1; }
.e8-result-ctrl-label  { font-size: 1rem; font-weight: 700; color: #12263f; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.e8-result-ctrl-rating { font-size: 0.85rem; font-weight: 600; margin-top: 3px; }
.e8-result-ctrl-text   { font-size: 0.9rem; color: #4a5568; padding-left: 54px; }
.e8-score-bar-wrap { height: 6px; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin-top: 8px; width: 100%; max-width: 200px; }
.e8-score-bar-fill { height: 100%; border-radius: 999px; transition: width 0.6s ease; }
.e8-score-3 { background: #16a34a; } .e8-score-2 { background: #ca8a04; } .e8-score-1 { background: #ea580c; } .e8-score-0 { background: #dc2626; }
.e8-start-here-badge { display: inline-block; background: #dc2626; color: #fff; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; }

/* ── ML colour themes ──────────────────────────────────────── */
.e8-ml-3 { background: #f0fdf4; border-left-color: #16a34a; } .e8-ml-3 .e8-result-ctrl-rating { color: #15803d; }
.e8-ml-2 { background: #fefce8; border-left-color: #ca8a04; } .e8-ml-2 .e8-result-ctrl-rating { color: #854d0e; }
.e8-ml-1 { background: #fff7ed; border-left-color: #ea580c; } .e8-ml-1 .e8-result-ctrl-rating { color: #9a3412; }
.e8-ml-0 { background: #fef2f2; border-left-color: #dc2626; } .e8-ml-0 .e8-result-ctrl-rating { color: #991b1b; }
.e8-overall-badge.e8-ml-3 .e8-overall-label { color: #15803d; }
.e8-overall-badge.e8-ml-2 .e8-overall-label { color: #854d0e; }
.e8-overall-badge.e8-ml-1 .e8-overall-label { color: #9a3412; }
.e8-overall-badge.e8-ml-0 .e8-overall-label { color: #991b1b; }

/* ── Radar chart ───────────────────────────────────────────── */
.e8-radar-wrap { margin-bottom: 28px; padding: 24px; background: var(--color-background-primary,#fff); border: 1px solid #e5e7eb; border-radius: 12px; }
.e8-radar-inner { display: flex; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.e8-radar-inner svg { flex-shrink: 0; }
.e8-radar-legend { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.e8-radar-legend-row { display: flex; align-items: baseline; gap: 8px; font-size: 0.8rem; }
.e8-radar-legend-num   { font-weight: 700; color: #2563eb; white-space: nowrap; min-width: 76px; font-size: 0.78rem; }
.e8-radar-legend-label { color: #4a5568; line-height: 1.3; }

/* ── Scorecard table ───────────────────────────────────────── */
.e8-scorecard { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px 28px; margin-bottom: 24px; }
.e8-scorecard-title { font-size: 1.15rem; font-weight: 700; color: #12263f; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid #e2e8f0; }
.e8-scorecard-table { width: 100%; border-collapse: collapse; }
.e8-scorecard-table th { text-align: left; padding: 8px 10px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #718096; border-bottom: 2px solid #e2e8f0; }
.e8-scorecard-table td { padding: 9px 10px; font-size: 0.875rem; border-bottom: 1px solid #f3f4f6; }
.e8-scorecard-table tr:last-child td { border-bottom: none; }

/* ── Priority actions ─────────────────────────────────────── */
.e8-priorities { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px 28px; margin-bottom: 24px; }
.e8-priorities-title { font-size: 1.15rem; font-weight: 700; color: #12263f; margin-bottom: 6px; padding-bottom: 10px; border-bottom: 2px solid #e2e8f0; }
.e8-priorities-intro { font-size: 0.85rem; color: #4a5568; margin-bottom: 14px; }
.e8-priority-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid #e2e8f0; }
.e8-priority-row:last-child { border-bottom: none; }
.e8-priority-num { width: 28px; height: 28px; min-width: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; color: #fff; flex-shrink: 0; }
.e8-priority-label { font-size: 0.9rem; font-weight: 600; color: #1a202c; margin-bottom: 3px; }
.e8-priority-context { font-size: 0.8rem; color: #4a5568; margin-bottom: 5px; line-height: 1.55; }
.e8-priority-nextstep { font-size: 0.8rem; color: #1e40af; font-weight: 500; }
.e8-risk-severity { display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 999px; background: #eef2ff; color: #1e40af; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; vertical-align: middle; }
.e8-priorities-clean { margin: 0; color: #374151; font-size: 0.88rem; line-height: 1.6; }

.e8-priorities-overflow { font-size: 0.82rem; color: #64748b; font-style: italic; margin-top: 14px; }

/* ── CTA ───────────────────────────────────────────────────── */
.e8-cta-box     { background: #12263f; color: #fff; border-radius: 14px; padding: 36px; text-align: center; margin: 32px 0 24px; }
.e8-cta-heading { font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.e8-cta-text    { font-size: 1.05rem; margin-bottom: 20px; opacity: .9; }

/* ── Retake ────────────────────────────────────────────────── */
.e8-retake-wrap { text-align: center; margin-top: 8px; }
.e8-retake-link { background: none; border: none; color: #6b7280; font-size: 0.9rem; cursor: pointer; text-decoration: underline; padding: 0; font-family: inherit; }
.e8-retake-link:hover { color: #374151; }

/* ── Print-only elements (hidden on screen) ────────────────── */
.e8-print-cover,
.e8-print-header,
.e8-print-exec-summary { display: none; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
  .e8-title { font-size: 1.5rem; }
  .e8-wizard-screen { padding: 20px 16px; }
  .e8-lead-card  { padding: 24px 18px; }
  .e8-review-card { padding: 20px 16px; }
  .e8-radio-group { flex-direction: column; gap: 8px; padding-left: 32px; }
  .e8-radio-label { width: 100%; justify-content: center; padding: 12px 16px; font-size: 0.975rem; }
  .e8-partial-tip-wrap { align-self: flex-start; }
  .e8-form-row { flex-direction: column; gap: 0; }
  .e8-overall-badge { flex-direction: column; text-align: center; gap: 12px; }
  .e8-overall-label { font-size: 1.6rem; }
  .e8-result-ctrl-text { padding-left: 0; margin-top: 8px; }
  .e8-wizard-nav  { flex-direction: column-reverse; }
  .e8-review-nav  { flex-direction: column-reverse; }
  .e8-btn { width: 100%; }
  .e8-btn-secondary { width: auto; align-self: flex-start; }
  .e8-results-actions { flex-direction: column; }
  .e8-results-actions .e8-btn { width: 100%; }
  .e8-scorecard { padding: 18px 16px; }
  .e8-priorities { padding: 18px 16px; }
  .e8-keyboard-hint { display: none; }
  .e8-dots-wrap { gap: 6px; }
  .e8-dot { width: 22px; height: 22px; }
  .e8-rv-row { flex-direction: column; gap: 4px; }
  .e8-score-bar-wrap { max-width: 100%; }
}

/* ── Urgency note (lead capture) ──────────────────────────── */
.e8-urgency-note { display: flex; align-items: flex-start; gap: 10px; font-size: 0.875rem; font-weight: 500; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 12px 14px; margin-bottom: 22px; line-height: 1.55; }
.e8-urgency-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }

/* ── Severity banner (results) ───────────────────────────── */
.e8-severity-banner { display: flex; align-items: flex-start; gap: 14px; padding: 18px 22px; border-radius: 10px; margin-bottom: 20px; line-height: 1.55; }
.e8-severity-banner strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.e8-severity-banner p { margin: 0; font-size: 0.9rem; }
.e8-severity-banner-icon { font-size: 1.6rem; flex-shrink: 0; margin-top: 2px; }
.e8-severity-critical { background: #fef2f2; border: 1.5px solid #fca5a5; color: #991b1b; }
.e8-severity-critical strong { color: #7f1d1d; }
.e8-severity-high { background: #fff7ed; border: 1.5px solid #fed7aa; color: #9a3412; }
.e8-severity-high strong { color: #7c2d12; }

/* ── Mid-report CTA ──────────────────────────────────────── */
.e8-cta-top { margin: 20px 0 24px; }
.e8-cta-mid { margin: 24px 0; }
.e8-cta-final { margin-top: 36px; }

/* ── Share form ───────────────────────────────────────────── */
.e8-share-form { margin-bottom: 24px; }
.e8-share-form-inner { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.e8-share-heading { font-size: 1.05rem; font-weight: 700; color: #12263f; margin-bottom: 4px; }
.e8-share-subtext { font-size: 0.875rem; color: #64748b; margin-bottom: 18px; }
.e8-share-fields { display: flex; gap: 14px; margin-bottom: 14px; }
.e8-share-fields .e8-form-field { flex: 1; margin-bottom: 0; }
.e8-share-actions { display: flex; gap: 10px; }
.e8-share-status { font-size: 0.875rem; padding: 10px 14px; border-radius: 8px; margin-top: 12px; }
.e8-share-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.e8-share-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }

@media (max-width: 600px) {
  .e8-share-fields { flex-direction: column; gap: 0; }
  .e8-share-fields .e8-form-field { margin-bottom: 14px; }
  .e8-share-actions { flex-direction: column; }
  .e8-share-actions .e8-btn { width: 100%; }
}

/* ── Methodology disclaimer ──────────────────────────────── */
.e8-disclaimer { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px 20px; margin-top: 20px; }
.e8-disclaimer p { margin: 0; font-size: 0.8rem; color: #718096; line-height: 1.65; }
.e8-disclaimer strong { color: #4a5568; }

/* ── Next step callout ───────────────────────────────────── */
.e8-result-next-step { margin: 10px 0 0; padding: 10px 14px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px; font-size: 0.875rem; color: #1e40af; line-height: 1.6; }
.e8-result-next-step strong { color: #1e3a5f; }

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  @page { margin: 15mm 18mm; size: A4; }
  @page :first { margin: 0; }

  .e8-wrap { padding: 0; max-width: 100%; font-size: 11pt; color: #000; }

  /* Hide screen-only elements */
  #e8-step-1, #e8-step-review, #e8-step-2 { display: none !important; }
  #e8-step-3 { display: block !important; }
  .e8-retake-wrap, .e8-cta-box, .e8-results-actions, .e8-results-scorecard, .e8-results-priorities, .e8-share-form, .e8-severity-banner, .e8-cta-top, .e8-cta-mid, .e8-cta-final { display: none !important; }

  /* ── Cover page ─────────────────────────────────────────── */
  .e8-print-cover {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    page-break-after: always;
    padding: 20mm 18mm;
    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .e8-pc-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 12mm;
    border-bottom: 2pt solid #12263f;
    margin-bottom: 12mm;
  }
  .e8-pc-logo { max-height: 60pt; max-width: 140pt; width: auto; height: auto; display: block; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .e8-pc-brand { text-align: right; }
  .e8-pc-brand-name    { font-size: 16pt; font-weight: 700; color: #12263f; margin-bottom: 3pt; }
  .e8-pc-brand-tagline { font-size: 10pt; color: #4a5568; margin-bottom: 3pt; }
  .e8-pc-brand-contact { font-size: 9pt;  color: #6b7280; }
  .e8-pc-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12mm 0;
  }
  .e8-pc-report-label { font-size: 11pt; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: #6b7280; margin-bottom: 8pt; }
  .e8-pc-title { font-size: 30pt; font-weight: 800; color: #12263f; line-height: 1.15; margin-bottom: 10mm; }
  .e8-pc-divider { height: 3pt; width: 48pt; background: #2563eb; margin-bottom: 10mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .e8-pc-prepared-for-label { font-size: 9pt; text-transform: uppercase; letter-spacing: .08em; color: #6b7280; margin-bottom: 4pt; }
  .e8-pc-recipient-name    { font-size: 18pt; font-weight: 700; color: #12263f; margin-bottom: 4pt; }
  .e8-pc-recipient-company { font-size: 13pt; color: #4a5568; margin-bottom: 10mm; }
  .e8-pc-rating-block {
    display: block;
    text-align: center;
    padding: 12pt 18pt;
    border-radius: 8pt;
    border: 1.5pt solid #333;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .e8-pc-rating-emoji { font-size: 22pt; vertical-align: middle; }
  .e8-pc-rating-label { font-size: 16pt; font-weight: 800; color: #12263f; vertical-align: middle; }
  .e8-pc-ml-tag       { font-size: 11pt; font-weight: 600; opacity: .6; }
  .e8-pc-benchmark    { font-size: 8pt; color: #4a5568; margin: 6pt 0 0; font-style: italic; }
  .e8-pc-reason       { font-size: 7.5pt; color: #64748b; margin: 4pt 0 0; font-style: italic; line-height: 1.4; }
  .e8-pc-ml-def       { font-size: 7pt; color: #94a3b8; margin: 4pt 0 0; }
  .e8-pc-footer { display: flex; justify-content: space-between; font-size: 8pt; color: #9ca3af; padding-top: 8pt; border-top: 0.5pt solid #e5e7eb; }

  /* ── Running report header (pages 2+) ───────────────────── */
  .e8-print-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12pt;
    padding-bottom: 8pt;
    margin-bottom: 12pt;
    border-bottom: 1.5pt solid #12263f;
  }
  .e8-print-logo { max-height: 36pt; max-width: 90pt; width: auto; height: auto; display: block; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .e8-print-brand-name { font-size: 12pt; font-weight: 700; color: #000; margin: 0 0 2pt; }
  .e8-print-brand-tag  { font-size: 8pt;  color: #555; margin: 0; }
  .e8-print-report-label p   { font-size: 8pt; color: #333; margin: 0 0 2pt; font-weight: 600; text-align: right; }
  .e8-print-date             { font-size: 7.5pt; color: #666; font-weight: 400 !important; text-align: right; }

  /* ── Executive summary ──────────────────────────────────── */
  .e8-print-exec-summary {
    display: block !important;
    margin-bottom: 14pt;
    padding-bottom: 14pt;
    border-bottom: 0.5pt solid #ccc;
    page-break-inside: avoid;
  }
  .e8-pes-heading { font-size: 16pt; font-weight: 700; color: #12263f; margin-bottom: 8pt; }
  .e8-pes-subheading { font-size: 11pt; font-weight: 700; color: #12263f; margin: 10pt 0 5pt; }
  .e8-pes-para { font-size: 10pt; color: #1f2937; line-height: 1.5; margin-bottom: 8pt; }
  .e8-pes-reason { font-size: 8.5pt; color: #64748b; font-style: italic; line-height: 1.45; margin-bottom: 8pt; }
  .e8-pes-table { width: 100%; border-collapse: collapse; font-size: 9pt; margin-bottom: 8pt; }
  .e8-pes-th { background: #12263f; color: #fff; padding: 5pt 7pt; text-align: left; font-weight: 600; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .e8-pes-td { padding: 5pt 7pt; border-bottom: 0.5pt solid #e5e7eb; vertical-align: top; color: #000; }
  .e8-pes-td-name    { font-weight: 600; width: 30%; }
  .e8-pes-td-context { width: 50%; font-size: 8.5pt; color: #444; }

  /* ── Overall badge ──────────────────────────────────────── */
  .e8-overall-badge { border: 1.5pt solid #333 !important; border-left-width: 1.5pt !important; color: #000 !important; padding: 10pt; margin-bottom: 12pt; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .e8-overall-badge.e8-ml-3 { background: #f0fdf4 !important; }
  .e8-overall-badge.e8-ml-2 { background: #fefce8 !important; }
  .e8-overall-badge.e8-ml-1 { background: #fff7ed !important; }
  .e8-overall-badge.e8-ml-0 { background: #fef2f2 !important; }
  .e8-overall-badge .e8-overall-title,
  .e8-overall-badge .e8-overall-label,
  .e8-overall-badge .e8-ml-tag,
  .e8-overall-badge .e8-benchmark-note,
  .e8-overall-badge .e8-rating-reason,
  .e8-overall-badge .e8-ml-definition { color: #000 !important; }
  .e8-overall-emoji { font-size: 22pt; }

  /* ── Narrative + intro ──────────────────────────────────── */
  .e8-results-narrative, .e8-results-intro { background: #fff !important; border: 0.5pt solid #ccc !important; border-left: 3pt solid #333 !important; color: #000 !important; padding: 7pt 9pt; margin-bottom: 9pt; break-inside: avoid; font-size: 9.5pt; }

  /* ── Radar chart ────────────────────────────────────────── */
  .e8-radar-wrap { border: 0.5pt solid #ccc !important; padding: 10pt; break-inside: avoid; margin-bottom: 12pt; }
  .e8-radar-inner { flex-direction: column !important; align-items: center !important; }
  .e8-radar-inner svg { max-width: 220pt !important; width: 220pt !important; }
  .e8-radar-legend { margin-top: 8pt; width: 100%; display: grid !important; grid-template-columns: 1fr 1fr; gap: 3pt 10pt; }
  .e8-radar-legend-row   { font-size: 8pt; }
  .e8-radar-legend-num   { color: #000 !important; min-width: 52pt; }
  .e8-radar-legend-label { color: #333 !important; }

  /* ── Section title ──────────────────────────────────────── */
  .e8-section-title { font-size: 12pt; color: #000 !important; margin: 12pt 0 5pt; border-bottom: 0.5pt solid #ccc; padding-bottom: 3pt; }

  /* ── Result cards ───────────────────────────────────────── */
  .e8-result-card { border: 0.5pt solid #ccc !important; border-left: 4pt solid #333 !important; padding: 7pt 9pt; margin-bottom: 5pt; break-inside: avoid; page-break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .e8-ml-3 { background: #f0fdf4 !important; border-left-color: #16a34a !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .e8-ml-2 { background: #fefce8 !important; border-left-color: #ca8a04 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .e8-ml-1 { background: #fff7ed !important; border-left-color: #ea580c !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .e8-ml-0 { background: #fef2f2 !important; border-left-color: #dc2626 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .e8-result-ctrl-label, .e8-result-ctrl-rating, .e8-result-ctrl-text { color: #000 !important; padding-left: 0 !important; }
  .e8-result-ctrl-rating { font-size: 8.5pt; }
  .e8-result-ctrl-text   { font-size: 8.5pt; margin-top: 3pt; }
  .e8-result-emoji       { font-size: 13pt; }
  .e8-start-here-badge   { background: #dc2626 !important; color: #fff !important; font-size: 7pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* ── Score bars ─────────────────────────────────────────── */
  .e8-score-bar-wrap  { background: #eee !important; max-width: 100pt !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .e8-score-bar-fill  { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Ensure colour prints */
  .e8-overall-badge, .e8-score-bar-fill, .e8-pes-th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  a { text-decoration: none; color: #000; }
}