/* =========================================
   Petra Coaching — Team Performance Assessment
   Diagnostic Tool Stylesheet

   Depends on: styles.css (design tokens, buttons, typography)
   Additional tokens for zone coloring defined below.
========================================= */

:root {
  --zone-strength: #2E7D32;
  --zone-attention: #F9A825;
  --zone-action: #C62828;
}

/* ---- 1. Container ---- */
.diagnostic-container {
  width: 90%;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 0 80px;
  min-height: calc(100vh - var(--nav-h) - 180px);
}

/* Widen container for welcome screen only */
.diagnostic-container:has(.dx-welcome) {
  max-width: 1080px;
}

/* ---- 2. Welcome Screen ---- */
.dx-welcome {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* -- Header: title + lead -- */
.dx-welcome-header {
  margin-bottom: 56px;
}

.dx-welcome-header .eyebrow {
  margin-bottom: 12px;
  display: block;
}

.dx-welcome h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 20px;
}

.dx-welcome h1 em {
  font-style: italic;
  color: var(--navy);
}

.dx-welcome-lead {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 640px;
}

.dx-welcome-lead strong {
  color: var(--navy);
  font-weight: 600;
}

/* -- Two-column grid -- */
.dx-welcome-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}

@media (min-width: 768px) {
  .dx-welcome-grid {
    grid-template-columns: 1fr 360px;
    gap: 64px;
  }
}

/* -- Left column: explanation -- */
.dx-welcome-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dx-welcome-subtitle {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-text, var(--amber));
  margin-bottom: 4px;
}

.dx-welcome-levels {
  list-style: none;
  counter-reset: level;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dx-welcome-levels li {
  counter-increment: level;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 0.92rem;
  color: var(--body-text);
  line-height: 1.6;
}

.dx-welcome-levels li::before {
  content: counter(level);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}

.dx-welcome-levels li strong {
  color: var(--navy);
  font-weight: 700;
}

.dx-welcome-levels li span {
  color: var(--muted);
}

.dx-welcome-research {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
  font-style: italic;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.dx-welcome-meta {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Citations / research foundation */
.dx-welcome-citations {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.dx-welcome-citations-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.dx-welcome-citations ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dx-welcome-citations li {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
}

.dx-welcome-citations a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}

.dx-welcome-citations a:hover {
  color: var(--amber-dark, #c98200);
  border-color: var(--amber);
}

/* -- Right column: form card -- */
.dx-welcome-action {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.dx-welcome-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px 28px;
  background: var(--bg-alt, #fafafa);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.dx-welcome-form-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.dx-welcome-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
}

.dx-welcome-form label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
}

.dx-welcome-form input {
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--body-text);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
  width: 100%;
}

.dx-welcome-form input:focus {
  border-color: var(--amber);
}

.dx-welcome-form input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.dx-welcome-form .btn {
  margin-top: 4px;
}

.dx-welcome-form select {
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--body-text);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
  width: 100%;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7585' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.dx-welcome-form select:focus {
  border-color: var(--amber);
}

/* ---- 3. Assessment Screen ---- */
.dx-assess {
  display: flex;
  flex-direction: column;
  padding: 48px 0 32px;
}

/* Progress */
.dx-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.dx-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.dx-progress-bar span {
  display: block;
  height: 100%;
  background: var(--navy);
  border-radius: 2px;
  transition: width 0.4s var(--ease);
}

.dx-progress-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  min-width: 56px;
  text-align: right;
}

/* Section label (eyebrow) */
.dx-section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber-text);
  margin-bottom: 16px;
}

.dx-section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--amber);
  flex-shrink: 0;
}

/* Question text */
.dx-question {
  font-family: var(--font-sans);
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 40px;
  max-width: 600px;
}

/* Likert scale */
.dx-likert {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-self: stretch;
}

.dx-likert-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 64px;
  min-height: 64px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  flex: 1;
}

.dx-likert-btn:hover {
  border-color: var(--amber);
  background: rgba(244, 165, 0, 0.04);
}

.dx-likert-btn .dx-likert-num {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.dx-likert-btn .dx-likert-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
}

