:root {
  --epa-primary: #123456;
  --epa-primary-dark: #0c2438;
  --epa-primary-soft: #e8f1f8;
  --epa-accent: #1472ba;
  --epa-ink: #1f2937;
  --epa-muted: #667085;
  --epa-line: #e7e9ee;
  --epa-surface: #ffffff;
  --epa-bg: #f7f8fb;
  --epa-success: #157347;
  --epa-danger: #b42318;
  --epa-shadow: 0 16px 45px rgba(18, 52, 86, 0.12);
  --epa-radius: 18px;
}

.epa-app {
  width: min(1120px, 100%);
  margin: 24px auto;
  font-family: "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--epa-ink);
  box-sizing: border-box;
}

.epa-app *,
.epa-app *::before,
.epa-app *::after { box-sizing: border-box; }

.epa-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.epa-eyebrow {
  display: inline-flex;
  color: var(--epa-primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.epa-title {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.epa-subtitle {
  margin: 10px 0 0;
  color: var(--epa-muted);
  line-height: 1.6;
}

.epa-status-chip {
  white-space: nowrap;
  background: #fff;
  border: 1px solid var(--epa-line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--epa-muted);
  font-size: 0.88rem;
  box-shadow: 0 6px 20px rgba(31, 41, 55, 0.05);
}
/* Compact saving loader (Continue / explicit actions only) */
.epa-saving {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  pointer-events: none;
  background: transparent;
}
.epa-saving--open {
  display: flex;
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.18);
}
.epa-saving__box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 12px 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
}
.epa-saving__spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #f3d0e4;
  border-top-color: var(--epa-accent);
  animation: epaSpin 0.7s linear infinite;
  flex-shrink: 0;
}
.epa-saving__text {
  font-size: 0.92rem;
  font-weight: 600;
  color: #344054;
}
@keyframes epaSpin {
  to { transform: rotate(360deg); }
}


.epa-progress-wrap {
  background: #fff;
  border: 1px solid var(--epa-line);
  border-radius: 16px;
  padding: 14px 10px 12px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.epa-steps {
  display: grid;
  grid-template-columns: repeat(var(--epa-step-count, 8), minmax(72px, 1fr));
  align-items: start;
  min-width: 640px;
}

.epa-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.epa-step__rail {
  display: flex;
  align-items: center;
  width: 100%;
  height: 14px;
}

.epa-step__line {
  flex: 1 1 auto;
  height: 6px;
  background: #e8edf3;
  transition: background 0.2s ease;
}

/* Square joins so adjacent segments meet flush (no chevron gaps). */
.epa-step__line--before {
  margin-left: -1px;
}

.epa-step__line--after {
  margin-right: -1px;
}

.epa-step:first-child .epa-step__line--before,
.epa-step:last-child .epa-step__line--after {
  visibility: hidden;
  margin: 0;
}

.epa-step:first-child .epa-step__line--after {
  border-radius: 999px 0 0 999px;
}

.epa-step:last-child .epa-step__line--before {
  border-radius: 0 999px 999px 0;
}

.epa-step__dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d0d5dd;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #d0d5dd;
  z-index: 1;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.epa-step__label {
  text-align: center;
  color: var(--epa-muted);
  font-size: calc(0.72rem + 1px);
  font-weight: 650;
  line-height: 1.25;
  padding: 0 2px;
}

.epa-step.is-done .epa-step__line,
.epa-step.is-active .epa-step__line--before {
  background: linear-gradient(90deg, var(--epa-primary), var(--epa-accent));
}

.epa-step.is-done .epa-step__dot,
.epa-step.is-active .epa-step__dot {
  background: var(--epa-accent);
  box-shadow: 0 0 0 1px var(--epa-accent);
}

.epa-step.is-active .epa-step__label {
  color: var(--epa-primary);
  font-weight: 800;
}

.epa-step.is-done .epa-step__label {
  color: #157347;
}

.epa-panel {
  background: var(--epa-surface);
  border: 1px solid var(--epa-line);
  border-radius: var(--epa-radius);
  box-shadow: var(--epa-shadow);
  overflow: hidden;
}

.epa-page {
  display: none;
  padding: clamp(22px, 4vw, 42px);
  animation: epaFade 0.22s ease;
}

.epa-page.active { display: block; }

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

.epa-page-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--epa-line);
}

.epa-results-header {
  align-items: center;
}

.epa-results-header__copy {
  min-width: 0;
  flex: 1 1 auto;
}

