/* ================================================================
   DIAGNOSTIC TOOL — diagnostic.css
   Companion to diagnostic.php / assets/diagnostic.js
   Relies on CSS custom properties declared in style.css (:root)
   ================================================================ */

/* ── EXTRA LOCAL VARIABLES ─────────────────────────────── */
:root {
  --orange: #f0a500;
  --blue-l: rgba(26, 79, 196, 0.55);
  --r: var(--radius);
  /* short alias used inline */
  --fm: var(--font-mono);
  /* short alias used inline */
}

/* ================================================================
   HERO
   ================================================================ */
.diag-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 0 72px;
  overflow: hidden;
  text-align: center;
}

.diag-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(0, 57, 166, .22) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 85% 20%, rgba(201, 162, 39, .07) 0%, transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
}

.diag-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 85% 85% at 50% 40%, black 30%, transparent 100%);
}

.diag-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

.diag-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(201, 162, 39, .08);
  border: 1px solid var(--border-gold);
  border-radius: 100px;
  padding: 6px 16px;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--gold);
  letter-spacing: .1em;
  margin-bottom: 28px;
  animation: fadeUp 0.6s ease both;
}

.diag-badge-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2.2s ease-in-out infinite;
}

.diag-hero-inner h1 {
  max-width: 780px;
  margin: 0 auto 24px;
  animation: fadeUp 0.65s 0.08s ease both;
}

.diag-hero-inner .hl {
  background: linear-gradient(135deg, #c9a227 0%, #f0d060 50%, #c9a227 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

.diag-hero-sub {
  font-size: 1.08rem;
  color: var(--white-dim);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.75;
  animation: fadeUp 0.65s 0.16s ease both;
}

.diag-hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  animation: fadeUp 0.65s 0.24s ease both;
}

.diag-hero-pill {
  background: var(--white-faint);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: .78rem;
  font-family: var(--font-mono);
  color: var(--white-dim);
  letter-spacing: .04em;
  white-space: nowrap;
}

/* ================================================================
   REFINED PROGRESS RAIL (STOPS AT STEP 4)
   ================================================================ */

.progress-rail {
  position: sticky;
  top: 60px;
  z-index: 90;
  background: #050d1f; 
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pr-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 40px;
}

.pr-steps {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  /* Removed the global ::before line to prevent overflow */
}

.pr-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  flex: 1; /* Ensures equal spacing */
}

/* --- THE CONNECTOR LINE --- */
/* This creates a line starting from the center of current dot to the next */
.pr-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 15px; /* Vertically centered to the 30px dot */
  left: 50%; /* Starts at the middle of the current dot */
  width: 100%; /* Stretches to the middle of the next dot */
  height: 2px;
  background: #1a2436; /* Default inactive line color */
  z-index: -1;
  transition: background 0.3s ease;
}

/* --- LINE COLOR LOGIC --- */
/* If the step is "done", the line following it becomes blue */
.pr-step.done:not(:last-child)::after {
  background: #0047bb;
}

/* --- DOT STYLING --- */
.pr-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0a1629;
  border: 2px solid #1a2436;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: #4a5568;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.pr-label {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- STATE: DONE (Step 01) --- */
.pr-step.done .pr-dot {
  background: #0047bb;
  border-color: #0047bb;
  color: #fff;
}

/* --- STATE: ACTIVE (Step 02) --- */
.pr-step.active .pr-dot {
  background: #d4af37;
  border-color: #d4af37;
  color: #050d1f;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2); 
}
.pr-step.active .pr-label {
  color: #d4af37;
}

/* ================================================================
   APP CONTAINER  /  STEPS
   ================================================================ */
#diag-app {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* Steps and early exits are hidden by default */
.step,
.early {
  display: none;
}

.step.show,
.early.show {
  display: block;
}

/* ================================================================
   CARD
   ================================================================ */
.card {
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .025);
}

.step-num {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--eu-blue);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.head-eye {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--gold);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.card-head h2 {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  margin: 0;
  color: var(--gold);
}

.card-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, .018);
}

.foot-ctr {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--white-dim);
  letter-spacing: .08em;
}

/* ================================================================
   QUESTION BLOCKS
   ================================================================ */
