/* =====================================================
   QUESTIONNAIRE STYLES
   ===================================================== */
.section {
  line-height: 1.2;
  padding: 2em 0;
}
.section h2 {
  margin-bottom: 1em;
}
.transcopia-assessment-results h2 {
  line-height: 1;
  margin-bottom: 15px;
}

.subcat {
  font-size: 14px;
  margin-bottom: 0.5em;
  color: #0ea5e9;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.question {
  font-size: 18px;
  margin-bottom: 0.5em;
}

.skip-note {
  font-size: 13px;
  color: #666;
  margin-bottom: 1em;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid #0ea5e9;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.answers .answer-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.answers .answer-option:hover {
  border-color: #0ea5e9;
  background: #f0f9ff;
}
.answers .answer-option input[type="radio"] {
  margin-top: 4px;
  flex-shrink: 0;
}
.answers .answer-option .score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #e5e7eb;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.answers .answer-option.score-1 .score-badge {
  background: #fee2e2;
  color: #991b1b;
}
.answers .answer-option.score-2 .score-badge {
  background: #fef3c7;
  color: #92400e;
}
.answers .answer-option.score-3 .score-badge {
  background: #e0f2fe;
  color: #0369a1;
}
.answers .answer-option.score-4 .score-badge {
  background: #dcfce7;
  color: #166534;
}
.answers .answer-option.score-5 .score-badge {
  background: #c7d2fe;
  color: #3730a3;
}

.answers .answer-option .criteria-text {
  flex: 1;
  line-height: 1.5;
}

.answers .skip-option {
  background: #f9fafb;
  border-style: dashed;
}
.answers .skip-option:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}
.answers .skip-option .skip-text {
  color: #666;
  font-style: italic;
}

.nav {
  margin: 1.5em 0;
  display: flex;
  gap: 12px;
}
.transcopia-nav {
  border: 0;
  outline: 0;
  padding: 12px 28px;
  border-radius: 6px;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.transcopia-nav-back {
  background: #e5e7eb;
  color: #374151;
}
.transcopia-nav-back:hover {
  background: #d1d5db;
}
.transcopia-nav-next,
.transcopia-nav-submit {
  background: #20d8ba;
  color: #fff;
}
.transcopia-nav-next:hover,
.transcopia-nav-submit:hover {
  background: #169782;
}

.transcopia-assessment {
  max-width: 720px;
  margin: 0 auto;
}

.transcopia-progress-wrap {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.transcopia-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}

.transcopia-progress-label {
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
}

.transcopia-progress-pct {
  font-weight: 700;
  font-size: 13px;
  color: #0284c7;
}

.transcopia-progress-bar {
  height: 10px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.transcopia-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #0ea5e9 0%, #0284c7 100%);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.transcopia-contact {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 22px 22px 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.transcopia-contact-title {
  margin: 0 0 10px;
  font-size: 26px;
  color: #111827;
  line-height: 1.1;
}

.transcopia-contact-desc {
  margin: 0 0 18px;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.45;
}

.transcopia-field {
  margin-bottom: 14px;
}

.transcopia-field label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.transcopia-field input[type="text"],
.transcopia-field input[type="email"] {
  width: 100%;
  max-width: 420px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.transcopia-field input[type="text"]:focus,
.transcopia-field input[type="email"]:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.transcopia-results-error {
  margin: 12px 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-weight: 600;
}

/* =====================================================
   RESULTS PAGE STYLES
   ===================================================== */
.transcopia-assessment-results {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0px;
}

.transcopia-meta {
  color: #444;
  margin: 0 0 16px;
}

.transcopia-results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.transcopia-results-header-left h2 {
  margin: 0;
}

.transcopia-results-header-right {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  flex-direction: column;
  gap: 10px;
  text-align: right;
}

.transcopia-results-header-right .transcopia-meta {
  margin: 0;
}

/* Results Category Tabs */
.transcopia-results-tabs {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin: 18px 0 10px;
  padding: 0 0 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.55) rgba(226, 232, 240, 0.9);
}

.transcopia-results-tabs::-webkit-scrollbar {
  height: 3px;
}

.transcopia-results-tabs::-webkit-scrollbar-track {
  background: #fff;
}

.transcopia-results-tabs::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.55);
  border-radius: 999px;
  border: 2px solid rgba(226, 232, 240, 0.9);
}

.transcopia-results-tabs::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.75);
}

.transcopia-results-tab {
  appearance: none;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.transcopia-results-tab:hover {
  border-color: #0ea5e9;
}

.transcopia-results-tab.is-active {
  border-color: #0ea5e9;
  background: #f0f9ff;
}

.transcopia-results-tab-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #0ea5e9;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.transcopia-results-tab.is-active .transcopia-results-tab-number {
  background: #0284c7;
}

.transcopia-results-tab-title {
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
  line-height: 1.2;
}

/* Request Help CTA Buttons */
.transcopia-help-cta-top,
.transcopia-help-cta-bottom {
  text-align: center;
  padding: 24px;
  margin: 20px 0;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  border: 1px solid #bae6fd;
}
.transcopia-help-cta-bottom {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #a7f3d0;
}
.transcopia-help-cta-bottom h4 {
  margin: 0 0 8px;
  font-size: 20px;
}
.transcopia-help-cta-bottom p {
  margin: 0 0 16px;
  color: #374151;
}