.epa-results-header__score {
  flex: 0 0 auto;
  min-width: 160px;
  text-align: center;
  border: 1px solid #c5d6e4;
  border-radius: 14px;
  padding: 14px 18px;
  background: linear-gradient(145deg, #e8f1f8, #ffffff);
  box-shadow: 0 8px 20px rgba(18, 52, 86, 0.08);
}

.epa-results-header__score span {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--epa-muted);
}

.epa-results-header__score strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.75rem, 3vw, 2.2rem);
  line-height: 1;
  color: var(--epa-primary);
}

@media (max-width: 640px) {
  .epa-results-header {
    flex-direction: column;
    align-items: stretch;
  }
  .epa-results-header__score {
    width: 100%;
  }
}

.epa-section-tag {
  display: inline-block;
  background: var(--epa-primary-soft);
  color: var(--epa-primary-dark);
  border-radius: 999px;
  padding: 7px 11px;
  font-weight: 800;
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.epa-page h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
}

.epa-page-intro {
  margin: 8px 0 0;
  color: var(--epa-muted);
  line-height: 1.55;
}

.epa-privacy-notice {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #cfe0ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #f4f9fd, #ffffff);
  box-shadow: 0 6px 18px rgba(18, 52, 86, 0.05);
}

.epa-privacy-notice[hidden] {
  display: none;
}

.epa-privacy-notice__title {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--epa-primary);
  line-height: 1.3;
}

.epa-privacy-notice__text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--epa-muted);
}

.epa-count-badge {
  background: #f8f9fb;
  border: 1px solid var(--epa-line);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--epa-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.epa-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

.epa-field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.9rem;
  font-weight: 750;
}

.epa-app input[type="text"],
.epa-app input[type="email"],
.epa-app input[type="url"],
.epa-app input[type="date"],
.epa-app input[type="file"],
.epa-app textarea {
  width: 100%;
  border: 1px solid #d7dae0;
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  color: var(--epa-ink);
  background: #fff;
  outline: none;
}

.epa-app textarea { min-height: 120px; resize: vertical; }

.epa-app input:focus,
.epa-app textarea:focus {
  border-color: var(--epa-primary);
  box-shadow: 0 0 0 4px rgba(194, 24, 106, 0.11);
}

.epa-questions { display: grid; gap: 14px; }

.epa-question-card {
  border: 1px solid var(--epa-line);
  border-radius: 15px;
  padding: 18px;
  background: #fff;
}

.epa-question-top {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.epa-q-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--epa-primary-soft);
  color: var(--epa-primary-dark);
  font-weight: 850;
  font-size: 0.9rem;
}

.epa-q-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  line-height: 1.48;
  font-weight: 670;
}

.epa-q-label {
  display: block;
}

.epa-q-ref {
  display: block;
  max-width: 100%;
}

.epa-q-ref-note {
  color: var(--epa-primary-dark);
  font-size: 0.87rem;
  font-weight: 700;
}

.epa-choice-group { display: flex; gap: 8px; }

.epa-choice { position: relative; }

.epa-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.epa-choice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 9px 13px;
  border: 1px solid #d7dae0;
  border-radius: 10px;
  color: var(--epa-muted);
  font-size: 0.87rem;
  font-weight: 750;
  cursor: pointer;
  user-select: none;
}

.epa-choice input:checked + span.yes {
  background: #ecfdf3;
  border-color: #8bd7ad;
  color: var(--epa-success);
}

.epa-choice input:checked + span.no {
  background: #fff1f0;
  border-color: #f2aaa5;
  color: var(--epa-danger);
}

.epa-choice input:checked + span.na {
  background: #f2f4f7;
  border-color: #b8bec8;
  color: #475467;
}

.epa-reference-button {
  display: inline-flex;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1472ba;
  font-size: 0.87rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  box-shadow: none;
}

.epa-reference-button:hover,
.epa-reference-button:focus,
.epa-reference-button:focus-visible,
.epa-reference-button:active {
  background: transparent !important;
  background-color: transparent !important;
  color: #1a8fd4 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  border: 0 !important;
  outline: none;
}

.epa-extras {
  margin-top: 12px;
  margin-left: 56px;
  display: grid;
  gap: 10px;
}

.epa-extras summary {
  color: var(--epa-muted);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
}

.epa-extras textarea { min-height: 76px; font-size: 0.91rem; }

