/* =========================================================
   WEH QUIZ — Stylesheet v1.0
   Colori: solo arancioni progressivi. Niente rosso giudicante.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --weh-orange:       #D97706;
  --weh-orange-light: #F59E0B;
  --weh-orange-pale:  #FFFBEB;
  --weh-orange-mid:   #FDE68A;
  --weh-orange-dark:  #B45309;
  --weh-orange-deep:  #92400E;
  --weh-bg:           #FAFAF8;
  --weh-surface:      #FFFFFF;
  --weh-text:         #1C1A16;
  --weh-muted:        #78716C;
  --weh-border:       #E7E5E0;
  --weh-green:        #059669;
  --weh-green-pale:   #D1FAE5;
  --weh-radius:       20px;
  --weh-highlight:    #FFFBEB;
  --weh-border-warm:  #FDE68A;
}

/* ── Wrapper generale ─────────────────────────────────────── */
.weh-quiz-wrap {
  font-family: 'DM Sans', sans-serif;
  color: var(--weh-text);
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

/* ── Topbar ───────────────────────────────────────────────── */
.weh-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--weh-border);
  margin-bottom: 40px;
  position: sticky;
  top: 0;
  background: var(--weh-bg);
  z-index: 50;
}
.weh-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--weh-orange);
  letter-spacing: 1px;
}
.weh-logo span { color: var(--weh-text); }
.weh-topbar-center { display: flex; align-items: center; gap: 16px; }

/* ── Timer ────────────────────────────────────────────────── */
.weh-timer-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--weh-bg); border: 1px solid var(--weh-border);
  border-radius: 30px; padding: 7px 16px;
}
.weh-timer-dot {
  width: 7px; height: 7px;
  background: var(--weh-orange-light);
  border-radius: 50%;
  animation: weh-pulse 1.2s infinite;
}
.weh-timer-dot.weh-urgent { background: var(--weh-orange-dark); }
@keyframes weh-pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }
.weh-timer-display {
  font-size: 0.9rem; font-weight: 500;
  color: var(--weh-text);
  font-variant-numeric: tabular-nums;
  min-width: 38px;
}
.weh-timer-display.weh-urgent { color: var(--weh-orange-dark); }

/* ── Score live ───────────────────────────────────────────── */
.weh-score-live {
  font-size: 0.82rem; color: var(--weh-muted);
  display: flex; align-items: center; gap: 5px;
}
.weh-score-live-num { font-weight: 500; color: var(--weh-text); }

.weh-section-tag {
  font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--weh-orange); background: var(--weh-orange-pale);
  border: 1px solid var(--weh-orange-mid);
  padding: 5px 12px; border-radius: 40px;
}

/* ── Screens ──────────────────────────────────────────────── */
.weh-screen { display: none; }
.weh-screen.weh-active {
  display: block;
  animation: weh-fadein 0.3s ease;
}
@keyframes weh-fadein {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ── Progress bar ─────────────────────────────────────────── */
.weh-progress-wrap {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px;
}
.weh-progress-bg {
  flex: 1; height: 6px;
  background: var(--weh-border);
  border-radius: 10px; overflow: hidden;
}
.weh-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--weh-orange-light), var(--weh-orange));
  border-radius: 10px;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
}
.weh-progress-text { font-size: 0.78rem; color: var(--weh-muted); white-space: nowrap; }

/* ── Card generica ────────────────────────────────────────── */
.weh-card {
  background: var(--weh-surface);
  border-radius: var(--weh-radius);
  border: 1px solid var(--weh-border);
  padding: 40px;
  margin-bottom: 20px;
}
.weh-card-center { text-align: center; }

/* ── Intro ────────────────────────────────────────────────── */
.weh-intro-tag {
  display: inline-block;
  background: var(--weh-orange-pale); color: var(--weh-orange);
  border: 1px solid var(--weh-orange-mid);
  border-radius: 40px; padding: 6px 16px;
  font-size: 0.72rem; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 500; margin-bottom: 28px;
}
.weh-cert-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--weh-green-pale); color: var(--weh-green);
  border: 1px solid #A7F3D0;
  border-radius: 40px; padding: 6px 16px;
  font-size: 0.72rem; letter-spacing: 1.5px; text-transform: uppercase;
  font-weight: 500; margin-bottom: 28px;
}
.weh-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem; line-height: 1.25; font-weight: 600;
  margin-bottom: 14px; color: var(--weh-text);
}
.weh-title em { font-style: italic; color: var(--weh-orange); }
.weh-sub {
  font-size: 0.92rem; color: var(--weh-muted);
  line-height: 1.8; font-weight: 300;
  max-width: 420px; margin: 0 auto 28px;
}
.weh-meta {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; padding: 18px;
  background: var(--weh-bg); border-radius: 14px;
  margin: 0 auto 32px;
}
.weh-meta-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem; font-weight: 600; color: var(--weh-orange); line-height: 1;
}
.weh-meta-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--weh-muted); margin-top: 3px;
}
.weh-meta-div { width: 1px; height: 36px; background: var(--weh-border); }

.weh-rules {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; max-width: 420px; margin: 0 auto 32px;
}
.weh-rule {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--weh-bg); border-radius: 12px; padding: 14px; text-align: left;
}
.weh-rule-icon { font-size: 1.1rem; flex-shrink: 0; }
.weh-rule-text { font-size: 0.8rem; color: var(--weh-muted); line-height: 1.4; }
.weh-rule-text strong { display: block; color: var(--weh-text); font-weight: 500; margin-bottom: 2px; }

/* ── Buttons ──────────────────────────────────────────────── */
.weh-btn-primary {
  display: inline-block;
  background: var(--weh-orange); color: #fff;
  border: none; padding: 15px 38px; border-radius: 40px;
  font-family: 'DM Sans', sans-serif; font-size: 0.92rem; font-weight: 500;
  cursor: pointer; transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}