.q-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.q-title {
  font-size: .97rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.q-ref {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.q-hint {
  font-size: .84rem;
  color: var(--white-dim);
  line-height: 1.7;
  background: var(--white-faint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
}

.q-hint b {
  color: var(--gold-light);
}

.q-hint strong {
  color: var(--white);
}

/* ================================================================
   CHOICE CARDS
   ================================================================ */
.choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ch {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 16px;
  background: var(--white-faint);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  user-select: none;
}

.ch:hover {
  border-color: rgba(0, 57, 166, .5);
  background: rgba(0, 57, 166, .06);
}

.ch.sel {
  border-color: var(--eu-blue);
  background: rgba(0, 57, 166, .1);
}

.ch input[type=radio] {
  display: none;
}

.ch-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: border-color var(--transition), background var(--transition);
}

.ch.sel .ch-dot {
  border-color: var(--eu-blue);
  background: var(--eu-blue);
}

.ch-check {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transition: opacity .2s;
}

.ch.sel .ch-check {
  opacity: 1;
}

.ch-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ch-text strong {
  font-size: .9rem;
  font-weight: 600;
  color: var(--white);
}

.ch-text span {
  font-size: .8rem;
  color: var(--white-dim);
  line-height: 1.5;
}

/* ================================================================
   BOOL BUTTONS
   ================================================================ */
.bool-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.bool-btn {
  flex: 1;
  min-width: 140px;
  padding: 13px 18px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--white-faint);
  color: var(--white-dim);
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  text-align: center;
}

.bool-btn:hover {
  border-color: rgba(244, 247, 255, .25);
  color: var(--white);
}

.bool-btn.yes {
  border-color: var(--green);
  background: rgba(0, 200, 150, .1);
  color: var(--green);
}

.bool-btn.no {
  border-color: var(--red);
  background: rgba(255, 77, 109, .1);
  color: var(--red);
}

/* ================================================================
   CONDITIONAL BLOCKS
   ================================================================ */
.cond {
  display: none;
}

.cond.show {
  display: block;
}

/* ================================================================
   RANGE SLIDER
   ================================================================ */
.range-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-lbl {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--white-dim);
  white-space: nowrap;
}

.range-row input[type=range] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}

.range-row input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--eu-blue);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 57, 166, .5);
  cursor: pointer;
  transition: transform .15s;
}

.range-row input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.range-val {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
}

.range-warn {
  display: none;
  font-size: .8rem;
  color: var(--orange);
  background: rgba(240, 165, 0, .08);
  border: 1px solid rgba(240, 165, 0, .3);
  border-radius: var(--radius);
  padding: 8px 13px;
}

.range-warn.show {
  display: block;
}

/* ================================================================
   MATRIX
   ================================================================ */
.matrix {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  background: var(--white-faint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
  transition: border-color .2s;
}

.mat-row.answered {
  border-color: rgba(0, 57, 166, .35);
}

.mat-lbl {
  font-size: .84rem;
  color: var(--white-dim);
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}

.mat-ref {
  font-family: var(--font-mono);
  font-size: .65rem;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}

.mat-btns {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.mat-btn {
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--white-dim);
  font-family: var(--font-mono);
  font-size: .68rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .2s, background .2s, color .2s;
}

.mat-btn:hover {
  border-color: rgba(244, 247, 255, .25);
  color: var(--white);
}

.mat-btn.sel[data-v=fait] {
  background: rgba(0, 200, 150, .15);
  border-color: var(--green);
  color: var(--green);
}

.mat-btn.sel[data-v=partiel] {
  background: rgba(240, 165, 0, .15);
  border-color: var(--orange);
  color: var(--orange);
}

.mat-btn.sel[data-v=non] {
  background: rgba(255, 77, 109, .15);
  border-color: var(--red);
  color: var(--red);
}

.mat-btn.sel[data-v=na] {
  background: var(--white-faint);
  border-color: rgba(244, 247, 255, .25);
  color: var(--white-dim);
}

/* ================================================================
   NAVIGATION BUTTONS
   ================================================================ */
.btn-next,
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  border: none;
  line-height: 1;
}

.btn-next {
  background: var(--eu-blue);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 57, 166, .35);
}

