/* Small bits that don't belong in utility classes. */

.spinner {
  border: 3px solid #3d3a39; /* hairline */
  border-top-color: #00d992; /* primary green */
  border-radius: 9999px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─────────────────────────────────────────────────────────────
   Print / "Save as PDF" → light (white) theme.
   The screen UI is dark-canvas, but a printed/PDF report reads far
   better on white, so for print we override the dark tokens to a
   light palette. The single green accent is kept (darkened for
   contrast) so the report stays on-brand.
   ───────────────────────────────────────────────────────────── */
@media print {
  @page {
    size: A4;
    margin: 12mm 12mm;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  html,
  body {
    background: #ffffff !important;
    color: #14171a !important;
  }

  /* Keep only the report; drop interactive chrome. */
  .print\:hidden,
  #recheck-btn {
    display: none !important;
  }
  main {
    display: block !important;
  }

  /* Surfaces → white */
  .bg-canvas {
    background-color: #ffffff !important;
  }
  .bg-canvas-soft {
    background-color: #e9ecef !important;
  }
  .card-feature {
    background-color: #ffffff !important;
    border-color: #dfe2e6 !important;
    color: #14171a !important;
    box-shadow: none !important;
  }

  /* Borders / dividers → light gray */
  .border-hairline {
    border-color: #dfe2e6 !important;
  }
  .divide-hairline > * {
    border-color: #dfe2e6 !important;
  }

  /* Text → dark */
  .text-ink,
  .text-ink-strong {
    color: #14171a !important;
  }
  .text-body {
    color: #3a4047 !important;
  }
  .text-mute {
    color: #6a7178 !important;
  }

  /* Accents — kept, darkened for contrast on white */
  .text-good,
  .text-primary {
    color: #0a7f54 !important;
  }
  .text-warn {
    color: #8a5a00 !important;
  }
  .text-bad {
    color: #c0241d !important;
  }
  .bg-good,
  .bg-primary {
    background-color: #00c389 !important;
  }
  .bg-warn {
    background-color: #d29922 !important;
  }
  .bg-bad {
    background-color: #f04438 !important;
  }
  .bg-hairline {
    background-color: #c4c9cf !important;
  }

  /* Score gauge: lighten the track ring, drop the green glow */
  svg circle[stroke="#3d3a39"] {
    stroke: #e3e6ea !important;
  }
  #gauge-arc {
    filter: none !important;
  }

  /* Avoid awkward breaks inside cards, rows, and groups. */
  .card-feature,
  #r-signals > div,
  #r-pillars > div,
  li {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Tighten oversized display type for paper. */
  #r-grade {
    font-size: 48px !important;
  }
  #r-score {
    font-size: 36px !important;
  }
}