.epa-details,
.epa-details summary,
.epa-extras.epa-details,
.epa-extras.epa-details summary {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.epa-details {
  margin-top: 12px;
  margin-left: 56px;
  padding: 0;
}

.epa-details summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  color: var(--epa-muted);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

.epa-details summary::-webkit-details-marker {
  display: none;
}

.epa-details summary::marker {
  content: "";
}

.epa-details summary::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 3.5px 0 3.5px 5px;
  border-color: transparent transparent transparent currentColor;
  flex-shrink: 0;
  opacity: 0.75;
  transition: transform 0.15s ease;
}

.epa-details[open] summary::before {
  transform: rotate(90deg);
}

.epa-details[open] summary {
  margin-bottom: 8px;
}

.epa-details label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--epa-muted);
}

.epa-details textarea {
  min-height: 76px;
  font-size: 0.91rem;
  width: 100%;
  border: 1px solid var(--epa-line);
  border-radius: 10px;
}


.epa-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.epa-proof-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  font-size: 0.85rem;
  color: var(--epa-muted);
}

.epa-proof-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--epa-line);
}

.epa-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--epa-line);
  flex-wrap: wrap;
}

.epa-btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.epa-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.epa-btn-secondary {
  background: #fff;
  color: var(--epa-primary);
  border: 1px solid #d0d5dd;
}

.epa-btn-secondary:hover,
.epa-btn-secondary:focus {
  border-color: var(--epa-accent);
  color: var(--epa-accent);
  background: #f8fbfe;
}

.epa-btn-primary {
  background: var(--epa-accent);
  color: #fff;
}

.epa-btn-primary:hover,
.epa-btn-primary:focus {
  background: #0f5f9c;
  color: #fff;
}

.epa-btn-danger {
  background: transparent;
  color: var(--epa-danger);
  border: 0;
  padding: 0;
  font-size: 0.8rem;
  cursor: pointer;
}

a.epa-btn {
  text-decoration: none;
}

.epa-btn svg {
  flex: 0 0 auto;
}

/* Report step — 2-column cards + full-width CTA row */
.epa-report-panel {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

#epaPageReport .epa-page-header {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 20px;
}

.epa-report-hint {
  margin: 0 0 18px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--epa-muted);
}

.epa-report-hint[hidden] {
  display: none;
}

.epa-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 18px;
  align-items: stretch;
}

.epa-report-card,
.epa-preview-cta,
.epa-email-cta,
.epa-finish-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin: 0;
  padding: 22px 22px 20px;
  border: 1px solid #cfe0ef;
  border-radius: 16px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f4f9fd 100%);
  box-shadow: 0 8px 24px rgba(18, 52, 86, 0.06);
  color: inherit;
  position: relative;
  overflow: hidden;
}

.epa-report-card::before,
.epa-preview-cta::before,
.epa-email-cta::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--epa-primary), var(--epa-accent));
}

.epa-preview-cta__icon,
.epa-email-cta__icon,
.epa-preview-cta__info,
.epa-email-cta__info,
.epa-preview-cta__copy,
.epa-email-cta__copy {
  display: contents;
}

.epa-report-card__title,
.epa-preview-cta__title,
.epa-email-cta__title,
.epa-report-row__title {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 750;
  color: var(--epa-primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.epa-report-card__sub,
.epa-preview-cta__sub,
.epa-email-cta__sub,
.epa-report-row__sub {
  margin: 0 0 18px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--epa-muted);
}

.epa-report-card > .epa-btn,
.epa-preview-cta > .epa-btn,
.epa-preview-cta__btn,
.epa-email-cta__btn {
  margin-top: auto;
}

.epa-preview-cta__btn,
.epa-email-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--epa-accent);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.epa-preview-cta__btn:hover,
.epa-email-cta__btn:hover,
.epa-preview-cta__btn:focus,
.epa-email-cta__btn:focus {
  background: #0f5f9c;
  color: #fff;
}

.epa-report-next {
  display: block;
  margin: 0;
  padding: 20px 22px;
  border: 1px solid #cfe0ef;
  border-radius: 16px;
  background:
    linear-gradient(135deg, var(--epa-primary-soft) 0%, #ffffff 55%);
  box-shadow: 0 8px 24px rgba(18, 52, 86, 0.05);
}

.epa-report-next__text {
  margin: 0 0 14px;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.55;
}

.epa-report-next__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.epa-report-next__actions .epa-btn {
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  text-align: center;
  white-space: normal;
  line-height: 1.35;
  height: auto;
  min-height: 40px;
  padding: 9px 16px;
  font-size: 0.9rem;
  font-weight: 600;
}

.epa-email-cta__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  justify-content: flex-start;
}