.btn-next:hover {
  background: var(--eu-blue-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(0, 57, 166, .45);
}

.btn-next.gold {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 4px 16px rgba(201, 162, 39, .35);
}

.btn-next.gold:hover {
  background: var(--gold-light);
  box-shadow: 0 6px 22px rgba(201, 162, 39, .45);
}

.btn-back {
  background: var(--white-faint);
  color: var(--white-dim);
  border: 1px solid var(--border);
}

.btn-back:hover {
  background: rgba(244, 247, 255, .12);
  color: var(--white);
  transform: translateY(-1px);
}

.arr {
  transition: transform .2s;
}

.btn-next:hover .arr {
  transform: translateX(3px);
}

/* Validation message */
.v-msg {
  display: none;
  margin: 0 28px 2px;
  padding: 8px 14px;
  background: rgba(255, 77, 109, .1);
  border: 1px solid rgba(255, 77, 109, .3);
  border-radius: var(--radius);
  font-size: .82rem;
  color: var(--red);
}

.v-msg.show {
  display: block;
}

/* ================================================================
   EARLY EXIT SCREENS
   ================================================================ */
.early-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: .04em;
}

.eb-ok {
  background: rgba(0, 200, 150, .12);
  border: 1px solid rgba(0, 200, 150, .3);
  color: var(--green);
}

.eb-info {
  background: rgba(26, 79, 196, .12);
  border: 1px solid rgba(26, 79, 196, .4);
  color: #7baeff;
}

.note-box {
  background: rgba(201, 162, 39, .07);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: .86rem;
  color: var(--white-dim);
  line-height: 1.7;
  margin-bottom: 18px;
}

.note-box strong {
  color: var(--gold-light);
  display: block;
  margin-bottom: 4px;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-light);
  font-size: .88rem;
  font-weight: 600;
  border-bottom: 1px dashed var(--border-gold);
  padding-bottom: 1px;
  transition: color var(--transition);
}

.btn-link:hover {
  color: var(--gold);
}

/* ================================================================
   REPORT CONTAINER
   ================================================================ */
#diag-report-container {
  display: none;
}

/* ── Report Hero ── */
.rep-hero {
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.rep-top {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Score ring */
.score-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  border: 4px solid currentColor;
  transition: transform 0.3s ease;
}

.score-ring::before {
  display: none;
}

.score-ring.sc-g {
  color: var(--green);
  background: rgba(0, 200, 150, .07);
  box-shadow: none;
}

.score-ring.sc-o {
  color: var(--orange);
  background: rgba(245, 158, 11, .07);
  box-shadow: none;
}

.score-ring.sc-r {
  color: var(--red);
  background: rgba(255, 77, 109, .07);
  box-shadow: none;
}

.sn {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: normal;
}

.sc-g .sn,
.sc-o .sn,
.sc-r .sn {
  color: currentColor;
}

.sl {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: .52rem;
  letter-spacing: .1em;
  color: inherit;
  opacity: .7;
  margin-top: 3px;
}

.rep-info {
  flex: 1;
  min-width: 220px;
}

.rep-info h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  margin-bottom: 10px;
  color: var(--white);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.tag {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .06em;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  border-radius: 100px;
  padding: 3px 11px;
  color: var(--gold);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.pill {
  font-size: .8rem;
  font-family: var(--font-body);
  font-weight: 500;
  border-radius: 100px;
  padding: 5px 11px;
  border: 1px solid;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pill.pg {
  background: rgba(0, 200, 150, .1);
  border-color: rgba(0, 200, 150, .2);
  color: var(--green);
}

.pill.po {
  background: rgba(245, 158, 11, .1);
  border-color: rgba(245, 158, 11, .2);
  color: var(--orange);
}

.pill.pr {
  background: rgba(255, 77, 109, .1);
  border-color: rgba(255, 77, 109, .2);
  color: var(--red);
}

/* Certification box */
.cert-box {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 17px;
  border-radius: var(--radius);
  border: 1px solid;
  margin-top: 16px;
}

.cert-auto {
  background: rgba(0, 200, 150, .08);
  border-color: rgba(0, 200, 150, .2);
}

.cert-third {
  background: rgba(245, 158, 11, .08);
  border-color: rgba(245, 158, 11, .2);
}

.cert-notif {
  background: rgba(255, 77, 109, .08);
  border-color: rgba(255, 77, 109, .2);
}

.cert-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1;
}

.cert-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cert-info strong {
  font-size: .9rem;
  color: var(--white);
}

.cert-info small {
  font-size: .76rem;
  color: var(--white-dim);
  opacity: .7;
  line-height: 1.5;
}

/* Warnings */
.wi {
  border-radius: var(--radius);
  padding: 11px 15px;
  margin-top: 11px;
  font-size: .83rem;
  line-height: 1.55;
}

.wi-o {
  background: rgba(245, 158, 11, .08);
  border: 1px solid rgba(245, 158, 11, .2);
  color: var(--orange);
}

.wi-r {
  background: rgba(255, 77, 109, .08);
  border: 1px solid rgba(255, 77, 109, .2);
  color: var(--red);
}

.wi strong {
  font-weight: 600;
  color: inherit;
}

/* ── Promo block ── */
.promo {
  background: linear-gradient(135deg, var(--eu-blue) 0%, var(--eu-blue-light) 60%, #0a2d7a 100%);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.promo::before {
  content: '';
  position: absolute;
  right: -50px;
  top: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(201, 162, 39, .06);
  pointer-events: none;
}

.promo h2 {
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  color: #fff;
  margin-bottom: 7px;
}

.promo p {
  color: rgba(255, 255, 255, .85);
  font-size: .92rem;
  margin-bottom: 16px;
}

.promo-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 20px;
}

.promo-li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .87rem;
  color: rgba(255, 255, 255, .9);
}

.promo-li::before {
  content: '✓';
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  flex-shrink: 0;
  color: inherit;
  font-weight: normal;
}

.promo-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: .9rem;
  padding: 12px 24px;
  border-radius: var(--radius);
  transition: all .3s ease;
  box-shadow: 0 4px 14px rgba(201, 162, 39, .3);
}

