.text-white-75 {
    color: rgba(255, 255, 255, 0.85);
}

.min-w-0 {
    min-width: 0;
}

/* keep scroll targets clear of the fixed navbar */
#resultsWrap,
#progressCard,
.sec-check {
    scroll-margin-top: 5.5rem;
}

/* progress steps */
.sec-steps li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0;
    color: var(--bs-secondary-color);
    transition: color 0.2s ease;
}

.sec-steps li.is-active {
    color: var(--bs-body-color);
    font-weight: 600;
}

.sec-steps li.is-active .bi {
    color: var(--bs-primary);
    animation: sec-pulse 1s ease-in-out infinite;
}

.sec-steps li.is-done .bi {
    color: var(--bs-success);
}

@keyframes sec-pulse {
    50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
    .sec-steps li.is-active .bi {
        animation: none;
    }
}

/* grade ring */
.sec-grade {
    --sec-grade-color: var(--bs-secondary);
    width: 7.5rem;
    height: 7.5rem;
    border-radius: 50%;
    border: 0.55rem solid var(--sec-grade-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bs-body-bg);
    box-shadow: 0 0 0 0.35rem var(--bs-tertiary-bg);
}

.sec-grade-letter {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--sec-grade-color);
}

.sec-grade-score {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    margin-top: 0.2rem;
}

.sec-grade.grade-a { --sec-grade-color: #198754; }
.sec-grade.grade-b { --sec-grade-color: #5f9e2f; }
.sec-grade.grade-c { --sec-grade-color: #d39e00; }
.sec-grade.grade-d { --sec-grade-color: #e8710a; }
.sec-grade.grade-f { --sec-grade-color: #dc3545; }

/* fact chips */
.sec-fact {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.8rem;
    background: var(--bs-tertiary-bg);
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* severity count tiles */
.sec-count {
    border-radius: 0.75rem;
    padding: 0.6rem 0.25rem;
    height: 100%;
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
}

.sec-count.has-value.sec-count-critical { background: var(--bs-danger); color: #fff; }
.sec-count.has-value.sec-count-high { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.sec-count.has-value.sec-count-medium { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.sec-count.has-value.sec-count-low { background: var(--bs-info-bg-subtle); color: var(--bs-info-text-emphasis); }
.sec-count.has-value.sec-count-passed { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }

/* severity badges */
.sec-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.sec-badge-critical { background: var(--bs-danger); color: #fff; }
.sec-badge-high { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); border: 1px solid var(--bs-danger-border-subtle); }
.sec-badge-medium { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); border: 1px solid var(--bs-warning-border-subtle); }
.sec-badge-low { background: var(--bs-info-bg-subtle); color: var(--bs-info-text-emphasis); border: 1px solid var(--bs-info-border-subtle); }
.sec-badge-pass { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); border: 1px solid var(--bs-success-border-subtle); }
.sec-badge-info,
.sec-badge-skip { background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); border: 1px solid var(--bs-border-color); }

/* status icons */
.sec-icon {
    font-size: 1.15rem;
    line-height: 1.4;
    flex-shrink: 0;
}

.sec-icon-critical,
.sec-icon-high { color: var(--bs-danger); }
.sec-icon-medium { color: #e0a800; }
.sec-icon-low { color: var(--bs-info); }
.sec-icon-pass { color: var(--bs-success); }
.sec-icon-info { color: var(--bs-secondary-color); }
.sec-icon-skip { color: var(--bs-tertiary-color); }

/* check rows */
.sec-check {
    border-top: 1px solid var(--bs-border-color-translucent);
}

.sec-check:first-child {
    border-top: 0;
}

.sec-check-summary {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    list-style: none;
}

details.sec-check > .sec-check-summary {
    cursor: pointer;
}

details.sec-check > .sec-check-summary:hover {
    background: var(--bs-tertiary-bg);
}

.sec-check-summary::-webkit-details-marker {
    display: none;
}

details.sec-check > .sec-check-summary::after {
    content: "\F282"; /* bootstrap-icons chevron-down */
    font-family: "bootstrap-icons";
    color: var(--bs-secondary-color);
    transition: transform 0.15s ease;
    line-height: 1.6;
}

details.sec-check[open] > .sec-check-summary::after {
    transform: rotate(180deg);
}

.sec-check-summary:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: -2px;
}

.sec-check-body {
    padding: 0 1rem 1rem 2.9rem;
}

.sec-check.is-highlighted {
    animation: sec-flash 1.6s ease-out;
}

@keyframes sec-flash {
    0% { background: var(--bs-primary-bg-subtle); }
    100% { background: transparent; }
}

.sec-details {
    font-family: var(--bs-font-monospace);
    font-size: 0.78rem;
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 0.6rem 0.75rem 0.6rem 1.75rem;
    margin-bottom: 0.75rem;
    overflow-wrap: anywhere;
}

.sec-fix {
    border-left: 3px solid var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 0.6rem 0.75rem;
    font-size: 0.875rem;
}

.sec-snippet {
    position: relative;
    margin-top: 0.6rem;
}

.sec-snippet pre {
    background: #1e2330;
    color: #e6e8ee;
    border-radius: 0.5rem;
    padding: 0.75rem 3.25rem 0.75rem 0.85rem;
    font-size: 0.78rem;
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.sec-copy {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
}

.sec-empty-note {
    padding: 0.75rem 1rem;
}

/* FAQ */
.sec-faq-item {
    border-top: 1px solid var(--bs-border-color-translucent);
    padding: 0.75rem 0;
}

.sec-faq-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.sec-faq-item > summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.sec-faq-item > summary::-webkit-details-marker {
    display: none;
}

.sec-faq-item > summary::after {
    content: "\F282";
    font-family: "bootstrap-icons";
    font-weight: normal;
    color: var(--bs-secondary-color);
    transition: transform 0.15s ease;
}

.sec-faq-item[open] > summary::after {
    transform: rotate(180deg);
}

.sec-faq-item > p {
    margin-top: 0.5rem;
}

.sec-priority-link {
    text-decoration: none;
}

.sec-priority-link:hover .sec-priority-title {
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .sec-grade {
        width: 6rem;
        height: 6rem;
        border-width: 0.45rem;
    }

    .sec-grade-letter {
        font-size: 2rem;
    }

    .sec-check-summary {
        padding: 0.7rem 0.75rem;
        gap: 0.5rem;
    }

    .sec-check-body {
        padding: 0 0.75rem 0.9rem 0.75rem;
    }
}