.epa-email-cta__form input[type="email"] {
  flex: 1 1 160px;
  min-width: 0;
  max-width: none;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  font-size: 0.92rem;
  color: var(--epa-ink);
}

.epa-email-cta__form input[type="email"]:focus {
  outline: 0;
  border-color: var(--epa-accent);
  box-shadow: 0 0 0 3px rgba(20, 114, 186, 0.15);
}

.epa-email-cta__form input[type="email"].epa-field-error {
  border-color: var(--epa-danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.epa-email-cta__subscribe {
  flex: 1 1 100%;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 2px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #667085;
  cursor: pointer;
}

.epa-email-cta__subscribe input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--epa-accent);
  cursor: pointer;
}

.epa-email-cta__subscribe a {
  color: var(--epa-accent);
  text-decoration: underline;
}

.epa-app .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#epaPageReport .epa-actions {
  margin-top: 32px;
  padding-top: 0;
  border-top: 0;
}

@media (max-width: 800px) {
  .epa-report-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .epa-report-card > .epa-btn,
  .epa-preview-cta__btn,
  .epa-email-cta__form,
  .epa-email-cta__form .epa-btn,
  .epa-email-cta__btn {
    width: 100%;
  }

  .epa-report-next__actions .epa-btn {
    width: auto;
    flex: 0 1 auto;
  }

  .epa-email-cta__form {
    justify-content: stretch;
  }

  .epa-email-cta__form input[type="email"] {
    flex: 1 1 100%;
  }
}

.epa-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.epa-score-card {
  border: 1px solid var(--epa-line);
  border-radius: 14px;
  padding: 16px;
  background: #fff;
}

.epa-score-card strong {
  display: block;
  font-size: 1.6rem;
  margin-top: 6px;
  color: var(--epa-primary-dark);
}

.epa-section-scores,
.epa-rec-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.epa-section-scores {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.epa-section-score-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 110px;
}

.epa-section-score-card__label {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.4;
  color: var(--epa-ink);
}

.epa-section-score-card__value {
  margin-top: auto;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--epa-primary);
}

@media (max-width: 640px) {
  .epa-section-scores {
    grid-template-columns: 1fr;
  }
}

.epa-rec-item {
  border: 1px solid var(--epa-line);
  border-radius: 12px;
  padding: 14px;
}