.promo-cta:hover {
  transform: translateY(-2px);
  background: var(--gold-light);
  color: var(--navy);
}

/* ── Report cards ── */
.rep-card {
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}

.rep-ch {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--navy-3);
}

.rep-ch span {
  font-size: 1.1rem;
}

.rep-ch h3 {
  font-size: .98rem;
  color: var(--white);
  margin: 0;
}

.rep-cb {
  padding: 20px 22px;
}

/* Actions */
.actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.act {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  background: var(--white-faint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.prio {
  font-family: var(--font-mono);
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .07em;
  padding: 3px 9px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.prio.ph {
  background: rgba(255, 77, 109, .15);
  color: var(--red);
  border: 1px solid rgba(255, 77, 109, .25);
}

.prio.pm {
  background: rgba(245, 158, 11, .15);
  color: var(--orange);
  border: 1px solid rgba(245, 158, 11, .25);
}

.prio.pl {
  background: rgba(100, 116, 139, .15);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, .2);
}

.act-txt {
  font-size: .87rem;
  color: var(--white-dim);
  line-height: 1.5;
}

/* Maturity grid */
.mat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.mi {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border-radius: var(--radius);
  flex: 1 1 190px;
  font-size: .84rem;
}

.mi-ok {
  background: rgba(0, 200, 150, .07);
  border: 1px solid rgba(0, 200, 150, .17);
  border-left: 4px solid var(--green);
  color: var(--white-dim);
}

.mi-warn {
  background: rgba(245, 158, 11, .07);
  border: 1px solid rgba(245, 158, 11, .17);
  border-left: 4px solid var(--orange);
  color: var(--white-dim);
}

.mi-bad {
  background: rgba(255, 77, 109, .07);
  border: 1px solid rgba(255, 77, 109, .17);
  border-left: 4px solid var(--red);
  color: var(--white-dim);
}

/* Sanctions */
.sanc-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sanc {
  flex: 1 1 170px;
  background: rgba(255, 77, 109, .06);
  border: 1px solid rgba(255, 77, 109, .17);
  border-radius: var(--radius);
  padding: 15px 17px;
}

.sanc-amt {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
}

.sanc-lbl {
  font-size: .77rem;
  color: var(--white-dim);
  margin-top: 5px;
  line-height: 1.5;
}

/* Restart + legal */
.btn-restart {
  display: block;
  margin: 18px auto 0;
  padding: 11px 24px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white-dim);
  font-family: var(--font-body);
  font-size: .87rem;
  cursor: pointer;
  transition: all .3s ease;
}

.btn-restart:hover {
  border-color: rgba(244, 247, 255, .25);
  color: var(--white);
}

.rep-legal {
  text-align: center;
  font-size: .73rem;
  color: rgba(244, 247, 255, .28);
  font-family: var(--font-mono);
  padding: 14px 0;
  line-height: 2;
  margin-bottom: 0;
}

.rep-legal a {
  color: var(--gold);
  opacity: .65;
  text-decoration: none;
}

.rep-legal a:hover {
  opacity: 1;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 680px) {
  .diag-hero {
    padding: 120px 0 56px;
  }

  .card-body {
    padding: 18px;
    gap: 20px;
  }

  .card-foot {
    padding: 14px 18px;
    gap: 10px;
  }

  .card-head {
    padding: 18px 18px 14px;
  }

  #diag-app {
    padding: 24px 14px 60px;
  }

  .sanc-grid {
    grid-template-columns: 1fr;
  }

  .rep-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .mat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pr-label {
    display: none;
  }

  .bool-row {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .mat-btns {
    gap: 4px;
  }

  .mat-btn {
    padding: 4px 7px;
    font-size: .62rem;
  }

  .mat-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   LIGHT MODE OVERRIDES
   ================================================================ */
[data-theme="light"] {
  --blue-l: rgba(37, 99, 235, 0.55);
}

[data-theme="light"] .progress-rail {
  background: #ffffff;
  border-bottom: 1px solid rgba(26, 29, 40, 0.08);
}

[data-theme="light"] .pr-step:not(:last-child)::after {
  background: rgba(26, 29, 40, 0.12);
}

[data-theme="light"] .pr-step.done:not(:last-child)::after {
  background: #2563eb;
}

[data-theme="light"] .pr-dot {
  background: #f0f4ff;
  border-color: rgba(26, 29, 40, 0.18);
  color: rgba(26, 29, 40, 0.4);
}

[data-theme="light"] .pr-step.done .pr-dot {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

[data-theme="light"] .ch:hover {
  border-color: rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.04);
}

[data-theme="light"] .ch.sel {
  background: rgba(37, 99, 235, 0.08);
}

[data-theme="light"] .bool-btn:hover {
  border-color: rgba(26, 29, 40, 0.25);
  color: var(--text-primary);
}

[data-theme="light"] .mat-row.answered {
  border-color: rgba(37, 99, 235, 0.3);
}

[data-theme="light"] .mat-btn:hover {
  border-color: rgba(26, 29, 40, 0.25);
  color: var(--text-primary);
}

[data-theme="light"] .mat-btn.sel[data-v=na] {
  border-color: rgba(26, 29, 40, 0.2);
  color: var(--text-secondary);
}

[data-theme="light"] .btn-next {
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

[data-theme="light"] .btn-next:hover {
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.4);
}

[data-theme="light"] .btn-back:hover {
  background: rgba(26, 29, 40, 0.06);
  color: var(--text-primary);
}

[data-theme="light"] .btn-restart:hover {
  border-color: rgba(26, 29, 40, 0.25);
  color: var(--text-primary);
}

[data-theme="light"] .progress-rail .pr-steps {
  /* ensure label text contrast */
}

[data-theme="light"] .rep-legal {
  color: rgba(26, 29, 40, 0.28);
}

[data-theme="light"] .range-row input[type=range]::-webkit-slider-thumb {
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

[data-theme="light"] .diag-hero-bg {
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(37, 99, 235, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 85% 20%, rgba(201, 162, 39, 0.04) 0%, transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

[data-theme="light"] .eb-info {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: #1d4ed8;
}

[data-theme="light"] ::-webkit-scrollbar-track { background: #f0f4ff; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #94a3b8; }

[data-theme="light"] .score-ring {
  color: #2563eb !important;
}
[data-theme="light"] .score-ring.sc-g {
  background: rgba(5, 150, 105, 0.07);
}
[data-theme="light"] .score-ring.sc-y {
  color: #b8860b !important;
  background: rgba(184, 134, 11, 0.07);
}
[data-theme="light"] .score-ring.sc-r {
  color: #dc2626 !important;
  background: rgba(220, 38, 38, 0.07);
}

[data-theme="light"] .rep-section {
  background: #ffffff;
  border-color: rgba(26, 29, 40, 0.1);
}

[data-theme="light"] .rep-section-title {
  border-color: rgba(26, 29, 40, 0.08);
}