.weh-btn-primary:hover { background: var(--weh-orange-dark); transform: translateY(-1px); color: #fff; }
.weh-btn-primary:disabled { background: var(--weh-border); color: var(--weh-muted); cursor: not-allowed; transform: none; }

.weh-btn-outline {
  display: inline-block;
  background: transparent; color: var(--weh-orange);
  border: 1.5px solid var(--weh-orange); padding: 13px 32px; border-radius: 40px;
  font-family: 'DM Sans', sans-serif; font-size: 0.92rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.weh-btn-outline:hover { background: var(--weh-orange-pale); color: var(--weh-orange); }

.weh-btn-ghost {
  background: none; border: none; font-size: 0.85rem;
  color: var(--weh-muted); cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.weh-btn-ghost:hover { color: var(--weh-text); }

.weh-btn-white {
  display: inline-block;
  background: #fff; color: var(--weh-orange);
  border: none; padding: 13px 28px; border-radius: 40px;
  font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 500;
  cursor: pointer; transition: opacity 0.2s; text-decoration: none;
}
.weh-btn-white:hover { opacity: 0.9; color: var(--weh-orange); }

.weh-btn-row {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.weh-btn-row .weh-btn-primary,
.weh-btn-row .weh-btn-outline { flex: 1; min-width: 140px; text-align: center; }

/* ── Question ─────────────────────────────────────────────── */
.weh-q-section {
  font-size: 0.68rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--weh-orange); margin-bottom: 6px; font-weight: 500;
}
.weh-q-context {
  font-size: 0.85rem; color: var(--weh-muted); line-height: 1.7;
  background: var(--weh-orange-pale);
  border-left: 3px solid var(--weh-orange-light);
  padding: 12px 16px; border-radius: 0 8px 8px 0;
  margin-bottom: 18px; font-style: italic;
}
.weh-q-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.5rem; font-weight: 600;
  color: var(--weh-orange-mid); line-height: 1;
  margin-bottom: 12px; letter-spacing: -2px;
}
.weh-q-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; line-height: 1.4; font-weight: 600;
  margin-bottom: 26px; color: var(--weh-text);
}
.weh-options { display: flex; flex-direction: column; gap: 10px; }
.weh-option {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px; border: 1.5px solid var(--weh-border);
  border-radius: 12px; cursor: pointer; transition: all 0.18s;
  background: var(--weh-surface);
}
.weh-option:hover { border-color: var(--weh-orange-light); background: var(--weh-orange-pale); }
.weh-option.weh-selected { border-color: var(--weh-orange); background: var(--weh-orange-pale); }
.weh-option-letter {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--weh-bg); border: 1.5px solid var(--weh-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 500; color: var(--weh-muted);
  flex-shrink: 0; transition: all 0.18s;
}
.weh-option.weh-selected .weh-option-letter {
  background: var(--weh-orange); border-color: var(--weh-orange); color: #fff;
}
.weh-option-text { font-size: 0.92rem; line-height: 1.4; color: var(--weh-text); }
.weh-q-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; }

/* ── Riepilogo ────────────────────────────────────────────── */
.weh-recap-header { text-align: center; margin-bottom: 28px; }
.weh-recap-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.weh-recap-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--weh-surface); border: 1px solid var(--weh-border);
  border-radius: 12px; padding: 13px 18px;
}
.weh-recap-num { font-size: 0.72rem; color: var(--weh-muted); width: 20px; text-align: center; flex-shrink: 0; }
.weh-recap-q { flex: 1; font-size: 0.85rem; line-height: 1.35; color: var(--weh-text); }
.weh-recap-q small { display: block; font-size: 0.78rem; color: var(--weh-muted); margin-top: 2px; }
.weh-recap-icon { font-size: 0.9rem; flex-shrink: 0; color: var(--weh-muted); }
.weh-recap-actions { display: flex; gap: 12px; }

/* ── Risultato: score ─────────────────────────────────────── */
.weh-result-badge {
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: 40px; padding: 6px 20px;
  font-size: 0.72rem; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 500; margin-bottom: 22px;
}
/* Solo arancioni: niente verde giudicante, niente rosso */
.weh-badge-pass   { background: var(--weh-orange-pale); color: var(--weh-orange-deep); border: 1px solid var(--weh-orange-mid); }
.weh-badge-solid  { background: #FEF3C7; color: var(--weh-orange-deep); border: 1px solid var(--weh-orange-mid); }
.weh-badge-fail   { background: #FEF3C7; color: var(--weh-orange-deep); border: 1px solid var(--weh-orange-mid); }
.weh-badge-p1     { background: var(--weh-orange-pale); color: var(--weh-orange-deep); border: 1px solid var(--weh-orange-mid); }
.weh-badge-p2     { background: #FEF3C7;               color: var(--weh-orange-deep); border: 1px solid var(--weh-orange-mid); }
.weh-badge-p3     { background: #FFEDD5;               color: var(--weh-orange-deep); border: 1px solid #FED7AA; }

.weh-score-big {
  font-family: 'Cormorant Garamond', serif;
  font-size: 5rem; font-weight: 600; color: var(--weh-orange);
  line-height: 1; letter-spacing: -3px;
}
.weh-score-denom { font-size: 1.1rem; color: var(--weh-muted); font-weight: 300; }
.weh-score-level {
  display: inline-block;
  background: var(--weh-orange-pale); color: var(--weh-orange);
  border: 1px solid var(--weh-orange-mid); border-radius: 40px;
  padding: 5px 16px; font-size: 0.75rem; letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: 500; margin: 12px 0 16px;
}
.weh-result-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem; font-weight: 600; margin-bottom: 10px;
}
.weh-result-msg {
  font-size: 0.9rem; color: var(--weh-muted); line-height: 1.8;
  max-width: 400px; margin: 0 auto 16px;
}
.weh-result-psych {
  font-size: 0.82rem; color: var(--weh-muted); font-style: italic;
  border-top: 1px solid var(--weh-border); padding-top: 16px; margin-top: 8px;
}

/* ── Dettagli risultato (profilo) ─────────────────────────── */
.weh-detail-label {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 2px;
  color: var(--weh-muted); margin-bottom: 10px; margin-top: 18px;
}
.weh-detail-label:first-child { margin-top: 0; }
.weh-detail-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.weh-detail-item { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; color: var(--weh-text); }
.weh-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.weh-dot-on  { background: var(--weh-orange); }
.weh-dot-off { background: var(--weh-border); }

/* ── Fail screen ──────────────────────────────────────────── */
.weh-fail-areas { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 24px; }
.weh-fail-area {
  display: flex; align-items: center; gap: 12px;
  background: var(--weh-orange-pale); border: 1px solid var(--weh-orange-mid);
  border-radius: 10px; padding: 12px 16px; font-size: 0.88rem; color: var(--weh-text);
}
.weh-fail-area-icon { font-size: 1rem; flex-shrink: 0; }
.weh-retry-note {
  font-size: 0.82rem; color: var(--weh-muted); text-align: center;
  margin-top: 12px; font-style: italic;
}

/* ── Email section ────────────────────────────────────────── */
.weh-email-label {
  font-size: 0.72rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--weh-muted); margin-bottom: 14px;
}
.weh-email-form { display: flex; gap: 10px; }
.weh-email-input {
  flex: 1; padding: 13px 18px;
  border: 1.5px solid var(--weh-border); border-radius: 12px;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem;
  color: var(--weh-text); background: var(--weh-bg); outline: none;
  transition: border-color 0.2s;
}
.weh-email-input:focus { border-color: var(--weh-orange); background: var(--weh-surface); }
.weh-email-input::placeholder { color: var(--weh-muted); }
.weh-email-sent {
  display: none; align-items: center; gap: 10px;
  background: var(--weh-orange-pale); border: 1px solid var(--weh-orange-mid);
  border-radius: 12px; padding: 14px 18px;
  font-size: 0.85rem; color: var(--weh-orange-deep);
}
.weh-email-sent.weh-visible { display: flex; }

/* ── CTA card arancione ───────────────────────────────────── */
.weh-cta-card {
  background: var(--weh-orange); border-radius: var(--weh-radius);
  padding: 36px; text-align: center; color: #fff;
}
.weh-cta-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem; font-weight: 600; margin-bottom: 8px;
}
.weh-cta-sub { font-size: 0.88rem; opacity: 0.85; margin-bottom: 22px; }
.weh-cta-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── Timeout ──────────────────────────────────────────────── */
.weh-timeout-icon { font-size: 3rem; margin-bottom: 20px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .weh-card { padding: 24px 18px; }
  .weh-title { font-size: 1.9rem; }
  .weh-q-num { font-size: 2.8rem; }
  .weh-q-text { font-size: 1.25rem; }
  .weh-score-big { font-size: 4rem; }
  .weh-rules { grid-template-columns: 1fr; }
  .weh-email-form { flex-direction: column; }
  .weh-btn-row { flex-direction: column; }
  .weh-score-live { display: none; }
  .weh-meta { gap: 14px; }
  .weh-cta-buttons { flex-direction: column; }
}

/* ─────────────────────────────────────────────────────────────
   REGISTRAZIONE
   ───────────────────────────────────────────────────────────── */
.weh-reg-form {
  max-width: 440px;
  margin: 0 auto;
  text-align: left;
}
.weh-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.weh-field {
  margin-bottom: 18px;
}
.weh-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--weh-muted);
  margin-bottom: 7px;
  font-weight: 500;
}
.weh-input-wrap {
  position: relative;
}
.weh-input {
  width: 100%;
  padding: 13px 18px;
  border: 1.5px solid var(--weh-border);
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--weh-text);
  background: var(--weh-bg);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.weh-input:focus {
  border-color: var(--weh-orange);
  background: var(--weh-surface);
}
.weh-input.weh-input-error {
  border-color: var(--weh-orange-dark);
}
.weh-input::placeholder { color: var(--weh-muted); }
.weh-pwd-toggle {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; font-size: 1rem;
  line-height: 1; color: var(--weh-muted);
}
.weh-field-error {
  font-size: 0.78rem;
  color: var(--weh-orange-dark);
  margin-top: 5px;
  min-height: 18px;
}
.weh-err-general {
  text-align: center;
  margin-bottom: 14px;
  font-size: 0.85rem;
}
.weh-privacy-wrap {
  margin-bottom: 20px;
}
.weh-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--weh-muted);
  line-height: 1.5;
}
.weh-checkbox-label input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 1px;
  accent-color: var(--weh-orange);
  flex-shrink: 0;
  cursor: pointer;
}
.weh-link {
  color: var(--weh-orange);
  text-decoration: underline;
}
.weh-link:hover { color: var(--weh-orange-dark); }
.weh-btn-full {
  width: 100%;
  text-align: center;
  padding: 15px;
  margin-bottom: 16px;
}
.weh-already-login {
  text-align: center;
  font-size: 0.82rem;
  color: var(--weh-muted);
  margin: 0;
}

