/* static/health_check.css — the Health Check page. Layered on sync.css (the
 * lk-* shell), sharing_audit.css (.sa-status) and reuses published_audit's
 * .pa-stat / .pa-badge shapes, redefined here so the page does not depend on
 * that stylesheet's load order. */

.hc-summary { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 10px; margin: 14px 0 4px; }
.hc-summary .pa-stat { border: 1px solid #ebe4df; border-radius: 10px; padding: 12px;
    background: #fffaf7; }
.hc-summary .pa-stat strong { display: block; color: #333; font-size: 1.35rem;
    font-variant-numeric: tabular-nums; }
.hc-summary .pa-stat span { display: block; color: #666; font-size: .78rem; margin-top: 2px; }
.hc-summary .pa-stat-warn { border-color: #e8c9c4; background: #fdf4f2; }
.hc-summary .pa-stat-warn strong { color: #a52f27; }
.hc-incomplete { grid-column: 1 / -1; margin: 4px 0 0; color: #8a5a08; font-size: .85rem; }

/* Per-check rows: title · coverage status · finding counts. Coverage and
   counts sit side by side on purpose (see the JS header). */
.hc-checks { list-style: none; margin: 14px 0 0; padding: 0; }
.hc-check { display: grid; grid-template-columns: 1.2fr 2fr 1.2fr; gap: 8px; align-items: baseline;
    padding: 8px 10px; border-top: 1px solid #f0e9e4; font-size: .9rem; }
.hc-check:first-child { border-top: 0; }
.hc-check-title { font-weight: 600; color: #333; }
.hc-check-status { color: #666; }
.hc-check-counts { color: #333; text-align: right; }
.hc-check-partial .hc-check-status { color: #8a5a08; }
.hc-check-failed .hc-check-status, .hc-check-skipped .hc-check-status { color: #a52f27; }
/* The check running now, and the results grouped by check as they finish. */
.hc-current { margin-top: 14px; padding: 12px 14px; border: 1px solid #f3d9a4; border-radius: 10px; background: #fffdf7; }
.hc-current h2 { font-size: 1rem; margin: 0 0 4px; }
.hc-current-scope { margin: 0 0 4px; color: #5b3d06; font-variant-numeric: tabular-nums; }
.hc-blurb { margin: 0; color: #666; font-size: .9rem; line-height: 1.5; }
.hc-domains { margin: 0 0 14px; }
.hc-domains label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.hc-domains input { width: 100%; max-width: 420px; padding: 8px 10px; border: 1px solid #d8cfc8;
    border-radius: 8px; font: inherit; }
.hc-domains .lk-subhint { margin-top: 4px; }
.hc-sample { margin: 2px 0 0; color: #5b3d06; font-size: .86rem; }
.hc-group { margin-top: 18px; padding-top: 12px; border-top: 2px solid #f0e9e4; }
.hc-group h2 { font-size: 1.05rem; margin: 0 0 2px; }
.hc-group-coverage { margin: 0 0 4px; color: #666; font-size: .88rem; }
.hc-group-partial .hc-group-coverage, .hc-group-skipped .hc-group-coverage { color: #8a5a08; }
.hc-group .hc-blurb { margin-bottom: 8px; }
.hc-clean { color: #2f6b45; margin: 6px 0 0; }
.hc-review-first { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: #fdf4f2; border: 1px solid #e8c9c4; }
.hc-review-first h2 { font-size: .95rem; margin: 0 0 6px; color: #8d2f28; }
.hc-review-first ul { margin: 0; padding-left: 18px; }
.hc-review-first li { margin: 3px 0; }
.hc-review-first a { color: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.hc-check-running .hc-check-status { color: #333; }
.hc-check-queued { color: #999; }
.hc-check-queued .hc-check-title { font-weight: 500; color: #888; }

/* The line under the button while a scan runs. */
.hc-progress { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px;
    background: #fff8e8; border: 1px solid #f3d9a4; color: #5b3d06; font-size: .9rem; line-height: 1.5; }

/* Something must visibly move for the whole minute a check can take. */
.hc-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: #c98a12; margin-right: 6px; vertical-align: middle;
    animation: hc-pulse 1.2s ease-in-out infinite; }
@keyframes hc-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.hc-live-meta { font-variant-numeric: tabular-nums; }
.hc-bar-cell { display: flex; align-items: center; justify-content: flex-end; }
.hc-bar { display: inline-block; width: 100%; max-width: 160px; height: 8px; border-radius: 999px;
    background: #f0e9e4; overflow: hidden; }
.hc-bar-fill { display: block; height: 100%; background: #c98a12; border-radius: 999px;
    transition: width .6s ease; }
.hc-bar-indeterminate .hc-bar-fill { animation: hc-slide 1.4s ease-in-out infinite; }
@keyframes hc-slide { 0% { margin-left: -30%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) {
    .hc-live-dot, .hc-bar-indeterminate .hc-bar-fill { animation: none; }
    .hc-bar-fill { transition: none; }
}

/* Findings: worst first, one card per (check, severity). */
.hc-findings { margin-top: 16px; }
.hc-finding { border: 1px solid #ebe4df; border-left-width: 4px; border-radius: 10px;
    padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.hc-finding header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.hc-finding h3 { margin: 0; font-size: 1rem; }
.hc-finding p { margin: 4px 0; }
.hc-sev-critical { border-left-color: #a52f27; }
.hc-sev-warning { border-left-color: #c98a12; }
.hc-sev-info { border-left-color: #2f6b45; }
.hc-finding .pa-badge { display: inline-block; font-size: .7rem; font-weight: 700;
    padding: 1px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .02em; }
.hc-badge-critical { background: #fbdcd8; color: #8d2f28; }
.hc-badge-warning { background: #fdeacd; color: #8a5a08; }
.hc-badge-info { background: #e7f0e9; color: #2f6b45; }
.hc-samples { font-size: .9rem; color: #444; }
.hc-fix { display: inline-block; margin-top: 6px; font-weight: 600; }

.hc-sample-banner { border: 1px solid #f3d9a4; background: #fff8e8; color: #5b3d06;
    border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: .92rem; }
.hc-sample-banner a { font-weight: 600; margin-left: 6px; }
.hc-export { display: flex; gap: 8px; margin: 10px 0 0; }

@media (max-width: 720px) {
    .hc-summary { grid-template-columns: repeat(2, minmax(110px, 1fr)); }
    .hc-check { grid-template-columns: 1fr; gap: 2px; }
    .hc-check-counts { text-align: left; }
}

/* A stall the page can explain. Amber, not red: nothing has gone wrong — the
   scan is waiting, retrying, or reconnecting, and will carry on by itself. */
.hc-stall { margin: 6px 0 0; color: #8a6116; font-size: .9rem; font-weight: 600; }
