/* ============================================================
   EUDR Customer Readiness Tool
   Structural + visual styling only. All colour, spacing and radius
   values reference the design-system tokens already exposed as CSS
   custom properties in assets/css/main.css (:root) — no hardcoded hex.
============================================================ */

.eudr-tool {
  padding: var(--space-12) 0 var(--space-24);
}

.eudr-tool .container {
  max-width: 980px;
}

.eudr-step {
  animation: eudrFadeIn var(--dur-slow) var(--ease-out);
}

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

.eudr-h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--n-900);
  margin-bottom: var(--space-4);
}

.eudr-h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--n-900);
  margin-bottom: var(--space-4);
}

.eudr-lead {
  font-size: 1.05rem;
  color: var(--n-600);
  max-width: 62ch;
  margin-bottom: var(--space-6);
}

.eudr-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--palm-red);
  margin-bottom: var(--space-4);
}

.eudr-eyebrow svg { width: 16px; height: 16px; }

.eudr-duration {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--n-500);
  margin-bottom: var(--space-6);
}

.eudr-duration svg { width: 15px; height: 15px; }

/* ----- Intro: key question cards ----- */
.eudr-key-questions { margin-bottom: var(--space-8); }

.eudr-kq-card {
  background: var(--n-0);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg, 18px);
  box-shadow: var(--box-shadow-sm, 0 1px 2px rgba(0,0,0,.05));
  padding: var(--space-6) var(--space-5);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.eudr-kq-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--palm-red);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.eudr-kq-text {
  font-weight: 600;
  color: var(--n-900);
  margin: 0;
}

.eudr-intro-ctas,
.eudr-journey-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

.eudr-journey-ctas { justify-content: space-between; margin-top: var(--space-8); }

/* ----- Journey: visual flow ----- */
.eudr-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--space-2);
  background: var(--n-50);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg, 18px);
  padding: var(--space-6) var(--space-4);
  margin-bottom: var(--space-8);
}

.eudr-flow-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
  width: 108px;
}

.eudr-flow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--n-0);
  border: 1.5px solid var(--border-strong);
  color: var(--palm-red);
}

.eudr-flow-icon svg { width: 22px; height: 22px; }

.eudr-flow-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--n-700);
  line-height: 1.25;
}

.eudr-flow-arrow {
  display: flex;
  align-items: center;
  color: var(--n-400);
  flex-shrink: 0;
}

.eudr-flow-arrow svg { width: 18px; height: 18px; }

@media (max-width: 767.98px) {
  .eudr-flow { flex-direction: column; align-items: center; }
  .eudr-flow-arrow { transform: rotate(90deg); }
}

/* ----- Journey: accordion stages ----- */
.eudr-journey-accordion { margin-bottom: var(--space-4); }

.eudr-journey-accordion .accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--border-radius, 12px);
  margin-bottom: var(--space-3);
  overflow: hidden;
}

.eudr-journey-accordion .accordion-button {
  font-weight: 700;
  color: var(--n-900);
  gap: var(--space-3);
}

.eudr-journey-accordion .accordion-button:not(.collapsed) {
  background: var(--n-50);
  color: var(--palm-red);
  box-shadow: none;
}

.eudr-journey-accordion .accordion-button:focus {
  box-shadow: 0 0 0 3px rgba(201, 12, 15, .14);
}

.eudr-stage-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--palm-red);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.eudr-stage-icon {
  display: inline-flex;
  color: var(--palm-red);
  flex-shrink: 0;
}

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

.eudr-stage-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.eudr-stage-points li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  color: var(--n-700);
}

.eudr-stage-points li svg {
  width: 16px;
  height: 16px;
  color: var(--sustain-green);
  margin-top: 3px;
  flex-shrink: 0;
}

/* ----- Questionnaire ----- */
.eudr-quiz-progress-wrap { margin-bottom: var(--space-6); }

.eudr-section-trail {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-3);
}

.eudr-section-trail li {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--n-400);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--n-50);
  border: 1px solid var(--border);
}

.eudr-section-trail li.is-current {
  color: #fff;
  background: var(--palm-red);
  border-color: var(--palm-red);
}

.eudr-section-trail li.is-done {
  color: var(--sustain-green);
  border-color: var(--sustain-green-75);
}

.eudr-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--n-100);
}

.eudr-progress .progress-bar {
  background: var(--palm-red);
  transition: width var(--dur) var(--ease-out);
}

.eudr-progress-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--n-500);
  margin: var(--space-2) 0 0;
}

.eudr-quiz-card {
  background: var(--n-0);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg, 18px);
  box-shadow: var(--box-shadow, 0 4px 10px rgba(0,0,0,.06));
  padding: var(--space-8) var(--space-6);
  margin-bottom: var(--space-6);
}

.eudr-quiz-section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--palm-red);
  margin-bottom: var(--space-3);
}

.eudr-quiz-question {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.25;
  color: var(--n-900);
  margin-bottom: var(--space-2);
}

.eudr-quiz-explanation {
  font-size: 14px;
  color: var(--n-500);
  margin-bottom: var(--space-5);
}

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

.eudr-answer-option {
  position: relative;
}