.epa-priority {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.epa-priority.high { background: #fff1f0; color: var(--epa-danger); }
.epa-priority.medium { background: #fff7ed; color: #c2410c; }
.epa-priority.low { background: #f2f4f7; color: #475467; }

.epa-footer-note {
  text-align: center;
  color: var(--epa-muted);
  font-size: 0.78rem;
  margin-top: 14px;
}

.epa-modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.58);
  z-index: 100000;
}

.epa-modal-backdrop.open { display: flex; }

.epa-reference-modal {
  width: min(760px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.epa-modal-header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--epa-line);
  background: #fff;
}

.epa-modal-kicker {
  margin: 0 0 6px;
  color: var(--epa-primary);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.epa-modal-title { margin: 0; font-size: 1.25rem; padding-right: 8px; }

.epa-modal-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: -4px -6px 0 0;
  padding: 0;
  border: 1px solid var(--epa-line);
  border-radius: 10px;
  background: #fff;
  color: var(--epa-muted);
  line-height: 1;
  cursor: pointer;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.epa-modal-close svg {
  display: block;
}

.epa-modal-close:hover,
.epa-modal-close:focus-visible {
  color: var(--epa-primary-dark);
  background: var(--epa-primary-soft);
  border-color: #f0c2d8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(194, 24, 106, 0.12);
}

.epa-modal-close:active {
  background: #ffe4f0;
}

.epa-modal-body { padding: 22px 24px 26px; }

.epa-provision-text {
  margin: 0;
  color: #344054;
  line-height: 1.72;
  white-space: pre-line;
}

.epa-provision-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--epa-primary);
  background: var(--epa-primary-soft);
  color: #334155;
  font-size: 0.86rem;
  line-height: 1.55;
}

@media (max-width: 780px) {
  .epa-topbar { flex-direction: column; }
  .epa-form-grid { grid-template-columns: 1fr; }
  .epa-question-top { grid-template-columns: 38px 1fr; }
  .epa-choice-group { grid-column: 1 / -1; margin-left: 52px; }
  .epa-extras { margin-left: 52px; }
  .epa-results-grid { grid-template-columns: 1fr; }
  .epa-page-header { flex-direction: column; }
}

/* Compact vertical footprint on small screens */
@media (max-width: 640px) {
  .epa-app {
    margin: 12px auto;
  }

  .epa-progress-wrap {
    padding: 10px 8px 8px;
    margin-bottom: 10px;
    border-radius: 12px;
  }

  .epa-step {
    gap: 4px;
  }

  .epa-step__label {
    font-size: 0.65rem;
    line-height: 1.2;
  }

  .epa-page {
    padding: 14px 14px 16px;
  }

  .epa-page-header {
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 14px;
  }

  .epa-page h2 {
    font-size: 1.2rem;
  }

  .epa-page-intro {
    margin-top: 4px;
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .epa-privacy-notice {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
  }

  .epa-privacy-notice__title {
    font-size: 0.82rem;
    margin-bottom: 4px;
  }

  .epa-privacy-notice__text {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .epa-form-grid {
    gap: 12px;
  }

  .epa-field-label {
    margin-bottom: 5px;
    font-size: 0.84rem;
  }

  .epa-app input[type="text"],
  .epa-app input[type="email"],
  .epa-app input[type="url"],
  .epa-app input[type="date"],
  .epa-app input[type="file"],
  .epa-app textarea {
    padding: 10px 12px;
    border-radius: 10px;
  }

  .epa-app textarea {
    min-height: 72px;
  }

  .epa-questions {
    gap: 10px;
  }

  .epa-question-card {
    padding: 12px;
    border-radius: 12px;
  }

  .epa-question-top {
    gap: 10px;
  }

  .epa-choice-group {
    margin-left: 0;
    gap: 6px;
  }

  .epa-choice span {
    min-width: 54px;
    padding: 7px 10px;
    font-size: 0.8rem;
  }

  .epa-extras {
    margin-left: 0;
    margin-top: 8px;
  }

  .epa-extras textarea {
    min-height: 56px;
  }

  .epa-actions {
    margin-top: 16px;
    padding-top: 14px;
    gap: 8px;
  }

  .epa-btn {
    padding: 10px 14px;
  }
}

@media print {
  .epa-topbar,
  .epa-progress-wrap,
  .epa-actions,
  .epa-footer-note,
  .epa-preview-cta,
  .epa-report-actions { display: none !important; }
  .epa-panel { border: 0; box-shadow: none; }
  .epa-page { display: block !important; page-break-after: always; }
}

/* Centered alert / toast */
.epa-toast {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 100001;
}
.epa-toast--open { display: flex; }
.epa-toast__card {
  width: min(420px, 100%);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
  padding: 36px 28px 32px;
  border: 1px solid #e5e7eb;
  position: relative;
  text-align: center;
  animation: epaToastIn 0.22s ease;
}
.epa-toast__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  background: #f3f4f6;
  color: #4b5563;
  margin: 0 auto;
}
.epa-toast--error .epa-toast__icon {
  background: #fef3f2;
  color: #b42318;
  box-shadow: inset 0 0 0 1px #fecdca;
}
.epa-toast--success .epa-toast__icon {
  background: #ecfdf3;
  color: #067647;
  box-shadow: inset 0 0 0 1px #abefc6;
}
.epa-toast--info .epa-toast__icon {
  background: #e8f1f8;
  color: #1472ba;
  box-shadow: inset 0 0 0 1px #c5d6e4;
}
.epa-toast__body {
  min-width: 0;
  width: 100%;
  text-align: center;
  padding: 0 8px;
}
.epa-toast__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
  text-align: center;
}
.epa-toast__msg {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #4b5563;
  font-weight: 500;
  text-align: center;
}
.epa-toast__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.epa-toast__close:hover {
  background: #f2f4f7;
  border-color: #98a2b3;
  color: #101828;
}
.epa-toast__close:focus-visible {
  outline: 2px solid var(--epa-accent);
  outline-offset: 2px;
}
@keyframes epaToastIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Required field errors */
.epa-app input.epa-field-error,
.epa-app textarea.epa-field-error,
.epa-field.epa-field-error input,
.epa-field.epa-field-error textarea {
  border-color: #b42318 !important;
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.12) !important;
  background: #fff8f7;
}
.epa-question-card.epa-question-error {
  border-color: #b42318;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
  background: #fff8f7;
}