.transcopia-cta-button {
  display: inline-block;
  background: #0ea5e9;
  color: #fff !important;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none !important;
  font-weight: 600;
  transition: all 0.2s ease;
}
.transcopia-cta-button:hover {
  background: #0284c7;
  transform: translateY(-1px);
}
.transcopia-cta-primary {
  background: #059669;
}
.transcopia-cta-primary:hover {
  background: #047857;
}
.transcopia-cta-large {
  padding: 16px 32px;
  font-size: 18px;
}

/* Category Section */
.transcopia-category-section {
  margin: 32px 0;
  padding: 15px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.category-title {
  margin: 0 0 16px;
  font-size: 24px;
  color: #1e293b;
}
.category-title .category-number {
  color: #0ea5e9;
  font-weight: 700;
}

/* Category Score Summary */
.category-score-summary {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: #f8fafc;
  border-radius: 12px;
}
.score-badge-large {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 12px 20px;
  border-radius: 12px;
  background: #fff;
  border: 2px solid currentColor;
}
.score-badge-large .score-value {
  font-size: 36px;
  font-weight: 700;
}
.score-badge-large .score-label {
  font-size: 18px;
  opacity: 0.7;
}
.score-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* RAG Rating Colors */
.rag-red {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}
.rag-amber {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}
.rag-green {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.rag-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.action-required-flag {
  display: inline-block;
  padding: 6px 12px;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.request-support-link {
  display: inline-block;
  padding: 6px 14px;
  background: #0ea5e9;
  color: #fff !important;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
}
.request-support-link:hover {
  background: #0284c7;
}

/* Subcategory Visuals (Radar + Bar) */
.subcategory-visuals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0;
}

.viz-card {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
}
.viz-card h5 {
  margin: 0 0 12px;
  font-size: 14px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.viz-card .radar-wrap,
.viz-card .bar-wrap {
  position: relative;
  height: 280px;
}
.viz-card canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Heat Map Table */
.heatmap-section {
  margin: 24px 0;
}
.heatmap-section h5 {
  margin: 0 0 12px;
  font-size: 14px;
  text-transform: uppercase;
  color: #555;
}
.heatmap-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}
.heatmap-table thead {
  background: #f8fafc;
}
.heatmap-table th,
.heatmap-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}
.heatmap-table th {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  color: #64748b;
}
.heatmap-table tr.rag-red {
  background: rgba(254, 226, 226, 0.3);
}
.heatmap-table tr.rag-amber {
  background: rgba(254, 243, 199, 0.3);
}
.heatmap-table tr.rag-green {
  background: rgba(220, 252, 231, 0.3);
}

.score-chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
}
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.action-link {
  color: #0ea5e9 !important;
  font-weight: 600;
  text-decoration: none !important;
}
.action-link:hover {
  text-decoration: underline !important;
}
.no-action {
  color: #16a34a;
  font-weight: 500;
}

/* Detailed Breakdown Tables */
.detailed-breakdown {
  margin: 28px 0;
}
.detailed-breakdown h5 {
  margin: 0 0 16px;
  font-size: 16px;
  text-transform: uppercase;
  color: #374151;
}
.subcategory-detail-section {
  margin-bottom: 24px;
}
.subcategory-detail-section h6 {
  margin: 0 0 12px;
  font-size: 16px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 12px;
}
.score-inline {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}
.detail-table thead {
  background: #f1f5f9;
}
.detail-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
}
.detail-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
  line-height: 1.5;
}
.detail-table tr:last-child td {
  border-bottom: none;
}
.detail-table .question-cell {
  font-weight: 500;
  max-width: 200px;
}
.detail-table .risks-cell {
  color: #b91c1c;
}
.detail-table .actions-cell {
  color: #0369a1;
}
.detail-table .help-cell {
  color: #059669;
}

/* Section CTA */
.section-cta {
  text-align: center;
  padding: 20px;
  margin-top: 24px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
}
.section-cta p {
  margin: 0 0 12px;
  color: #475569;
}

/* Overall Summary */
.overall-summary {
  text-align: center;
  padding: 32px;
  margin: 32px 0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 16px;
  border: 1px solid #e2e8f0;
}
.overall-summary h3 {
  margin: 0 0 16px;
}
.overall-score {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}
.score-big {
  font-size: 64px;
  font-weight: 700;
  padding: 8px 24px;
  border-radius: 16px;
}
.score-out-of {
  font-size: 24px;
  color: #64748b;
}

/* Responsive */
@media (max-width: 900px) {
  .subcategory-visuals {
    grid-template-columns: 1fr;
  }
  .transcopia-results-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .transcopia-results-header-right {
    align-items: flex-start;
    text-align: left;
  }
  .transcopia-results-tab {
    min-width: 220px;
  }
  .category-score-summary {
    flex-direction: column;
    text-align: center;
  }
  .score-meta {
    justify-content: center;
  }
  .detail-table {
    display: block;
    overflow-x: auto;
  }
  .viz-card .radar-wrap,
  .viz-card .bar-wrap {
    height: 240px;
  }
  .table-wrap {
    overflow: scroll;
  }
}