/* Spinner */
.weh-spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--weh-border);
  border-top-color: var(--weh-orange);
  border-radius: 50%;
  animation: weh-spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes weh-spin { to { transform: rotate(360deg); } }

/* Success icon */
.weh-success-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

@media (max-width: 480px) {
  .weh-field-row { grid-template-columns: 1fr; gap: 0; }
}

/* ─────────────────────────────────────────────────────────────
   DASHBOARD UTENTE
   ───────────────────────────────────────────────────────────── */

.weh-dash-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px 40px;
  background: var(--weh-surface);
  border-bottom: 1px solid var(--weh-border);
}
.weh-dash-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--weh-orange);
  color: #fff; font-size: 1.4rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; letter-spacing: 1px;
}
.weh-dash-welcome { flex: 1; }

/* CTA row */
.weh-dash-cta-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; padding: 24px 40px;
}
.weh-dash-cta-btn {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 4px; padding: 22px 24px; border-radius: 16px;
  text-decoration: none; transition: transform 0.15s, box-shadow 0.15s;
  border: 1.5px solid transparent;
}
.weh-dash-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(217,119,6,0.15); }
.weh-dash-cta-primary {
  background: var(--weh-orange);
  border-color: var(--weh-orange-dark);
}
.weh-dash-cta-outline {
  background: var(--weh-surface);
  border-color: var(--weh-border);
}
.weh-dash-cta-icon { font-size: 1.6rem; }
.weh-dash-cta-label {
  font-size: 1rem; font-weight: 600;
  color: var(--weh-text);
}
.weh-dash-cta-primary .weh-dash-cta-label { color: #fff; }
.weh-dash-cta-sub {
  font-size: 0.78rem; color: var(--weh-muted);
}
.weh-dash-cta-primary .weh-dash-cta-sub { color: rgba(255,255,255,0.8); }

/* Card */
.weh-card {
  margin: 0 40px 20px;
  background: #fff;
  border: 1px solid var(--weh-border);
  border-radius: 16px;
  padding: 24px;
}

/* Track items */
.weh-dash-track-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--weh-border);
}
.weh-dash-track-item:last-child { border-bottom: none; }
.weh-dash-track-icon { font-size: 1.2rem; width: 24px; text-align: center; flex-shrink: 0; }
.weh-dash-track-body { flex: 1; }
.weh-dash-track-title { font-size: 0.88rem; font-weight: 500; color: var(--weh-text); margin-bottom: 3px; }
.weh-dash-track-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.weh-track-locked .weh-dash-track-title { color: var(--weh-muted); }

/* Stats grid */
.weh-dash-stats-grid {
  display: flex; align-items: center; justify-content: space-around;
  flex-wrap: wrap; gap: 8px;
}
.weh-dash-stat { text-align: center; padding: 10px 16px; }
.weh-meta-num {
  font-size: 1.8rem; font-weight: 600; color: var(--weh-orange);
  font-family: 'Cormorant Garamond', Georgia, serif; line-height: 1;
  margin-bottom: 4px;
}
.weh-meta-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--weh-muted); }
.weh-dash-stat-div { width: 1px; height: 40px; background: var(--weh-border); }

/* Attestato */
.weh-dash-attestato {
  display: flex; align-items: center; gap: 16px;
  background: var(--weh-highlight); border: 1px solid var(--weh-border-warm);
  border-radius: 12px; padding: 18px 20px;
}
.weh-dash-att-icon { font-size: 2rem; flex-shrink: 0; }
.weh-dash-att-body { flex: 1; }

/* Score level badge */
.weh-score-level {
  display: inline-block; background: var(--weh-orange);
  color: #fff; border-radius: 20px; padding: 4px 12px;
  font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase;
}

/* Buttons */
.weh-btn-ghost {
  display: inline-block; background: none;
  border: 1px solid var(--weh-border); color: var(--weh-muted);
  padding: 7px 14px; border-radius: 20px; font-size: 0.8rem;
  text-decoration: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s, color 0.2s;
}
.weh-btn-ghost:hover { border-color: var(--weh-orange); color: var(--weh-orange); }

