/* Shared figures for class results and engagement reports. */
:root {
  --primary: #1B2A4A;
  --teal: #14A3A0;
  --accent: #0E7C7A;
  --tint: #E6F6F5;
  --gold: #F5C542;
  --page: #F7F9FB;
  --white: #FFFFFF;
  --line: #E3E8EF;
  --muted: #5B6B85;
  --sans: Figtree, "Segoe UI", sans-serif;
}

.report-sheet { color: var(--primary); }
.report-sheet h1 { margin-bottom: 8px; }
.report-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-weight: 750;
  letter-spacing: .02em;
}
.report-total {
  display: inline-block;
  margin: 8px 0 0;
  padding: 6px 12px;
  background: var(--tint);
  color: var(--primary);
  border-radius: 999px;
  font-weight: 750;
}
.report-block { margin-top: 16px; }
.question-prompt {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.2;
}
.question-count { margin: 8px 0; font-weight: 750; }
.question-n {
  display: inline-block;
  min-width: 1.6em;
  font-size: 2rem;
  line-height: 1;
  color: var(--accent);
}
.question-stats { margin: 0 0 12px; font-size: 1.05rem; }
.question-advice { margin: 12px 0 0; }
.advice-label {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: var(--tint);
  color: var(--primary);
}
.advice-fix { background: #FDECEC; color: #8C3A32; }
.advice-watch { background: #FFF6DB; color: #7A5B00; }
.question-jump {
  position: static;
  margin: 14px 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.question-jump summary {
  cursor: pointer;
  font-weight: 750;
  font-size: 0.92rem;
  padding: 8px 14px;
  color: var(--primary);
}
.question-jump ol {
  margin: 0;
  padding: 0 14px 10px 1.3rem;
  columns: 2;
  column-gap: 28px;
  font-size: 0.84rem;
  line-height: 1.35;
}
.question-jump li { break-inside: avoid; margin: 3px 0; }
.question-jump a { font-weight: 650; }
.question-back { margin: 12px 0 0; font-size: 0.84rem; }
.question-section { scroll-margin-top: 5.5rem; }
@media (max-width: 720px) {
  .question-jump ol { columns: 1; }
}
.report-summary { border-top: 4px solid var(--teal); }
.report-block h2 {
  border-bottom: 4px solid var(--teal);
  padding-bottom: 6px;
}
.report-block table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-variant-numeric: tabular-nums; }
.report-block th, .report-block td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  white-space: pre-line;
}
.report-block th { background: var(--tint); color: var(--primary); }
.report-note { color: var(--muted); margin: 0 0 10px; }
.export-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0 4px;
}
.export-bar .eyebrow { margin: 0 8px 0 0; }
.sr-plot { margin-top: 8px; }
.sr-plot-host { width: 100%; min-height: 280px; }
textarea.sr-figure { display: none; }
.sr-plot .modebar { display: none !important; }

.report-standalone {
  margin: 0;
  background: var(--page);
  color: var(--primary);
  font-family: var(--sans);
  line-height: 1.5;
}
.report-standalone main {
  width: min(960px, calc(100% - 32px));
  margin: 24px auto 48px;
}
.report-standalone .card, .report-standalone .report-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px 18px 18px;
  margin-top: 16px;
}
.report-standalone h1 { font-size: 2rem; letter-spacing: -.03em; margin: 0; }
.report-standalone h2 { font-size: 1.3rem; margin: 0 0 8px; }
.report-standalone a, .report-standalone button.btn {
  color: var(--white);
  background: var(--primary);
  border-radius: 999px;
  padding: 8px 14px;
  text-decoration: none;
  border: 0;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.report-standalone button.btn.secondary, .report-standalone a.btn.secondary {
  background: var(--white);
  color: var(--primary);
  box-shadow: inset 0 0 0 2px var(--line);
}

.test-watermark {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 2px solid #8C3A32;
  border-radius: 12px;
  background: #FDECEC;
  color: #8C3A32;
  font-weight: 800;
  letter-spacing: .01em;
}

/* Staff sample report. Layout only; colors come from the variables above. */
.sample-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid #8C3A32;
  border-radius: 999px;
  color: #8C3A32;
  font-size: .72rem;
  font-weight: 800;
  vertical-align: middle;
  letter-spacing: .01em;
}
.sample-report .sample-stats { margin: 4px 0 14px; }
.sample-summary { margin: 0; padding-left: 1.2rem; }
.sample-summary li + li { margin-top: 6px; }
.sample-figure { margin: 12px 0 0; }
.sample-figure figcaption { margin-top: 4px; font-size: .85rem; }
.sample-themes li, .sample-steps li { margin-bottom: 12px; }
.sample-steps li p { margin: 4px 0 0; }