.dx-likert-btn.selected {
  background: var(--amber);
  border-color: var(--amber);
}

.dx-likert-btn.selected .dx-likert-num {
  color: var(--white);
}

.dx-likert-btn.selected .dx-likert-label {
  color: rgba(255, 255, 255, 0.85);
}

/* Assess inner layout */
.dx-assess-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Back button */
.dx-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
  margin-bottom: 20px;
}

.dx-back-btn:hover {
  color: var(--navy);
}

.dx-back-btn::before {
  content: '\2190';
}

/* Open-ended textarea */
.dx-textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--body-text);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
  resize: vertical;
  min-height: 120px;
  line-height: 1.7;
}

.dx-textarea:focus {
  border-color: var(--amber);
}

.dx-textarea::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.dx-textarea + .btn {
  margin-top: 32px;
}

/* ---- 4. Email Gate Screen ---- */
.dx-email {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - var(--nav-h));
  padding: 48px 0;
}

.dx-email h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.dx-email .dx-email-subtitle {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 16px;
  margin-bottom: 32px;
  max-width: 420px;
}

.dx-email-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 400px;
  margin-bottom: 16px;
}

.dx-email-form .form-group {
  text-align: left;
  margin-bottom: 0;
}

.dx-email-form input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--body-text);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
}

.dx-email-form input:focus {
  border-color: var(--amber);
}

.dx-email-form .btn {
  width: 100%;
  justify-content: center;
}

.dx-email-privacy {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 400px;
  text-align: center;
}

/* ---- 5. Results / Report Screen ---- */
.dx-report {
  padding: 40px 0 80px;
}

.dx-report-header {
  margin-bottom: 48px;
}

.dx-report-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 8px;
}

.dx-report-header .dx-report-date {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Role lens */
.dx-role-lens {
  background: var(--snow);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: 4px;
  padding: 20px 24px;
  margin-bottom: 0;
}

.dx-role-lens-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-text);
  margin-bottom: 8px;
  display: block;
}

.dx-role-lens p:last-child {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink);
  margin: 0;
}

/* Radar chart container */
.dx-radar-container {
  max-width: 400px;
  margin: 0 auto 48px;
}

.dx-radar-container canvas {
  width: 100% !important;
  height: auto !important;
}

/* Scores table */
.dx-scores-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 48px;
}

.dx-scores-table th {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
}

.dx-scores-table td {
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--body-text);
  border-bottom: 1px solid var(--border);
}

.dx-scores-table tr td:first-child {
  font-weight: 600;
  color: var(--navy);
  border-left: 3px solid transparent;
  padding-left: 13px;
}

.dx-scores-table tr.dx-zone-strength td:first-child {
  border-left-color: var(--zone-strength);
  color: var(--zone-strength);
}

.dx-scores-table tr.dx-zone-attention td:first-child {
  border-left-color: var(--zone-attention);
  color: var(--zone-attention);
}

.dx-scores-table tr.dx-zone-action td:first-child {
  border-left-color: var(--zone-action);
  color: var(--zone-action);
}

/* Section divider */
.dx-section-divider {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

/* Strengths */
.dx-strengths {
  margin-bottom: 48px;
}

.dx-strengths h2,
.dx-improvements h2,
.dx-open-ended h2 {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 24px;
}

.dx-strengths-level,
.dx-improvements-level {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-text);
  margin-top: 24px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.dx-strengths-level:first-child,
.dx-improvements-level:first-child {
  margin-top: 0;
}

.dx-strength-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--zone-strength);
  border-radius: 4px;
  background: var(--white);
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(18, 36, 97, 0.04);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.dx-strength-card:hover {
  box-shadow: 0 4px 16px rgba(18, 36, 97, 0.08);
  transform: translateY(-1px);
}

.dx-strength-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.dx-strength-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
}

/* Improvements */
.dx-improvements {
  margin-bottom: 48px;
}