.weh-btn-outline {
  display: inline-block; background: none;
  border: 1.5px solid var(--weh-orange); color: var(--weh-orange);
  padding: 10px 22px; border-radius: 40px; font-size: 0.85rem;
  text-decoration: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s, color 0.2s;
}
.weh-btn-outline:hover { background: var(--weh-orange); color: #fff; }

.weh-detail-label {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 2px; color: var(--weh-muted); font-weight: 500;
}

@media (max-width: 640px) {
  .weh-dash-header       { padding: 24px 20px; }
  .weh-dash-cta-row      { grid-template-columns: 1fr; padding: 16px 20px; }
  .weh-card              { margin: 0 16px 16px; padding: 18px; }
  .weh-dash-stats-grid   { gap: 4px; }
  .weh-dash-stat         { padding: 8px 10px; }
  .weh-dash-stat-div     { display: none; }
}

/* ─────────────────────────────────────────────────────────────
   DASHBOARD UTENTE
   ───────────────────────────────────────────────────────────── */

/* Header personale */
.weh-dash-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px 40px;
  background: var(--weh-surface);
  border-bottom: 1px solid var(--weh-border);
}
.weh-dash-avatar {
  width: 64px; height: 64px;
  background: var(--weh-orange);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem; font-weight: 600;
  flex-shrink: 0;
}
.weh-dash-welcome { flex: 1; }

/* CTA row — due pulsanti grandi */
.weh-dash-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 24px 40px;
}
.weh-dash-cta-btn {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; text-decoration: none;
  padding: 28px 20px; border-radius: 20px;
  transition: transform 0.15s, box-shadow 0.15s;
  gap: 6px;
}
.weh-dash-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.weh-dash-cta-primary {
  background: var(--weh-orange);
  color: #fff;
}
.weh-dash-cta-outline {
  background: var(--weh-surface);
  border: 2px solid var(--weh-orange);
  color: var(--weh-orange);
}
.weh-dash-cta-icon { font-size: 2rem; line-height: 1; }
.weh-dash-cta-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem; font-weight: 600; line-height: 1.2;
}
.weh-dash-cta-sub { font-size: 0.75rem; opacity: 0.8; }

/* Track percorso */
.weh-dash-track-item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--weh-border);
}
.weh-dash-track-item:last-child { border-bottom: none; }
.weh-dash-track-icon { font-size: 1.2rem; flex-shrink: 0; width: 28px; text-align: center; }
.weh-dash-track-body { flex: 1; }
.weh-dash-track-title {
  font-size: 0.9rem; font-weight: 500; color: var(--weh-text);
  margin-bottom: 4px;
}
.weh-dash-track-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

.weh-track-locked .weh-dash-track-title { color: var(--weh-muted); }
.weh-track-locked .weh-dash-track-icon { opacity: 0.4; }

/* Statistiche grid */
.weh-dash-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr 1px 1fr;
  gap: 0;
}
.weh-dash-stat { text-align: center; padding: 10px 8px; }
.weh-dash-stat-div { background: var(--weh-border); width: 1px; }
.weh-meta-num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.8rem; font-weight: 600;
  color: var(--weh-orange); line-height: 1;
  margin-bottom: 4px;
}
.weh-meta-label {
  font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--weh-muted);
}

/* Attestato card */
.weh-dash-attestato {
  display: flex; align-items: center; gap: 16px;
  background: var(--weh-surface);
  border: 1px solid var(--weh-border);
  border-radius: 14px; padding: 18px;
}
.weh-dash-att-icon { font-size: 2.2rem; flex-shrink: 0; }
.weh-dash-att-body { flex: 1; }

/* Score level pill */
.weh-score-level {
  display: inline-block;
  background: var(--weh-orange-pale);
  color: var(--weh-orange-dark);
  border: 1px solid var(--weh-orange-mid);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Btn variants */
.weh-btn-ghost {
  background: none;
  border: 1px solid var(--weh-border);
  color: var(--weh-muted);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.weh-btn-ghost:hover { border-color: var(--weh-orange); color: var(--weh-orange); }
.weh-btn-outline {
  background: none;
  border: 1.5px solid var(--weh-orange);
  color: var(--weh-orange);
  border-radius: 20px;
  padding: 10px 22px;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s, color 0.15s;
}
.weh-btn-outline:hover { background: var(--weh-orange); color: #fff; }

/* Card wrapper */
.weh-quiz-wrap .weh-card {
  background: #fff;
  border: 1px solid var(--weh-border);
  border-radius: 20px;
  padding: 24px 32px;
  margin: 0 40px 20px;
}
.weh-detail-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--weh-muted);
  font-weight: 500;
}

@media (max-width: 640px) {
  .weh-dash-header      { padding: 24px 20px; }
  .weh-dash-cta-row     { grid-template-columns: 1fr; padding: 16px 20px; }
  .weh-quiz-wrap .weh-card { margin: 0 16px 16px; padding: 18px 20px; }
  .weh-dash-stats-grid  { grid-template-columns: 1fr 1px 1fr; }
  .weh-dash-stats-grid .weh-dash-stat:nth-child(n+5) { display: none; }
  .weh-dash-stats-grid .weh-dash-stat-div:nth-child(n+5) { display: none; }
}

/* ─────────────────────────────────────────────────────────────
   DASHBOARD UTENTE
   ───────────────────────────────────────────────────────────── */
#weh-dashboard .weh-topbar { margin-bottom: 0; }

.weh-dash-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px 40px;
  background: var(--weh-surface);
  border-bottom: 1px solid var(--weh-border);
}
.weh-dash-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--weh-orange);
  color: #fff;
  font-size: 1.3rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.weh-dash-welcome { flex: 1; }

/* CTA row */
.weh-dash-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 24px 24px 0;
}
.weh-dash-cta-btn {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 28px 20px;
  border-radius: 20px; text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.weh-dash-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(217,119,6,.18); }
.weh-dash-cta-primary {
  background: var(--weh-orange);
  border: 2px solid var(--weh-orange);
}
.weh-dash-cta-outline {
  background: var(--weh-surface);
  border: 2px solid var(--weh-border);
}
.weh-dash-cta-icon { font-size: 2rem; margin-bottom: 8px; }
.weh-dash-cta-label {
  font-size: 1rem; font-weight: 600; margin-bottom: 4px;
}
.weh-dash-cta-primary .weh-dash-cta-label { color: #fff; }
.weh-dash-cta-outline .weh-dash-cta-label { color: var(--weh-text); }
.weh-dash-cta-sub {
  font-size: 0.75rem;
  line-height: 1.4;
}
.weh-dash-cta-primary .weh-dash-cta-sub { color: rgba(255,255,255,.8); }
.weh-dash-cta-outline .weh-dash-cta-sub { color: var(--weh-muted); }

/* Track items */
.weh-dash-track-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--weh-border);
}
.weh-dash-track-item:last-child { border-bottom: none; }
.weh-dash-track-icon { font-size: 1.2rem; width: 28px; text-align: center; flex-shrink: 0; }
.weh-dash-track-body { flex: 1; }
.weh-dash-track-title { font-size: 0.88rem; font-weight: 500; color: var(--weh-text); margin-bottom: 4px; }
.weh-dash-track-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.weh-track-locked .weh-dash-track-title { color: var(--weh-muted); }

