@media print {
  body { font-size: 8pt; }
  .no-print { display: none !important; }
  .print-only { display: block !important; }
  .report-grid { gap: 3px; }
  .report-grid > div { break-inside: avoid; page-break-inside: avoid; }
  .report-category-title { font-size: 7pt; }
  .report-item { padding: 1px 0; }
  .item-code { font-size: 5.5pt; }
  .segmented-bar { height: 10px; gap: 0.5px; }
  .segment { border-radius: 0.5px; }
}

.print-only { display: none; }

.report-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}

@media (max-width: 1200px) {
  .report-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  .report-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Report block-based score visualization ===== */

.report-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 2px 0;
  width: 100%;
  gap: 4px;
}

.item-code {
  font-size: 6.5px;
  text-align: left;
  line-height: 1.3;
  color: #374151;
  white-space: nowrap;
  min-width: 28px;
  flex-shrink: 0;
}

.segmented-bar {
  display: flex;
  flex: 1;
  height: 14px;
  gap: 1.5px;
  border-radius: 2px;
}

.segment {
  flex: 1;
  height: 100%;
  border-radius: 1.5px;
  min-width: 2px;
  transition: background-color 0.15s ease;
}

.segment.empty {
  background-color: #e5e7eb;
}

.segment.filled-green {
  background-color: #22c55e;
}

.segment.filled-orange {
  background-color: #f97316;
}

.segment.filled-accent {
  background-color: #a855f7;
}

.segment.filled-stale {
  background-color: #fbbf24;
}

.tab-active {
  background-color: #3b82f6;
  color: white;
}

/* ===== Game-like styles for AFLS assessment ===== */

/* Bigger checklist items */
.checklist-item {
  padding: 12px 16px;
  font-size: 0.95rem;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.checklist-item:hover {
  background-color: #f8fafc;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Score label base — game badge style */
.score-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  user-select: none;
}

/* Hide default radio */
.score-label input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 0;
  height: 0;
  margin: 0;
  position: absolute;
  opacity: 0;
}

/* Custom radio dot */
.score-label .radio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid currentColor;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.score-label input[type="radio"]:checked + .radio-dot {
  border-width: 3px;
  box-shadow: 0 0 0 2px currentColor inset;
}

/* Score-level colors and hover effects */

/* Not Mastered — gray */
.score-not-mastered {
  color: #6b7280;
  border-color: #d1d5db;
  background: #f9fafb;
}
.score-not-mastered:hover {
  transform: scale(1.08);
  border-color: #6b7280;
  background: #f3f4f6;
  box-shadow: 0 0 14px rgba(107,114,128,0.3);
}
.score-not-mastered input[type="radio"]:checked ~ .radio-text,
.score-not-mastered input[type="radio"]:checked ~ .radio-dot {
  color: #6b7280;
}
.score-not-mastered:has(input:checked) {
  background: #6b7280;
  color: white;
  border-color: #6b7280;
  box-shadow: 0 0 12px rgba(107,114,128,0.4);
}

/* Prompted — purple (was amber/yellow) */
.score-prompted {
  color: #581c87;
  border-color: #d8b4fe;
  background: #faf5ff;
}
.score-prompted:hover {
  transform: scale(1.08);
  border-color: #a855f7;
  background: #f3e8ff;
  box-shadow: 0 0 14px rgba(168,85,247,0.35);
}
.score-prompted:has(input:checked) {
  background: #a855f7;
  color: white;
  border-color: #a855f7;
  box-shadow: 0 0 12px rgba(168,85,247,0.45);
}

/* Partial — orange */
.score-partial {
  color: #9a3412;
  border-color: #fdba74;
  background: #fff7ed;
}
.score-partial:hover {
  transform: scale(1.08);
  border-color: #ea580c;
  background: #ffedd5;
  box-shadow: 0 0 14px rgba(234,88,12,0.35);
}
.score-partial:has(input:checked) {
  background: #ea580c;
  color: white;
  border-color: #ea580c;
  box-shadow: 0 0 12px rgba(234,88,12,0.45);
}

/* Mastered — green */
.score-mastered {
  color: #166534;
  border-color: #86efac;
  background: #f0fdf4;
}
.score-mastered:hover {
  transform: scale(1.08);
  border-color: #22c55e;
  background: #dcfce7;
  box-shadow: 0 0 14px rgba(34,197,94,0.35);
}
.score-mastered:has(input:checked) {
  background: #22c55e;
  color: white;
  border-color: #22c55e;
  box-shadow: 0 0 12px rgba(34,197,94,0.45);
}

/* Independent — blue/purple */
.score-independent {
  color: #3730a3;
  border-color: #a5b4fc;
  background: #eef2ff;
}
.score-independent:hover {
  transform: scale(1.08);
  border-color: #6366f1;
  background: #e0e7ff;
  box-shadow: 0 0 14px rgba(99,102,241,0.35);
}
.score-independent:has(input:checked) {
  background: #6366f1;
  color: white;
  border-color: #6366f1;
  box-shadow: 0 0 12px rgba(99,102,241,0.45);
}

/* Category tabs — game-like */
.category-tab {
  position: relative;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
}
.category-tab:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.25);
}
.category-tab.tab-active {
  background-color: #1d4ed8;
  color: white;
  border-bottom-color: #fbbf24;
}
.category-tab:not(.tab-active):hover {
  background-color: #dbeafe;
  color: #1e40af;
  border-bottom-color: #93c5fd;
}

/* Save Draft button — game-like */
.btn-save-draft {
  position: relative;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
  overflow: hidden;
}
.btn-save-draft:hover {
  transform: scale(1.06);
  box-shadow: 0 0 18px rgba(59,130,246,0.45);
}
.btn-save-draft:active {
  transform: scale(0.97);
}

/* Progress bar — striking */
.progress-bar-track {
  background: linear-gradient(90deg, #e5e7eb, #d1d5db);
  border-radius: 9999px;
  overflow: hidden;
  height: 14px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.progress-bar-fill {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
  background-size: 200% 100%;
  height: 100%;
  border-radius: 9999px;
  transition: width 0.5s ease;
  animation: progress-shimmer 3s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(59,130,246,0.4);
}
@keyframes progress-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===== Carried-over item styling ===== */

.checklist-item.is-carried-over {
  border-color: #fbbf24 !important;
  background-color: #fefce8 !important;
}
.checklist-item.is-carried-over .score-label {
  opacity: 0.6;
}
.checklist-item.is-carried-over .score-label:hover {
  opacity: 1;
}

/* ===== Re-assessment banner ===== */

.reassessment-banner {
  background: #fefce8;
  border: 1px solid #fbbf24;
  color: #92400e;
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