.dx-improvement-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--zone-attention);
  border-radius: 4px;
  background: var(--white);
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(18, 36, 97, 0.04);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.dx-improvement-card:hover {
  box-shadow: 0 4px 16px rgba(18, 36, 97, 0.08);
  transform: translateY(-1px);
}

.dx-improvement-card.dx-zone-action {
  border-left-color: var(--zone-action);
}

.dx-improvement-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}

.dx-improvement-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.dx-improvement-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.dx-improvement-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.dx-improvement-action {
  padding: 12px 16px;
  background: var(--snow);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 0.85rem;
  color: var(--body-text);
  line-height: 1.6;
}

.dx-improvement-action strong {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

/* Item detail (expandable per-question breakdown) */
.dx-item-detail {
  margin-bottom: 32px;
}

.dx-item-detail summary {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  padding: 10px 0;
  transition: color 0.2s;
}

.dx-item-detail summary:hover {
  color: var(--amber);
}

.dx-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.dx-item-row:last-child {
  border-bottom: none;
}

.dx-item-row .dx-item-text {
  flex: 1;
  color: var(--body-text);
  line-height: 1.5;
}

.dx-item-row .dx-item-score {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 32px;
  text-align: center;
}

/* Open-ended responses */
.dx-open-ended {
  margin-bottom: 48px;
}

.dx-open-ended blockquote {
  padding: 16px 24px;
  border-left: 3px solid var(--border);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--body-text);
  line-height: 1.7;
  margin-bottom: 16px;
  background: var(--snow);
  border-radius: 0 4px 4px 0;
}

/* Report actions */
.dx-report-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* CTA band (soft Petra branding) */
.dx-cta-band {
  background: var(--navy);
  border-radius: 4px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 48px;
}

.dx-cta-band h3 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
}

.dx-cta-band h3 em {
  font-style: italic;
  color: var(--amber);
}

.dx-cta-band p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.60);
  line-height: 1.6;
  margin-top: 8px;
  max-width: 400px;
}

.dx-cta-band .dx-cta-actions {
  flex-shrink: 0;
}

/* Sample preview overlay */
.dx-sample-preview {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 32px;
}

.dx-sample-preview img {
  width: 100%;
  display: block;
}

.dx-sample-preview::after {
  content: 'SAMPLE';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-family: var(--font-sans);
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(18, 36, 97, 0.12);
  pointer-events: none;
  white-space: nowrap;
}

/* ---- 6. Loading / Transition States ---- */
.dx-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: 20px;
}

.dx-loading::before {
  content: '';
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: dx-spin 0.8s linear infinite;
}

.dx-loading-text {
  font-size: 0.88rem;
  color: var(--muted);
}

@keyframes dx-spin {
  to { transform: rotate(360deg); }
}

.dx-fade-in {
  animation: dx-fadeIn 0.35s ease forwards;
}

.dx-fade-out {
  animation: dx-fadeOut 0.25s ease forwards;
}

@keyframes dx-fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dx-fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ---- 7. Responsive ---- */

/* Mobile-first defaults are already set above */

/* Tablet and up (768px+) */
@media (min-width: 768px) {
  .diagnostic-container {
    padding: 64px 0 96px;
  }

  .dx-likert-btn {
    min-width: 80px;
    min-height: 72px;
    padding: 14px 20px;
  }

  .dx-likert-btn .dx-likert-num {
    font-size: 1.25rem;
  }

  .dx-likert-btn .dx-likert-label {
    font-size: 0.75rem;
  }

  .dx-email-form {
    flex-direction: column;
  }
}