/* Stats grid */
.weh-dash-stats-grid {
  display: flex; align-items: center; justify-content: space-around;
  flex-wrap: wrap; gap: 16px;
}
.weh-dash-stat { text-align: center; }
.weh-meta-num {
  font-size: 1.8rem; font-weight: 600; color: var(--weh-orange);
  font-family: 'Cormorant Garamond', Georgia, serif; line-height: 1;
  margin-bottom: 4px;
}
.weh-meta-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--weh-muted);
}
.weh-dash-stat-div {
  width: 1px; height: 40px; background: var(--weh-border);
}

/* Attestato card */
.weh-dash-attestato {
  display: flex; align-items: center; gap: 16px;
  background: var(--weh-orange-pale);
  border: 1px solid var(--weh-border);
  border-radius: 14px; padding: 18px 20px;
}
.weh-dash-att-icon { font-size: 2rem; flex-shrink: 0; }
.weh-dash-att-body { flex: 1; }

/* Buttons extra */
.weh-btn-ghost {
  background: none; border: 1.5px solid var(--weh-border);
  color: var(--weh-muted); padding: 7px 16px; border-radius: 40px;
  font-size: 0.82rem; cursor: pointer; text-decoration: none;
  font-family: 'DM Sans', sans-serif; transition: border-color 0.2s;
  white-space: nowrap;
}
.weh-btn-ghost:hover { border-color: var(--weh-orange); color: var(--weh-orange); }
.weh-btn-outline {
  background: none; border: 1.5px solid var(--weh-orange);
  color: var(--weh-orange); padding: 10px 22px; border-radius: 40px;
  font-size: 0.85rem; cursor: pointer; text-decoration: none;
  font-family: 'DM Sans', sans-serif; font-weight: 500;
}
.weh-btn-outline:hover { background: var(--weh-orange); color: #fff; }

.weh-score-level {
  display: inline-block;
  background: #FFFBEB; border: 1px solid #FDE68A;
  color: #92400E; border-radius: 20px;
  padding: 4px 12px; font-size: 0.72rem; letter-spacing: 1px;
  text-transform: uppercase;
}

/* Card layout */
.weh-card { background: #fff; border: 1px solid var(--weh-border); border-radius: 20px; padding: 28px; }
.weh-detail-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 2px; color: var(--weh-muted); font-weight: 500;
}

/* Padding delle card in dashboard */
#weh-dashboard .weh-card { margin: 0 24px; }
#weh-dashboard .weh-dash-cta-row { margin-bottom: 16px; }
#weh-dashboard .weh-card { margin-bottom: 16px; }
#weh-dashboard .weh-card:last-child { margin-bottom: 40px; }

@media (max-width: 600px) {
  .weh-dash-header { padding: 20px; flex-direction: column; text-align: center; }
  .weh-dash-cta-row { grid-template-columns: 1fr; padding: 16px 16px 0; }
  .weh-dash-stats-grid { gap: 10px; }
  .weh-dash-stat-div { display: none; }
  #weh-dashboard .weh-card { margin: 0 12px; }
  .weh-dash-attestato { flex-direction: column; text-align: center; }
}

/* ─────────────────────────────────────────────────────────────
   DASHBOARD UTENTE
   ───────────────────────────────────────────────────────────── */

/* Header personale */
.weh-dash-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px 40px 0;
  max-width: 700px;
  margin: 0 auto;
}
.weh-dash-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--weh-orange);
  color: #fff; font-size: 1.4rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: 'DM Sans', sans-serif;
}
.weh-dash-welcome { flex: 1; }

/* CTA buttons row */
.weh-dash-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 700px;
  margin: 28px auto 0;
  padding: 0 20px;
}
.weh-dash-cta-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; text-decoration: none;
  padding: 24px 20px; border-radius: 20px;
  text-align: center; transition: transform 0.15s, box-shadow 0.15s;
}
.weh-dash-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(217,119,6,0.18); }
.weh-dash-cta-primary {
  background: var(--weh-orange);
  border: 2px solid var(--weh-orange);
}
.weh-dash-cta-outline {
  background: var(--weh-surface);
  border: 2px solid var(--weh-border);
}
.weh-dash-cta-icon { font-size: 2rem; }
.weh-dash-cta-label {
  font-weight: 600; font-size: 0.95rem;
  color: #fff;
}
.weh-dash-cta-outline .weh-dash-cta-label { color: var(--weh-text); }
.weh-dash-cta-sub {
  font-size: 0.75rem; color: rgba(255,255,255,0.8);
}
.weh-dash-cta-outline .weh-dash-cta-sub { color: var(--weh-muted); }

/* Percorso track items */
.weh-dash-track-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--weh-border);
}
.weh-dash-track-item:last-child { border-bottom: none; padding-bottom: 0; }
.weh-dash-track-icon { font-size: 1.1rem; width: 24px; text-align: center; flex-shrink: 0; }
.weh-dash-track-body { flex: 1; }
.weh-dash-track-title { font-size: 0.88rem; font-weight: 500; color: var(--weh-text); }
.weh-dash-track-meta { margin-top: 5px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.weh-track-locked .weh-dash-track-title { color: var(--weh-muted); }
.weh-track-locked .weh-dash-track-icon { opacity: 0.4; }

/* Statistiche personali */
.weh-dash-stats-grid {
  display: flex; align-items: center;
  gap: 0; flex-wrap: wrap;
}
.weh-dash-stat {
  flex: 1; text-align: center; padding: 8px 12px;
  min-width: 80px;
}
.weh-dash-stat-div {
  width: 1px; height: 40px;
  background: var(--weh-border);
  flex-shrink: 0;
}
.weh-meta-num {
  font-size: 1.6rem; font-weight: 600; color: var(--weh-orange);
  font-family: 'Cormorant Garamond', Georgia, serif; line-height: 1;
}
.weh-meta-label {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--weh-muted); margin-top: 4px;
}

/* Attestato card */
.weh-dash-attestato {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; background: var(--weh-orange-pale);
  border: 1px solid var(--weh-border); border-radius: 14px;
}
.weh-dash-att-icon { font-size: 2rem; flex-shrink: 0; }
.weh-dash-att-body { flex: 1; }

/* Score level badge */
.weh-score-level {
  display: inline-block;
  background: var(--weh-orange-pale); border: 1px solid var(--weh-orange-mid);
  color: var(--weh-orange-dark); border-radius: 20px;
  padding: 3px 12px; font-size: 0.72rem; letter-spacing: 1px;
  text-transform: uppercase;
}

/* Button ghost & outline */
.weh-btn-ghost {
  display: inline-block; background: none;
  border: 1px solid var(--weh-border); color: var(--weh-muted);
  padding: 7px 16px; border-radius: 30px; font-size: 0.8rem;
  text-decoration: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: border-color 0.2s;
}
.weh-btn-ghost:hover { border-color: var(--weh-orange); color: var(--weh-orange); }
.weh-btn-outline {
  display: inline-block; background: none;
  border: 1.5px solid var(--weh-orange); color: var(--weh-orange);
  padding: 10px 22px; border-radius: 30px; font-size: 0.85rem;
  text-decoration: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: background 0.2s, color 0.2s;
}
.weh-btn-outline:hover { background: var(--weh-orange); color: #fff; }

/* Detail label */
.weh-detail-label {
  font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--weh-muted);
  font-weight: 500;
}

