/**
 * UseMathematics polished activity report renderer.
 * v0.6.8 browser-local report template with print/PDF fixes and admin-configurable design tokens.
 */

:root {
  --um-report-navy: #061f46;
  --um-report-navy-2: #0a2d63;
  --um-report-blue: #0b72d9;
  --um-report-cyan: #21c7f3;
  --um-report-purple: #6d4df2;
  --um-report-orange: #f97316;
  --um-report-red: #dc2626;
  --um-report-green: #16a34a;
  --um-report-ink: #071b3a;
  --um-report-muted: #53657f;
  --um-report-border: #c7d8ee;
  --um-report-soft-blue: #f2f8ff;
  --um-report-soft-purple: #f7f2ff;
  --um-report-soft-orange: #fff7ed;
  --um-report-soft-red: #fff1f2;
  --um-report-soft-green: #eefdf4;
  --um-report-paper: #ffffff;
  --um-report-line: rgba(6,31,70,.16);
  --um-report-shadow: 0 22px 55px rgba(6,31,70,.15);
}

.um-report-demo-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 2rem auto;
}

.um-report-demo-toolbar {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-end;
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid rgba(49, 215, 255, .22);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(7,22,42,.92), rgba(4,12,24,.82));
  color: #eef8ff;
  box-shadow: 0 20px 50px rgba(0,0,0,.16);
}
.um-report-demo-toolbar h2 { margin: .1rem 0 .25rem; color: #fff; }
.um-report-demo-toolbar p { margin: .2rem 0 0; color: #cfe5f4; max-width: 720px; }
.um-report-demo-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.um-report-copy-status { min-height: 1.4rem; margin: .4rem 0 .85rem; color: #d9f3ff; font-weight: 800; }

.um-report-root { width: 100%; }

.um-report-page {
  box-sizing: border-box;
  width: min(100%, 8.5in);
  min-height: 11in;
  margin: 0 auto 2rem;
  padding: .42in;
  background: var(--um-report-paper);
  color: var(--um-report-ink);
  border: 1px solid #d9e5f6;
  border-radius: 4px;
  box-shadow: var(--um-report-shadow);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.35;
  overflow: hidden;
}

.um-report-page * { box-sizing: border-box; }
.um-report-page p { margin: 0; }

.um-report-brandbar {
  margin: -.42in -.42in .25in;
  padding: .18in .42in;
  background:
    radial-gradient(circle at 76% 0%, rgba(33,199,243,.17), transparent 30%),
    linear-gradient(135deg, #031432, #062657 62%, #08306c);
  color: #fff;
  border-bottom: 5px solid var(--um-report-cyan);
}
.um-report-brandrow { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.um-report-brand { display: flex; align-items: center; gap: .85rem; }
.um-report-brand-mark {
  width: 54px; height: 54px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 2px solid rgba(255,255,255,.75);
  border-radius: 16px;
  background: rgba(33,199,243,.08);
}
.um-report-brand-title { font-weight: 950; font-size: 1.45rem; letter-spacing: -.035em; }
.um-report-brand-title span { color: var(--um-report-cyan); }
.um-report-brand-subtitle { color: #cdeeff; font-size: .88rem; font-weight: 800; }
.um-report-brand-art { width: 96px; height: 58px; opacity: .9; color: #95eaff; }

.um-report-top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: .25in;
  margin-bottom: .18in;
}
.um-report-titleline { display: flex; gap: .65rem; align-items: flex-start; }
.um-report-title-icon {
  width: 46px; height: 46px; border-radius: 14px;
  color: var(--um-report-blue);
  display: grid; place-items: center;
  background: linear-gradient(180deg, #f0f8ff, #fff);
  border: 1px solid #d8e8fb;
  flex: 0 0 auto;
}
.um-report-title { margin: 0; color: var(--um-report-navy); font-size: 2rem; letter-spacing: -.055em; line-height: 1.02; }
.um-report-meta-grid {
  margin-top: .16in;
  display: flex;
  flex-wrap: wrap;
  gap: .12in .18in;
}
.um-report-meta-item {
  display: flex; align-items: center; gap: .45rem;
  min-width: 122px;
  padding-right: .16in;
  border-right: 1px solid var(--um-report-line);
}
.um-report-meta-item:last-child { border-right: 0; padding-right: 0; }
.um-report-meta-icon { width: 24px; height: 24px; color: var(--um-report-blue); flex: 0 0 auto; }
.um-report-meta-label { display: block; color: var(--um-report-muted); font-size: .67rem; font-weight: 800; letter-spacing: .02em; }
.um-report-meta-value { display: block; color: var(--um-report-navy); font-size: .78rem; font-weight: 950; }
.um-report-score-hero {
  text-align: right;
  min-width: 2.6in;
  color: var(--um-report-navy);
}
.um-report-score-label { font-size: 1rem; font-weight: 950; }
.um-report-score-number { font-size: 2.45rem; line-height: .96; font-weight: 950; letter-spacing: -.055em; white-space: nowrap; }
.um-report-score-number strong { color: var(--um-report-blue); font-size: 1.16em; }

.um-report-student-row {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .1in 0 .16in;
  margin-bottom: .14in;
  border-top: 1px solid var(--um-report-line);
  border-bottom: 1px solid var(--um-report-line);
  font-weight: 750;
}
.um-report-student-row span { display: inline-flex; align-items: center; gap: .45rem; }
.um-report-student-row svg { width: 18px; height: 18px; color: var(--um-report-blue); }

.um-report-section-heading {
  display: flex; align-items: center; gap: .65rem;
  margin: .2in 0 .1in;
  color: var(--um-report-navy);
}
.um-report-section-heading::after {
  content: "";
  height: 2px;
  flex: 1;
  background: linear-gradient(90deg, rgba(11,114,217,.65), rgba(11,114,217,0));
}
.um-report-section-heading-icon {
  width: 34px; height: 34px; border-radius: 999px; background: var(--um-report-blue); color: #fff; display: grid; place-items: center; flex: 0 0 auto;
}
.um-report-section-heading h2 { margin: 0; font-size: 1.02rem; letter-spacing: .015em; text-transform: uppercase; }

.um-report-score-card {
  border: 1.5px solid var(--um-report-border);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, var(--um-report-soft-blue));
  padding: .14in;
  break-inside: avoid;
}
.um-report-score-title {
  display: flex; align-items: center; gap: .55rem; margin-bottom: .1in;
  color: var(--um-report-navy); font-weight: 950; text-transform: uppercase; letter-spacing: .02em;
}
.um-report-score-title svg { width: 28px; height: 28px; color: var(--um-report-blue); }
.um-report-score-table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid #d3e2f5; border-radius: 14px; }
.um-report-score-table th {
  padding: .08in .1in;
  text-align: left;
  font-size: .73rem;
  color: var(--um-report-navy);
  background: #f5f9ff;
  border-bottom: 1px solid #d3e2f5;
}
.um-report-score-table td {
  padding: .11in .1in;
  border-bottom: 1px solid #d3e2f5;
  font-weight: 850;
  vertical-align: middle;
}
.um-report-score-table tr:last-child td { border-bottom: 0; }
.um-report-score-table td:nth-child(2), .um-report-score-table td:nth-child(3), .um-report-score-table td:nth-child(4),
.um-report-score-table th:nth-child(2), .um-report-score-table th:nth-child(3), .um-report-score-table th:nth-child(4) { text-align: center; }
.um-report-score-name { display: flex; align-items: center; gap: .55rem; }
.um-report-score-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; border: 2px solid currentColor; flex: 0 0 auto; }
.um-report-score-row-auto .um-report-score-icon, .um-report-score-row-auto .um-report-weighted { color: var(--um-report-blue); }
.um-report-score-row-ai.reviewed .um-report-score-icon, .um-report-score-row-ai.reviewed .um-report-weighted { color: var(--um-report-purple); }
.um-report-score-row-ai.needs-review .um-report-score-icon, .um-report-score-row-ai.needs-review .um-report-weighted { color: var(--um-report-orange); }
.um-report-weighted { font-size: 1.03rem; font-weight: 950; }
.um-report-teacher-warning {
  margin: .11in 0 .02in .56in;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--um-report-orange);
  font-weight: 950;
  background: var(--um-report-soft-orange);
  border: 1px solid rgba(249,115,22,.24);
  border-radius: 999px;
  padding: .08in .14in;
}
.um-report-teacher-warning svg { width: 18px; height: 18px; }
.um-report-score-note {
  display: flex; align-items: flex-start; gap: .45rem;
  margin: .1in .1in 0;
  color: #233653;
  font-size: .78rem;
  font-weight: 650;
}
.um-report-score-note svg { width: 17px; height: 17px; color: var(--um-report-navy); flex: 0 0 auto; margin-top: .02rem; }

.um-report-response-section {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: .12in;
  padding: .12in;
  margin-bottom: .08in;
  border: 1px solid var(--um-report-border);
  border-radius: 15px;
  background: var(--um-report-soft-blue);
  break-inside: avoid;
}
.um-report-response-section.is-warning { background: linear-gradient(180deg, #fff, var(--um-report-soft-orange)); border-color: rgba(249,115,22,.28); }
.um-report-response-section.is-green { background: linear-gradient(180deg, #fff, var(--um-report-soft-green)); border-color: rgba(22,163,74,.26); }
.um-report-section-badge { width: 34px; height: 34px; border-radius: 999px; background: var(--um-report-blue); color: #fff; display: grid; place-items: center; font-weight: 950; }
.um-report-response-title { margin: 0 0 .04in; color: var(--um-report-navy); font-size: 1.04rem; line-height: 1.15; }
.um-report-response-summary { color: #334767; font-size: .78rem; font-weight: 650; }
.um-report-items { display: grid; gap: .07in; margin-top: .09in; }

.um-report-item {
  background: rgba(255,255,255,.88);
  border: 1px solid #d3e2f5;
  border-radius: 12px;
  padding: .09in;
  break-inside: avoid;
}
.um-report-item.is-ai-reviewed { border-color: rgba(109,77,242,.32); background: linear-gradient(180deg, #fff, var(--um-report-soft-purple)); }
.um-report-item.is-ai-needed { border-color: rgba(249,115,22,.32); background: linear-gradient(180deg, #fff, #fffaf5); }
.um-report-item.is-teacher-required { border-color: rgba(220,38,38,.24); background: linear-gradient(180deg, #fff, var(--um-report-soft-red)); }
.um-report-item.is-auto { border-color: rgba(11,114,217,.22); }
.um-report-item-grid { display: grid; grid-template-columns: 1fr auto; gap: .1in; align-items: start; }
.um-report-prompt { color: var(--um-report-navy); font-weight: 900; font-size: .8rem; }
.um-report-response { margin-top: .03in; color: #243753; font-size: .78rem; }
.um-report-response strong { color: var(--um-report-navy); }
.um-report-badges { display: flex; gap: .06in; flex-wrap: wrap; justify-content: flex-end; }
.um-report-badge {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .045in .085in;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: .68rem;
  font-weight: 950;
  white-space: nowrap;
}
.um-report-badge svg { width: 14px; height: 14px; }
.um-report-badge.auto { color: var(--um-report-blue); background: #edf7ff; }
.um-report-badge.ai-reviewed { color: var(--um-report-purple); background: var(--um-report-soft-purple); }
.um-report-badge.ai-needed { color: var(--um-report-orange); background: var(--um-report-soft-orange); }
.um-report-badge.teacher-required { color: var(--um-report-red); background: var(--um-report-soft-red); }
.um-report-badge.correct { color: var(--um-report-green); background: var(--um-report-soft-green); }
.um-report-badge.blank { color: #64748b; background: #f8fafc; }
.um-report-badge.partial { color: var(--um-report-orange); background: var(--um-report-soft-orange); }
.um-report-badge.incorrect { color: var(--um-report-red); background: var(--um-report-soft-red); }
.um-report-badge.score { color: var(--um-report-purple); background: #fff; min-width: .48in; justify-content: center; }

.um-report-mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .09in; }
.um-report-mini-card { padding: .1in; border-radius: 14px; border: 1px solid #d3e2f5; background: rgba(255,255,255,.88); }
.um-report-mini-card h4 { margin: 0 0 .05in; color: var(--um-report-blue); display: flex; align-items: center; gap: .35rem; }
.um-report-mini-card h4 svg { width: 24px; height: 24px; flex: 0 0 auto; }
.um-report-mini-card p { color: #243753; font-size: .72rem; margin-top: .04in; }
.um-report-mini-card .um-report-badges { justify-content: flex-start; margin-top: .08in; }

.um-report-checklist { display: grid; gap: .035in; }
.um-report-checkline { display: flex; align-items: flex-start; gap: .32rem; font-size: .74rem; color: #243753; }
.um-report-checkline svg { width: 15px; height: 15px; color: var(--um-report-green); margin-top: .05rem; flex: 0 0 auto; }
.um-report-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: .12in; }

.um-report-objective-table { width: 100%; border-collapse: separate; border-spacing: 0 .04in; font-size: .78rem; }
.um-report-objective-table th { text-align: left; color: var(--um-report-navy); font-size: .72rem; padding: 0 .06in; }
.um-report-objective-table td { background: #fff; padding: .07in .08in; border-top: 1px solid #cae2e6; border-bottom: 1px solid #cae2e6; font-weight: 750; }
.um-report-objective-table td:first-child { border-left: 1px solid #cae2e6; border-radius: 10px 0 0 10px; }
.um-report-objective-table td:last-child { border-right: 1px solid #cae2e6; border-radius: 0 10px 10px 0; }

.um-report-objective-table td svg {
  width: 20px;
  height: 20px;
  margin-right: .35rem;
  color: var(--um-report-blue);
  vertical-align: -.28em;
  flex: 0 0 auto;
}
.um-report-objective-score { margin: .08in 0 0; color: var(--um-report-navy); font-weight: 950; }
.um-report-objective-score strong { color: var(--um-report-blue); font-size: 1.08rem; }

.um-report-legend {
  margin-top: .16in;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .12in;
  border: 1px solid var(--um-report-border);
  border-radius: 13px;
  padding: .09in;
  background: #fff;
  break-inside: avoid;
}
.um-report-legend-item { display: flex; gap: .45rem; align-items: flex-start; }
.um-report-legend-icon { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; border: 2px solid currentColor; flex: 0 0 auto; }
.um-report-legend-item.auto { color: var(--um-report-blue); }
.um-report-legend-item.ai { color: var(--um-report-orange); }
.um-report-legend-item.teacher { color: var(--um-report-red); }
.um-report-legend-item strong { display: block; color: var(--um-report-navy); font-size: .75rem; }
.um-report-legend-item span { display: block; color: var(--um-report-muted); font-size: .67rem; font-weight: 650; }

.um-report-footer {
  margin-top: .18in;
  padding-top: .1in;
  border-top: 1px solid var(--um-report-line);
  text-align: center;
  color: var(--um-report-muted);
  font-size: .72rem;
  font-weight: 700;
}
.um-report-footer svg { width: 16px; height: 16px; color: var(--um-report-blue); vertical-align: -.18em; margin-right: .25rem; }

.um-report-plain-output {
  width: 100%;
  min-height: 10rem;
  margin-top: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85rem;
}

@media (max-width: 760px) {
  .um-report-demo-toolbar { align-items: stretch; flex-direction: column; }
  .um-report-demo-actions { justify-content: flex-start; }
  .um-report-page { padding: 18px; }
  .um-report-brandbar { margin: -18px -18px 18px; padding: 18px; }
  .um-report-top { grid-template-columns: 1fr; }
  .um-report-score-hero { text-align: left; min-width: 0; }
  .um-report-student-row { flex-direction: column; align-items: flex-start; }
  .um-report-mini-grid, .um-report-two-col, .um-report-legend { grid-template-columns: 1fr; }
  .um-report-item-grid { grid-template-columns: 1fr; }
  .um-report-badges { justify-content: flex-start; }
}

@page { size: letter; margin: .30in; }

@media print {
  html, body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Hide page chrome/toolbars without hiding the report's own header/footer. */
  .no-print,
  .um-report-demo-toolbar,
  .um-report-copy-status,
  .umc-activity-topbar,
  .umc-activity-studentbar,
  .umc-site-header,
  .um-nav-list,
  .um-footer,
  .site-header,
  .site-footer,
  #masthead,
  #colophon,
  .main-navigation {
    display: none !important;
  }

  .um-report-demo-shell,
  .um-report-root {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .um-report-page {
    width: 7.9in !important;
    min-height: auto !important;
    margin: 0 auto !important;
    padding: .22in !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    font-size: 10.5pt;
    line-height: 1.28;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .um-report-page header,
  .um-report-page footer {
    display: block !important;
  }

  .um-report-brandbar {
    display: block !important;
    margin: -.22in -.22in .18in !important;
    padding: .16in .22in !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .um-report-brand-mark { width: 42px; height: 42px; border-radius: 12px; }
  .um-report-brand-title { font-size: 1.18rem; }
  .um-report-brand-subtitle { font-size: .76rem; }
  .um-report-brand-art { width: 70px; height: 42px; }

  .um-report-top { gap: .14in; margin-bottom: .12in; }
  .um-report-title { font-size: 1.55rem; }
  .um-report-title-icon { width: 34px; height: 34px; border-radius: 10px; }
  .um-report-meta-grid { gap: .07in .12in; margin-top: .10in; }
  .um-report-meta-item { min-width: 102px; padding-right: .10in; gap: .30rem; }
  .um-report-meta-icon { width: 18px; height: 18px; }
  .um-report-meta-label { font-size: .55rem; }
  .um-report-meta-value { font-size: .62rem; }
  .um-report-score-hero { min-width: 1.9in; }
  .um-report-score-label { font-size: .78rem; }
  .um-report-score-number { font-size: 1.85rem; }

  .um-report-section-heading { margin: .15in 0 .08in; }
  .um-report-section-heading-icon { width: 27px; height: 27px; }
  .um-report-section-heading h2 { font-size: .84rem; }
  .um-report-score-card { padding: .10in; border-radius: 12px; }
  .um-report-score-title { margin-bottom: .06in; font-size: .82rem; }
  .um-report-score-title svg { width: 22px; height: 22px; }
  .um-report-score-table th { padding: .045in .06in; font-size: .60rem; }
  .um-report-score-table td { padding: .065in .06in; font-size: .74rem; }
  .um-report-score-icon { width: 25px; height: 25px; }
  .um-report-weighted { font-size: .82rem; }
  .um-report-score-note { font-size: .64rem; margin: .06in .06in 0; }
  .um-report-teacher-warning { margin: .07in 0 .01in .32in; padding: .045in .08in; font-size: .74rem; }

  .um-report-response-section {
    grid-template-columns: 32px 1fr;
    gap: .07in;
    padding: .075in;
    margin-bottom: .055in;
    border-radius: 10px;
  }
  .um-report-section-badge { width: 25px; height: 25px; font-size: .72rem; }
  .um-report-response-title { font-size: .82rem; margin-bottom: .025in; }
  .um-report-response-summary { font-size: .62rem; }
  .um-report-items { gap: .045in; margin-top: .055in; }
  .um-report-item { padding: .055in; border-radius: 8px; }
  .um-report-prompt { font-size: .64rem; }
  .um-report-response { font-size: .62rem; }
  .um-report-badge { font-size: .55rem; padding: .025in .055in; }
  .um-report-badge svg { width: 10px; height: 10px; }
  .um-report-mini-grid { gap: .055in; }
  .um-report-mini-card { padding: .065in; border-radius: 9px; }
  .um-report-mini-card h4 { font-size: .74rem; margin-bottom: .025in; }
  .um-report-mini-card h4 svg { width: 18px; height: 18px; }
  .um-report-mini-card p { font-size: .58rem; margin-top: .02in; }
  .um-report-checkline { font-size: .60rem; gap: .22rem; }
  .um-report-checkline svg { width: 12px; height: 12px; }
  .um-report-objective-table { font-size: .62rem; border-spacing: 0 .025in; }
  .um-report-objective-table th { font-size: .58rem; }
  .um-report-objective-table td { padding: .045in .055in; }
  .um-report-objective-table td svg { width: 14px; height: 14px; margin-right: .22rem; }
  .um-report-objective-score { margin-top: .04in; font-size: .74rem; }
  .um-report-objective-score strong { font-size: .9rem; }
  .um-report-legend { margin-top: .09in; padding: .055in; gap: .055in; border-radius: 9px; }
  .um-report-legend-icon { width: 23px; height: 23px; }
  .um-report-legend-item strong { font-size: .60rem; }
  .um-report-legend-item span { font-size: .54rem; }
  .um-report-footer { margin-top: .10in; padding-top: .055in; font-size: .58rem; }

  /* Avoid splitting individual cards, but allow the whole Response Overview to begin on page 1. */
  .um-report-score-card,
  .um-report-response-section,
  .um-report-item,
  .um-report-mini-card,
  .um-report-legend {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .um-report-badge,
  .um-report-score-card,
  .um-report-response-section,
  .um-report-item,
  .um-report-mini-card,
  .um-report-legend,
  .um-report-brandbar {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}


/* v0.8.6 AI review result block */
.um-report-ai-review-section { border-top: 1px solid var(--um-report-border); }
.um-report-ai-status { margin-left: auto; border: 1px solid var(--um-report-border); border-radius: 999px; padding: 0.2rem 0.65rem; font-size: 0.78rem; color: var(--um-report-muted); background: var(--um-report-soft-purple); }
.um-report-ai-results { display: grid; gap: 0.65rem; }
.um-report-ai-result { border: 1px solid var(--um-report-border); border-radius: 16px; padding: 0.75rem 0.85rem; background: #fff; }
.um-report-ai-result p { margin: 0.35rem 0 0; }
.um-report-ai-result-head { display: flex; gap: 0.75rem; justify-content: space-between; align-items: flex-start; color: var(--um-report-ink); }
.um-report-ai-result-head span { flex: 0 0 auto; border-radius: 999px; padding: 0.18rem 0.55rem; background: var(--um-report-soft-blue); border: 1px solid var(--um-report-border); font-weight: 800; }
.um-report-ai-meta { color: var(--um-report-muted); font-size: 0.82rem; }