.shell .card.report-block,
.report-block {
  overflow: visible;
}
.report-block h3,
.report-block h4,
.report-note,
.rank-label,
.rank-kind,
.rank-note,
.rank-empty,
.word-cloud-heading,
.word-cloud-term {
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  max-width: 100%;
  text-overflow: clip;
}
.rank-groups { display: grid; gap: 18px; margin-top: 8px; }
.rank-group h4 { margin: 0 0 8px; font-size: 1.05rem; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-item { margin: 0 0 16px; min-width: 0; }
.rank-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
}
.rank-label { margin: 0; flex: 1 1 12rem; min-width: 0; font-weight: 750; }
.rank-pct { margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--accent); }
.rank-kind { margin: 2px 0 6px; color: var(--muted); }
.rank-note { margin: 6px 0 0; }
.rank-track {
  height: 12px;
  border-radius: 999px;
  background: var(--tint);
  overflow: hidden;
}
.rank-group-fix .rank-fill { background: var(--teal); }
.rank-group-watch .rank-fill { background: var(--accent); }
.rank-fill { display: block; height: 100%; border-radius: 999px; max-width: 100%; }
.rank-fill.is-capped { width: 18%; background: var(--line); }
.rank-fill.is-empty { width: 0; }
.word-cloud { margin: 8px 0 12px; max-width: 100%; }
.word-cloud svg { width: 100%; height: auto; display: block; overflow: visible; }
.word-cloud-heading { margin: 14px 0 6px; font-size: 1.05rem; }
.word-cloud-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.word-cloud-list li { margin: 0; min-width: 0; max-width: 100%; }
.word-cloud-count { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 750; }
.sample-critical {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--teal);
  border-radius: 0 12px 12px 0;
  background: var(--tint);
}
.sample-critical p + p { margin-top: 6px; }
tr.sample-ai td { background: color-mix(in srgb, var(--gold) 12%, white); }
.report-standalone .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.report-standalone .stat { background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 14px 16px; }
.report-standalone .stat .k, .report-standalone .stat .n, .report-standalone .hint, .report-standalone .lede { color: var(--muted); margin: 0; }
.report-standalone .stat strong { display: block; font-size: 2.2rem; line-height: 1; margin: 6px 0; }
.report-standalone .eyebrow { color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.report-standalone .pill { font-size: 13px; font-weight: 800; border-radius: 999px; padding: 3px 10px; background: var(--tint); color: var(--primary); }
.report-standalone .pill.change { background: #FDECEC; color: #8C3A32; }
.report-standalone .pill.wait { background: #FFF6DB; color: #7A5B00; }
@media (max-width: 720px) {
  .sample-report .stats { grid-template-columns: repeat(2, 1fr); }
}

@media print {
  .no-print, header.top, footer.foot, .quiet-note, .toast-stack, .export-bar { display: none !important; }
  .sample-report .stats { grid-template-columns: repeat(4, 1fr); }
  .test-watermark {
    position: fixed;
    left: 8%;
    right: 8%;
    top: 42%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(140, 58, 50, .28);
    font-size: 2.2rem;
    text-align: center;
    transform: rotate(-18deg);
  }
  body.portal, body.report-standalone { background: #fff !important; }
  .card, .report-block {
    box-shadow: none !important;
    break-inside: auto;
    border-color: #ccc !important;
    overflow: visible !important;
  }
  .sr-plot-host, .rank-item, .word-cloud, .sample-critical { break-inside: avoid; }
  .rank-label, .rank-kind, .rank-note, .rank-pct, .word-cloud-term, .report-note, .word-cloud-heading {
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-overflow: clip;
  }
  .rank-track, .rank-fill, .word-cloud svg {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .word-cloud, .word-cloud svg { max-width: 100%; overflow: visible; }
  .question-jump, .question-back { display: none !important; }
  .question-section {
    break-before: page;
    page-break-before: always;
    overflow: visible !important;
    max-height: none !important;
  }
  .question-prompt, .question-stats, .question-advice, .question-count, .question-cloud, .word-cloud-heading {
    overflow: visible !important;
    max-height: none !important;
    white-space: normal !important;
  }
  a { color: #1B2A4A !important; }
}