@media (max-width: 560px) {
  .weh-dash-header { padding: 24px 20px 0; flex-direction: column; text-align: center; }
  .weh-dash-cta-row { grid-template-columns: 1fr; padding: 0 16px; }
  .weh-dash-stats-grid { justify-content: center; }
  .weh-dash-attestato { flex-direction: column; text-align: center; }
}

/* ─────────────────────────────────────────────────────────────
   SISTEMA DOPPIO TENTATIVO
   ───────────────────────────────────────────────────────────── */

/* Alert secondo tentativo */
.weh-attempt-alert {
  background: #FFFBEB;
  border: 1.5px solid var(--weh-orange-mid);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--weh-orange-dark);
  margin: 0 0 16px;
  font-weight: 500;
  animation: weh-shake 0.3s ease;
}
@keyframes weh-shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}

/* Opzione bloccata (primo tentativo sbagliato) */
.weh-opt-locked {
  opacity: 0.38;
  pointer-events: none !important;
  cursor: not-allowed;
  text-decoration: line-through;
  border-color: var(--weh-border) !important;
  background: var(--weh-bg) !important;
}
.weh-opt-locked .weh-option-letter {
  background: var(--weh-border) !important;
  color: var(--weh-muted) !important;
}

/* ─────────────────────────────────────────────────────────────
   DETTAGLIO RISULTATO FINALE (tutte le domande)
   ───────────────────────────────────────────────────────────── */
.weh-result-detail-wrap {
  margin-top: 28px;
}
.weh-result-detail-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--weh-muted);
  margin-bottom: 14px;
  font-weight: 500;
}
.weh-result-item {
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 10px;
  border: 1px solid var(--weh-border);
}
.weh-result-ok { background: #F0FDF4; border-color: #BBF7D0; }
.weh-result-ko { background: #FFF7ED; border-color: var(--weh-orange-mid); }

.weh-result-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.weh-result-icon  { font-size: 1rem; flex-shrink: 0; }
.weh-result-qnum  { font-size: 0.72rem; color: var(--weh-muted); font-weight: 500; }
.weh-result-qtitle,
.weh-result-qsec  { font-size: 0.78rem; color: var(--weh-text); font-weight: 500; flex: 1; }
.weh-result-att   {
  font-size: 0.68rem; letter-spacing: 1px; text-transform: uppercase;
  background: #D1FAE5; color: #065F46;
  border-radius: 20px; padding: 2px 8px; margin-left: auto;
}
.weh-result-qtext {
  font-size: 0.83rem; color: var(--weh-text);
  margin-bottom: 10px; font-weight: 500;
}
.weh-result-answers { display: flex; flex-direction: column; gap: 5px; }
.weh-result-user    { font-size: 0.8rem; }
.weh-result-correct { font-size: 0.8rem; color: #065F46; font-weight: 500; }
.weh-ans-ok { color: #065F46; }
.weh-ans-ko { color: var(--weh-orange-dark); }

/* ─────────────────────────────────────────────────────────────
   RESULT CARD — Dashboard utente
   ───────────────────────────────────────────────────────────── */

:root {
  --weh-blue:        #3B82F6;
  --weh-blue-pale:   #EFF6FF;
  --weh-blue-mid:    #BFDBFE;
  --weh-yellow:      #D97706;
  --weh-yellow-pale: #FFFBEB;
  --weh-yellow-mid:  #FDE68A;
}

.weh-result-card {
  position: relative;
  overflow: hidden;
  padding: 0 !important;
  margin-bottom: 16px !important;
}

/* Header con badge profilo */
.weh-rc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--weh-border);
  gap: 12px;
  flex-wrap: wrap;
}

.weh-rc-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 40px;
  letter-spacing: 0.3px;
}

.weh-rc-badge-blue   { background: var(--weh-blue-pale);   color: var(--weh-blue);        border: 1.5px solid var(--weh-blue-mid); }
.weh-rc-badge-yellow { background: var(--weh-yellow-pale);  color: var(--weh-orange-dark); border: 1.5px solid var(--weh-yellow-mid); }
.weh-rc-badge-green  { background: var(--weh-green-pale);   color: var(--weh-green);       border: 1.5px solid #6EE7B7; }

.weh-rc-meta {
  font-size: 0.72rem;
  color: var(--weh-muted);
  letter-spacing: 0.3px;
}

/* Body: punteggio + testo */
.weh-rc-body {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
}

.weh-rc-score {
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex-shrink: 0;
  min-width: 72px;
}
.weh-rc-score-num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 3rem;
  font-weight: 600;
  color: var(--weh-orange);
  line-height: 1;
}
.weh-rc-score-den {
  font-size: 1rem;
  color: var(--weh-muted);
  font-weight: 400;
}

.weh-rc-text { flex: 1; }
.weh-rc-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--weh-text);
  margin-bottom: 5px;
}
.weh-rc-msg {
  font-size: 0.82rem;
  color: var(--weh-muted);
  line-height: 1.5;
}

/* Footer */
.weh-rc-footer {
  padding: 10px 24px 14px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--weh-border);
}

/* ─────────────────────────────────────────────────────────────
   BADGE RISULTATO — Fine quiz in pagina (schermata risultato)
   ───────────────────────────────────────────────────────────── */

/* Override weh-score-level con profili colorati */
.weh-score-level-blue   { background: var(--weh-blue-pale) !important;  color: var(--weh-blue) !important;       border: 1.5px solid var(--weh-blue-mid) !important; }
.weh-score-level-yellow { background: var(--weh-yellow-pale) !important; color: var(--weh-orange-dark) !important; border: 1.5px solid var(--weh-yellow-mid) !important; }
.weh-score-level-green  { background: var(--weh-green-pale) !important;  color: var(--weh-green) !important;      border: 1.5px solid #6EE7B7 !important; }

/* Risultato pass — più spazio e gerarchia visiva */
#wqf-s-pass .weh-score-big {
  font-size: 5rem;
}
#wqf-s-pass .weh-result-badge {
  font-size: 0.9rem;
  padding: 8px 20px;
  border-radius: 40px;
  font-weight: 600;
  letter-spacing: 0.3px;
  display: inline-block;
  margin-bottom: 12px;
}
#wqf-s-pass .weh-result-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 10px 0 6px;
}
#wqf-s-pass .weh-result-msg {
  font-size: 0.88rem;
  color: var(--weh-muted);
  line-height: 1.6;
  max-width: 380px;
  margin: 0 auto;
}

/* Detail item senza icona ok/ko — solo punteggio */
.weh-result-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--weh-border);
}
.weh-result-item:last-child { border-bottom: none; }
.weh-result-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.weh-result-qnum  { font-size: 0.72rem; font-weight: 600; color: var(--weh-muted); text-transform: uppercase; letter-spacing: 1px; }
.weh-result-qtext { font-size: 0.88rem; color: var(--weh-text); margin-bottom: 6px; line-height: 1.4; }
.weh-result-user.weh-ans-ok {
  font-size: 0.82rem;
  color: var(--weh-green);
  font-weight: 500;
}