.eudr-answer-option .form-check-input {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}

.eudr-answer-option .form-check-label {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 16px 20px 16px 52px;
  border: 1.6px solid var(--border-strong);
  border-radius: var(--border-radius, 12px);
  font-weight: 600;
  color: var(--n-800);
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-fast);
}

.eudr-answer-option .form-check-input:focus-visible ~ .form-check-label {
  box-shadow: 0 0 0 3px rgba(201, 12, 15, .18);
  border-color: var(--palm-red);
}

.eudr-answer-option .form-check-label:hover {
  border-color: var(--palm-red);
}

.eudr-answer-option .form-check-input:checked ~ .form-check-label {
  border-color: var(--palm-red);
  background: rgba(201, 12, 15, .05);
  color: var(--palm-red);
}

.eudr-answer-option .form-check-input:checked ~ .form-check-label::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--palm-red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/14px no-repeat;
}

.eudr-inline-flag {
  margin-top: var(--space-5);
}

.eudr-q1-branch {
  margin-top: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.eudr-quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
}

.eudr-quiz-nav #eudrBackBtn:disabled,
.eudr-quiz-nav #eudrBackBtn.d-invisible {
  visibility: hidden;
}

/* ----- Result ----- */
.eudr-result-top {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  align-items: center;
  background: var(--n-0);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg, 18px);
  box-shadow: var(--box-shadow, 0 4px 10px rgba(0,0,0,.06));
  padding: var(--space-8) var(--space-6);
  margin-bottom: var(--space-8);
}

.eudr-meter {
  --meter-color: var(--palm-red);
  width: 148px;
  height: 148px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(var(--meter-color) calc(var(--meter-pct, 0) * 1%), var(--n-100) 0);
  display: flex;
  align-items: center;
  justify-content: center;
}

.eudr-meter-inner {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: var(--n-0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.eudr-meter-pct {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  color: var(--n-900);
}

.eudr-meter-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--n-400);
  margin-top: 4px;
}

.eudr-result-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: var(--space-2);
}

.eudr-result-status-badge.variant-success { background: rgba(0, 77, 36, .1); color: var(--sustain-green); }
.eudr-result-status-badge.variant-warning { background: rgba(232, 70, 38, .12); color: var(--palm-orange); }
.eudr-result-status-badge.variant-danger  { background: rgba(156, 16, 6, .1); color: var(--palm-brown); }

.eudr-result-text { color: var(--n-700); margin-bottom: var(--space-2); }
.eudr-result-action { color: var(--n-900); font-weight: 600; margin: 0; }

.eudr-result-section-title {
  font-weight: 800;
  font-size: 18px;
  color: var(--n-900);
  margin-bottom: var(--space-4);
}

.eudr-key-status-list {
  margin-bottom: var(--space-8);
}

.eudr-key-status-card {
  background: var(--n-0);
  border: 1px solid var(--border);
  border-radius: var(--border-radius, 12px);
  padding: var(--space-4) var(--space-5);
  height: 100%;
}

.eudr-key-status-card .eudr-kq-text { font-size: 14px; margin-bottom: 6px; }
.eudr-key-status-card .eudr-kq-status { font-size: 13px; color: var(--n-500); margin: 0; }

.eudr-priority-list {
  list-style: none;
  margin: 0 0 var(--space-8);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.eudr-priority-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: var(--n-0);
  border: 1px solid var(--border);
  border-radius: var(--border-radius, 12px);
  padding: var(--space-3) var(--space-4);
}

.eudr-priority-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--palm-red);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

.eudr-result-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.eudr-disclaimer {
  font-size: 12px;
  color: var(--n-400);
  border-top: 1px solid var(--hairline);
  padding-top: var(--space-4);
}

/* ----- Lead form ----- */
.eudr-lead-card {
  background: var(--n-0);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg, 18px);
  box-shadow: var(--box-shadow, 0 4px 10px rgba(0,0,0,.06));
  padding: var(--space-8) var(--space-6);
}

.eudr-hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

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

.eudr-thankyou {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--sustain-green);
}

.eudr-thankyou svg { width: 48px; height: 48px; margin-bottom: var(--space-3); }
.eudr-thankyou p { color: var(--n-700); font-weight: 600; margin: 0; }

/* ----- Responsive ----- */
@media (max-width: 575.98px) {
  .eudr-quiz-card { padding: var(--space-6) var(--space-4); }
  .eudr-intro-ctas .btn-primary-brand,
  .eudr-intro-ctas .btn-outline-brand-brown,
  .eudr-journey-ctas .btn-primary-brand,
  .eudr-journey-ctas .btn-outline-brand-brown,
  .eudr-quiz-nav .btn-primary-brand,
  .eudr-quiz-nav .btn-outline-brand-brown {
    width: 100%;
    justify-content: center;
  }
  .eudr-result-top { flex-direction: column; text-align: center; }
}

/* ----- Print ----- */
@media print {
  .site-headwrap, .site-footer, .breadcrumb-bar,
  .eudr-result-ctas, #eudrStepIntro, #eudrStepJourney, #eudrStepQuiz, #eudrStepLead {
    display: none !important;
  }
  .eudr-step-result { display: block !important; }
}