/* Ensure mobile tap targets */
@media (max-width: 767px) {
  .dx-likert {
    gap: 8px;
  }

  .dx-likert-btn {
    min-height: 56px;
    min-width: 56px;
    padding: 10px 8px;
  }

  .dx-question {
    font-size: 1.1rem;
    margin-bottom: 28px;
  }

  .dx-radar-container {
    max-width: 300px;
  }

  .dx-email-form {
    flex-direction: column;
  }

  .dx-email-form .btn {
    width: 100%;
    justify-content: center;
  }

  .dx-cta-band {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .dx-cta-band p {
    max-width: none;
  }

  .dx-report-actions {
    flex-direction: column;
  }

  .dx-report-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .dx-improvement-card-header {
    gap: 10px;
  }

  .dx-sample-preview::after {
    font-size: 2.5rem;
  }

  .dx-scores-table {
    font-size: 0.82rem;
  }

  .dx-scores-table th,
  .dx-scores-table td {
    padding: 10px 12px;
  }
}

/* =========================================================
   Sprint 2: Team Member Flow, Dashboard, Comparison
   ========================================================= */

/* ---- Welcome Join Link ---- */
.dx-welcome-join {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.dx-welcome-join p {
  font-size: 0.82rem;
  color: var(--muted);
}

.dx-welcome-join a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}

.dx-welcome-join a:hover {
  color: var(--amber-dark, #c98200);
  border-color: var(--amber);
}

/* ---- Team Join Screen ---- */
.dx-team-join {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-h) - 180px);
  padding: 48px 0;
}

.dx-team-join-inner {
  width: 100%;
  max-width: 480px;
  text-align: center;
}

.dx-team-join h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.dx-team-join-subtitle {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.dx-team-join-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.dx-team-join-form .form-group {
  text-align: left;
}

.dx-team-join-form label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  display: block;
  margin-bottom: 6px;
}

.dx-team-join-form input {
  width: 100%;
  padding: 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-sans);
  color: var(--body-text);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
}

.dx-team-join-form input:focus {
  border-color: var(--amber);
}

.dx-team-join-form .btn {
  width: 100%;
  justify-content: center;
}

.dx-team-join-status {
  font-size: 0.85rem;
  line-height: 1.6;
  min-height: 24px;
  margin-top: 8px;
}

.dx-team-join-status.dx-error {
  color: var(--zone-action);
}

/* Team Confirm Card */
.dx-team-confirm-card {
  text-align: center;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-alt, #fafafa);
  margin-top: 24px;
}

.dx-team-confirm-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.dx-team-confirm-card h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.dx-team-confirm-invited {
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 24px;
}

.dx-team-confirm-info {
  text-align: left;
  font-size: 0.88rem;
  color: var(--body-text);
  line-height: 1.7;
  margin-bottom: 24px;
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.dx-team-confirm-info p {
  margin-bottom: 12px;
}

.dx-team-confirm-info p:last-child {
  margin-bottom: 0;
}

.dx-team-confirm-card .btn {
  width: 100%;
  justify-content: center;
}

/* ---- Team Thank You Screen ---- */
.dx-team-thankyou {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-h) - 180px);
  padding: 48px 0;
}

.dx-team-thankyou-inner {
  width: 100%;
  max-width: 560px;
  text-align: center;
}

.dx-team-thankyou-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--zone-strength);
  color: var(--white);
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.dx-team-thankyou h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}

.dx-team-thankyou-message {
  font-size: 1rem;
  color: var(--body-text);
  line-height: 1.7;
  margin-bottom: 12px;
}

.dx-team-thankyou-note {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
  font-style: italic;
}

.dx-team-thankyou-cta {
  text-align: center;
  padding-top: 32px;
}

.dx-team-thankyou-cta h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

.dx-team-thankyou-cta p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.dx-team-thankyou-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Leader Dashboard ---- */
.dx-dashboard {
  padding: 40px 0 80px;
  max-width: 640px;
  margin: 0 auto;
}

.dx-dashboard h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.dx-dashboard-subtitle {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 40px;
}

/* Response Counter */
.dx-dashboard-counter {
  text-align: center;
  padding: 40px 32px;
  background: var(--bg-alt, #fafafa);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 32px;
}

.dx-dashboard-count {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.dx-dashboard-count-label {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 8px;
  margin-bottom: 20px;
}

.dx-dashboard-progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  max-width: 300px;
  margin: 0 auto;
}

.dx-dashboard-progress-bar span {
  display: block;
  height: 100%;
  background: var(--navy);
  border-radius: 3px;
  transition: width 0.4s var(--ease);
}

/* Share Link */
.dx-dashboard-share {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 24px;
}

.dx-dashboard-share h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.dx-dashboard-share p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.dx-share-link-row {
  display: flex;
  gap: 8px;
}

.dx-share-link-row input {
  flex: 1;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--body-text);
  background: var(--white);
  outline: none;
}