@media (max-width: 640px) {
  .weh-rc-body      { flex-direction: column; align-items: flex-start; gap: 12px; }
  .weh-rc-score-num { font-size: 2.4rem; }
  .weh-rc-header    { padding: 12px 18px; }
  .weh-rc-body      { padding: 16px 18px; }
  .weh-rc-footer    { padding: 10px 18px 12px; }
}

/* ─────────────────────────────────────────────────────────────
   QUIZ FINALE — Banner intro orizzontale
   ───────────────────────────────────────────────────────────── */

.weh-qf-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #fff;
  border: 1px solid var(--weh-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(0,0,0,.06);
  margin-bottom: 24px;
}

.weh-qf-banner-left {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Pills */
.weh-qf-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.weh-qf-pill {
  font-size: .74rem;
  color: var(--weh-muted);
  background: var(--weh-orange-pale);
  border: 1px solid var(--weh-orange-mid);
  border-radius: 40px;
  padding: 5px 12px;
}

/* Pannello destra scuro */
.weh-qf-banner-right {
  background: linear-gradient(135deg, #1C3A4A 0%, #0F2535 100%);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.weh-qf-banner-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 110% 50%, rgba(75,157,197,.2) 0%, transparent 65%);
  pointer-events: none;
}
.weh-qf-profiles-label {
  font-size: .65rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 4px;
}
.weh-qf-profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 12px 14px;
}
.weh-qf-pdot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.weh-qf-pinfo { flex: 1; }
.weh-qf-pname {
  font-size: .82rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}
.weh-qf-prange {
  font-size: .7rem;
  color: rgba(255,255,255,.45);
  line-height: 1.3;
}
.weh-qf-pscore {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,.3);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .weh-qf-banner {
    grid-template-columns: 1fr;
  }
  .weh-qf-banner-left  { padding: 28px 22px; }
  .weh-qf-banner-right { padding: 24px 22px; }
}


/* ── BADGE AGGIUNTIVI ─────────────────────────────────────────── */
.weh-rc-badge-purple,
.weh-result-badge-purple {
  background: #F3E8FF;
  color: #6D28D9;
  border-color: #DDD6FE;
}
.weh-rc-badge-red,
.weh-result-badge-red {
  background: #FEF2F2;
  color: #DC2626;
  border-color: #FECACA;
}
.weh-rbadge-purple { background:#F3E8FF; color:#6D28D9; }
.weh-rbadge-red    { background:#FEF2F2; color:#DC2626; }

/* ── SHARED AUTH MODAL ────────────────────────────────────────── */
.weh-auth-modal-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #E7E5E0;
}
.weh-auth-modal-hdr button {
  background: none; border: 1px solid #E7E5E0; border-radius: 50%;
  width: 28px; height: 28px; cursor: pointer; color: #78716C; font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
}
.weh-auth-tabs-row {
  display: flex; border-bottom: 2px solid #E7E5E0;
}
.weh-auth-panel { display: none; padding: 20px; }
.weh-auth-panel-active { display: block; }
.weh-auth-tab {
  flex: 1; padding: 13px; font-size: .85rem; font-weight: 500;
  background: none; border: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; cursor: pointer; color: #78716C; font-family: inherit;
}
.weh-auth-tab-active { color: #D97706; border-bottom-color: #D97706; font-weight: 600; }
.weh-auth-error {
  background: #FEF2F2; border: 1px solid #FECACA; border-radius: 8px;
  padding: 10px 14px; font-size: .8rem; color: #DC2626; margin-bottom: 14px;
}

/* ── LOGO SMALL ───────────────────────────────────────────────── */
.weh-logo-sm {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem; font-weight: 600; color: #D97706;
}
.weh-logo-sm span { color: #1C1A16; }

/* ── OPTION PTS BADGE ─────────────────────────────────────────── */
.weh-opt-pts {
  margin-left: auto; font-size: .68rem; color: #78716C;
  background: #F5F3F0; border-radius: 20px; padding: 2px 7px;
}

/* ── FEEDBACK BOX ─────────────────────────────────────────────── */
.weh-feedback-box {
  border-radius: 10px; padding: 12px 16px;
  font-size: .83rem; line-height: 1.5; margin-top: 14px;
}
.weh-feedback-ok { background: #ECFDF5; border: 1px solid #6EE7B7; color: #065F46; }
.weh-feedback-ko { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }

/* ── SECTION TAG IN MODAL HEADER ─────────────────────────────── */
.weh-qf-section-tag {
  border-radius: 40px; font-weight: 600; letter-spacing: .5px;
}

/* ════════════════════════════════════════════════════════════════
   SHARED QUIZ FINALE — Banner + Modale + Quiz UI
   Usato da S1, S2, S3 (quiz-finale.php), S4
   ════════════════════════════════════════════════════════════════ */

/* ── Banner leaderboard base ──────────────────────────────────── */
.weh-qf-leader {
  display: flex;
  align-items: center;
  gap: 20px;
  border-radius: 16px;
  padding: 22px 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,.15);
  position: relative;
  overflow: hidden;
}
.weh-qf-leader::before {
  content:'';
  position:absolute;inset:0;
  background: radial-gradient(ellipse at 80% 50%, rgba(255,255,255,.06) 0%, transparent 65%);
  pointer-events:none;
}
.weh-qf-leader-left { flex:1; min-width:0; }
.weh-qf-leader-tag {
  display: inline-block;
  font-size: .65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 40px;
  padding: 3px 12px;
  margin-bottom: 8px;
  font-weight: 600;
}
.weh-qf-leader-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 6px;
}
.weh-qf-leader-title em { font-style: italic; }
.weh-qf-leader-sub {
  font-size: .74rem;
  color: rgba(255,255,255,.5);
  letter-spacing: .3px;
}
.weh-qf-leader-profiles {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0 24px;
  border-left: 1px solid rgba(255,255,255,.12);
  border-right: 1px solid rgba(255,255,255,.12);
  flex-shrink: 0;
}
.weh-qf-lp-item { display:flex; align-items:center; gap:8px; }
.weh-qf-lp-dot { width:7px; height:7px; border-radius:50%; flex-shrink:0; }
.weh-qf-lp-name { font-size:.76rem; color:rgba(255,255,255,.7); flex:1; white-space:nowrap; }
.weh-qf-lp-score { font-size:.7rem; color:rgba(255,255,255,.35); font-family:Georgia,serif; font-weight:700; }
.weh-qf-leader-cta { flex-shrink:0; padding-left:8px; display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.weh-qf-leader-cert { font-size:.68rem; color:rgba(255,255,255,.4); letter-spacing:.5px; }

/* ── Animazioni modali condivise ─────────────────────────────── */
@keyframes wqfOvFI { from{opacity:0} to{opacity:1} }
@keyframes wqfMoSU { from{transform:scale(.94) translateY(16px);opacity:0} to{transform:scale(1) translateY(0);opacity:1} }

/* ── Overlay generico per S1/S2/S4 ──────────────────────────── */
[id$="-modal-overlay"] {
  animation: wqfOvFI .25s ease;
}

/* ── Score live badge ────────────────────────────────────────── */
.weh-score-live-badge {
  background: #F5F3F0;
  border: 1px solid #E7E5E0;
  border-radius: 40px;
  padding: 3px 12px;
  font-size: .78rem;
  font-weight: 600;
  color: #44403C;
}

/* ── Progress bar ────────────────────────────────────────────── */
.weh-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--weh-orange, #D97706), var(--weh-orange-light, #F59E0B));
  border-radius: 4px;
  transition: width .4s ease;
}

/* ── Timer ───────────────────────────────────────────────────── */
.weh-timer-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.weh-timer-label { font-size:.85rem; }
.weh-timer-val {
  font-size:.82rem;
  font-weight:600;
  color:#44403C;
  font-family: Georgia, serif;
  letter-spacing:1px;
  transition: color .3s;
}

/* ── Question ────────────────────────────────────────────────── */
.weh-question-num {
  font-size: .7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #78716C;
  margin-bottom: 10px;
}
.weh-question-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1C1A16;
  line-height: 1.4;
  margin-bottom: 20px;
}

/* ── Options grid (S1/S2/S4 usano weh-options-grid) ─────────── */
.weh-options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.weh-options-grid .weh-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1.5px solid #E7E5E0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  transition: border-color .15s, background .15s, transform .1s;
}
.weh-options-grid .weh-option:hover:not([disabled]) {
  border-color: #D97706;
  background: #FFFBEB;
  transform: translateX(2px);
}
.weh-options-grid .weh-option[disabled] { cursor: default; }
.weh-options-grid .weh-option.weh-opt-selected {
  border-color: #D97706;
  background: #FFFBEB;
}
.weh-options-grid .weh-option.weh-opt-correct {
  border-color: #10B981;
  background: #ECFDF5;
}
.weh-options-grid .weh-option.weh-opt-wrong {
  border-color: #EF4444;
  background: #FEF2F2;
}
.weh-opt-label {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #F5F3F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  color: #78716C;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.weh-opt-selected .weh-opt-label { background:#D97706; color:#fff; }
.weh-opt-correct  .weh-opt-label { background:#10B981; color:#fff; }
.weh-opt-wrong    .weh-opt-label { background:#EF4444; color:#fff; }
.weh-opt-text { font-size:.88rem; color:#1C1A16; line-height:1.4; flex:1; }

/* ── Nav row ─────────────────────────────────────────────────── */
.weh-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
}

/* ── Result screen ───────────────────────────────────────────── */
.weh-result-header { text-align:center; margin-bottom:16px; }
.weh-result-score-block {
  text-align: center;
  margin: 16px 0;
}
.weh-big-score {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 4rem;
  font-weight: 700;
  color: #D97706;
  line-height: 1;
}
.weh-big-score-den {
  font-size: 1.4rem;
  color: #78716C;
  margin-left: 4px;
}
.weh-result-msg {
  font-size: .9rem;
  color: #44403C;
  line-height: 1.7;
  text-align: center;
  max-width: 480px;
  margin: 0 auto 16px;
  padding: 0 8px;
}
.weh-result-tagline {
  font-style: italic;
  color: #78716C;
  font-size: .82rem;
  text-align: center;
  border-top: 1px solid #E7E5E0;
  padding-top: 14px;
  margin: 14px 0 20px;
}
.weh-result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.weh-result-actions .weh-btn-primary,
.weh-result-actions .weh-btn-ghost,
.weh-result-actions .weh-btn-white,
.weh-result-actions a {
  width: 100%;
  max-width: 340px;
  text-align: center;
  justify-content: center;
}

/* ── Result badge variants ───────────────────────────────────── */
.weh-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 40px;
  padding: 6px 18px;
  font-size: .82rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  letter-spacing: .3px;
}
.weh-result-badge-blue   { background:#EFF6FF; color:#1D4ED8; border-color:#BFDBFE; }
.weh-result-badge-yellow { background:#FFFBEB; color:#92400E; border-color:#FDE68A; }
.weh-result-badge-green  { background:#ECFDF5; color:#065F46; border-color:#6EE7B7; }
.weh-result-badge-purple { background:#F3E8FF; color:#6D28D9; border-color:#DDD6FE; }
.weh-result-badge-red    { background:#FEF2F2; color:#DC2626; border-color:#FECACA; }

/* ── Responsive banner ───────────────────────────────────────── */
@media (max-width: 700px) {
  .weh-qf-leader {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 22px;
    gap: 16px;
  }
  .weh-qf-leader-profiles {
    border-left: none; border-right: none;
    border-top: 1px solid rgba(255,255,255,.1);
    border-bottom: 1px solid rgba(255,255,255,.1);
    padding: 12px 0;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }
  .weh-qf-leader-cta { width:100%; }
  .weh-qf-leader-cta button { width:100%; justify-content:center; }
}

/* ── S3 palette: arancione/dark (originale) ──────────────────── */
.weh-qf-leader-s3 {
  background: linear-gradient(135deg, #1C3A4A 0%, #0F2535 100%);
}
.weh-qf-leader-s3 .weh-qf-leader-tag {
  color: #F59E0B;
  background: rgba(245,158,11,.12);
  border: 1px solid rgba(245,158,11,.3);
}
.weh-qf-leader-s3 .weh-qf-leader-title em {
  color: #F59E0B;
}

/* ── S3 Modal overlay + box ──────────────────────────────────── */
#weh-qf-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  background: rgba(15,20,25,.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: wqfOvFI .25s ease;
}
#weh-qf-modal {
  background: #FAFAF8;
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px rgba(0,0,0,.3);
  animation: wqfMoSU .3s cubic-bezier(.34,1.3,.64,1);
  overflow: hidden;
}
#weh-qf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid #E7E5E0;
  background: #fff;
  flex-shrink: 0;
  gap: 12px;
}
#weh-qf-modal-close {
  background: none;
  border: 1px solid #E7E5E0;
  border-radius: 50%;
  width: 30px; height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  color: #78716C;
  cursor: pointer;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
#weh-qf-modal-close:hover { background: #F5F5F4; color: #1C1A16; }
#weh-qf-modal-body {
  overflow-y: auto;
  flex: 1;
  padding-bottom: 8px;
}
#weh-qf-modal-body .weh-screen { display: none !important; }
#weh-qf-modal-body .weh-screen.weh-active { display: block !important; }

/* Auth modal S3 */
#weh-auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  background: rgba(15,20,25,.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: wqfOvFI .25s ease;
}
#weh-auth-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 32px 80px rgba(0,0,0,.25);
  animation: wqfMoSU .3s cubic-bezier(.34,1.3,.64,1);
  overflow: hidden;
}
#weh-auth-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #E7E5E0;
}
#weh-auth-tabs {
  display: flex;
  border-bottom: 2px solid #E7E5E0;
}