.dx-share-link-row input:focus {
  border-color: var(--amber);
}

.dx-share-link-row .btn {
  white-space: nowrap;
  min-width: 100px;
}

.dx-share-code {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 12px;
  margin-bottom: 0;
}

.dx-share-code strong {
  font-family: var(--font-sans);
  letter-spacing: 0.15em;
  color: var(--navy);
}

/* Settings */
.dx-dashboard-settings {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 24px;
}

.dx-dashboard-settings h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
}

.dx-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.dx-settings-row:last-of-type {
  border-bottom: none;
  margin-bottom: 16px;
}

.dx-settings-row label {
  font-size: 0.85rem;
  color: var(--body-text);
  flex: 1;
}

.dx-settings-row select {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--body-text);
  background: var(--white);
  outline: none;
  min-width: 140px;
}

.dx-settings-row select:focus {
  border-color: var(--amber);
}

/* Release / Status */
.dx-dashboard-release {
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
}

.dx-release-status {
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.dx-release-waiting {
  color: var(--muted);
}

.dx-release-ready {
  color: var(--zone-strength);
  font-weight: 600;
}

.dx-release-active {
  color: var(--zone-strength);
  font-weight: 600;
}

.dx-dashboard-release .btn {
  width: 100%;
  justify-content: center;
}

/* ---- Comparison Report: Gap Analysis ---- */
.dx-gap-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 4px;
}

.dx-gap-blindspot {
  color: var(--zone-action);
}

.dx-gap-perception {
  color: var(--zone-attention);
}

.dx-gap-aligned {
  color: var(--zone-strength);
}

.dx-gap-underestimate {
  color: #5C6BC0;
}

/* Aligned Section */
.dx-aligned {
  margin-bottom: 48px;
}

.dx-aligned h2 {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.dx-aligned p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.dx-aligned-card {
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--zone-strength);
  border-radius: 4px;
  background: var(--white);
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(18, 36, 97, 0.04);
}

.dx-aligned-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.dx-aligned-scores {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.dx-aligned-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Blind Spots Section */
.dx-blindspots {
  margin-bottom: 48px;
}

.dx-blindspots h2 {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.dx-blindspots > p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.dx-blindspot-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--zone-action);
  border-radius: 4px;
  background: var(--white);
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(18, 36, 97, 0.04);
}

.dx-blindspot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dx-blindspot-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
}

.dx-blindspot-gap {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--zone-action);
  background: rgba(198, 40, 40, 0.08);
  padding: 4px 10px;
  border-radius: 12px;
}

.dx-blindspot-scores {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
  font-size: 0.82rem;
}

.dx-score-leader {
  color: var(--navy);
  font-weight: 600;
}

.dx-score-team {
  color: #225857;
  font-weight: 600;
}

.dx-blindspot-card > p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

/* Perception Gaps */
.dx-perception-gaps-heading {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 32px;
  margin-bottom: 12px;
}

.dx-perception-card {
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--zone-attention);
  border-radius: 4px;
  background: var(--white);
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(18, 36, 97, 0.04);
}

.dx-perception-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.dx-perception-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Item detail team score */
.dx-item-team-score {
  font-size: 0.85rem;
  color: #225857;
  font-weight: 600;
  margin-left: 8px;
}

.dx-item-team {
  color: #225857;
}

/* Muted text helper */
.dx-muted {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ---- Responsive: Sprint 2 additions ---- */
@media (max-width: 767px) {
  .dx-share-link-row {
    flex-direction: column;
  }

  .dx-settings-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .dx-settings-row select {
    width: 100%;
  }

  .dx-team-thankyou-actions {
    flex-direction: column;
  }

  .dx-team-thankyou-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .dx-blindspot-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .dx-dashboard-counter {
    padding: 32px 24px;
  }

  .dx-dashboard-count {
    font-size: 3rem;
  }
}
