.afc-detection,
.afc-samples,
.afc-report,
.afc-report * {
    box-sizing: border-box;
}

.url-input-row {
    position: relative;
}

.afc-detection {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 24px;
    margin: 8px 2px 0;
    color: #68788e;
    font-size: 12px;
    font-weight: 700;
}

.afc-detection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9aa8b8;
}

.afc-clear-input {
    position: absolute;
    right: 45px;
    top: 50%;
    z-index: 5;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eef3f7;
    color: #5e6c7e;
    font-size: 22px;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
}

.afc-clear-input.visible {
    opacity: 1;
    pointer-events: auto;
}

.afc-clear-input:hover,
.afc-clear-input:focus-visible {
    background: #dfe8ef;
    color: #172033;
    outline: none;
}

.audit-card .url-input {
    padding-right: 88px !important;
}

.afc-detection[data-type="VIDEO"] .afc-detection-dot,
.afc-detection[data-type="POST"] .afc-detection-dot,
.afc-detection[data-type="PRODUCT"] .afc-detection-dot,
.afc-detection[data-type="PROFILE"] .afc-detection-dot,
.afc-detection[data-type="WEBSITE"] .afc-detection-dot,
.afc-detection[data-type="GOOGLE_MAPS"] .afc-detection-dot {
    background: #149957;
    box-shadow: 0 0 0 4px rgba(20, 153, 87, .12);
}

.afc-detection[data-type="UNSUPPORTED"] {
    color: #d44949;
}

.afc-detection[data-type="UNSUPPORTED"] .afc-detection-dot {
    background: #d44949;
}

.afc-samples {
    display: none !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 10px 2px 0;
    color: #748399;
    font-size: 12px;
}

.afc-report-shell {
    overflow: hidden;
    border: 1px solid var(--afc-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(25, 66, 102, .09);
}

.afc-report-shell > .afc-report-title {
    padding: 23px 22px 14px;
}

.afc-score-overview {
    --afc-level-color: var(--afc-green);
    display: grid;
    grid-template-columns: 190px 190px;
    align-items: center;
    justify-content: center;
    gap: 28px;
    min-height: 230px;
    padding: 18px 34px 25px;
    background: #fff;
}

.afc-score-overview .afc-score-ring {
    justify-self: center;
    width: 175px;
    height: 175px;
}

.afc-score-overview[data-level="strong"] { --afc-level-color: var(--afc-green); }
.afc-score-overview[data-level="needs-work"] { --afc-level-color: var(--afc-amber); }
.afc-score-overview[data-level="critical"] { --afc-level-color: var(--afc-red); }
.afc-score-overview[data-level="unavailable"] { --afc-level-color: #8492a5; }

.afc-score-mascot {
    width: 170px;
    height: 170px;
    object-fit: contain;
}

.afc-source-note {
    margin: 0;
    padding: 12px 22px;
    border-top: 1px solid var(--afc-line);
    background: #f8fbfd;
    color: #607086;
    font-size: 13px;
    font-weight: 750;
    text-align: center;
}

.afc-report-shell > .afc-public-data {
    padding: 18px 22px;
    border-top: 1px solid var(--afc-line);
}

.afc-report-shell > .afc-source-note + .afc-public-data {
    border-top: 0;
}

.afc-report-shell > .afc-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--afc-line);
}

.afc-report-shell .afc-checks-panel,
.afc-report-shell .afc-upgrade-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.afc-report-shell .afc-upgrade-card {
    border-top: 1px solid var(--afc-line);
}

.afc-sample-button,
.afc-filter-button,
.afc-smart-button {
    font: inherit;
    cursor: pointer;
}

.afc-sample-button {
    padding: 5px 9px;
    border: 1px solid #dce8f2;
    border-radius: 999px;
    background: #fff;
    color: #435269;
    font-size: 12px;
    font-weight: 700;
}

.afc-sample-button:hover,
.afc-sample-button:focus-visible {
    border-color: #83bfee;
    color: #075eaf;
    outline: 0;
}

.afc-report {
    --afc-blue: #0878e5;
    --afc-blue-dark: #075eaf;
    --afc-blue-soft: #eaf5ff;
    --afc-line: #dce8f2;
    --afc-ink: #172033;
    --afc-text: #435269;
    --afc-muted: #748399;
    --afc-green: #149957;
    --afc-green-soft: #eaf8f0;
    --afc-amber: #c77a08;
    --afc-amber-soft: #fff7e5;
    --afc-red: #d44949;
    --afc-red-soft: #fff0f0;
    width: 100%;
    display: grid;
    gap: 16px;
    color: var(--afc-ink);
    text-align: start;
}

.afc-report[hidden] {
    display: none;
}

.afc-loading,
.afc-score-card,
.afc-summary-card,
.afc-checks-panel,
.afc-upgrade-card,
.afc-error-card {
    border: 1px solid var(--afc-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(25, 66, 102, .08);
}

.afc-loading,
.afc-error-card {
    min-height: 190px;
    display: grid;
    place-items: center;
    padding: 28px;
    text-align: center;
}

.afc-spinner {
    width: 58px;
    height: 58px;
    margin: 0 auto 13px;
    border: 5px solid #dcecf9;
    border-top-color: var(--afc-blue);
    border-radius: 50%;
    animation: afc-spin .8s linear infinite;
}

@keyframes afc-spin {
    to { transform: rotate(360deg); }
}

.afc-loading strong,
.afc-error-card strong {
    display: block;
    font-size: 18px;
}

.afc-loading span,
.afc-error-card span {
    display: block;
    margin-top: 5px;
    color: var(--afc-muted);
    font-size: 13px;
}

.afc-report-title {
    margin: 0;
    color: var(--afc-ink);
    font-size: clamp(25px, 4vw, 38px);
    font-weight: 900;
    letter-spacing: -1px;
    text-align: center;
}

.afc-report-head {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 16px;
}

.afc-score-card {
    min-height: 225px;
    display: grid;
    place-items: center;
    padding: 22px;
    text-align: center;
}

.afc-score-ring {
    --afc-score-angle: 0deg;
    position: relative;
    width: 138px;
    height: 138px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--afc-level-color, var(--afc-green)) 0 var(--afc-score-angle), #e9f0f5 var(--afc-score-angle) 360deg);
}

.afc-score-ring::after {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px #edf2f6;
}

.afc-score-value {
    position: relative;
    z-index: 1;
    width: calc(100% - 34px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    line-height: 1;
    text-align: center;
}

.afc-score-value strong {
    display: block;
    font-size: 39px;
    font-weight: 900;
    letter-spacing: -2px;
}

.afc-score-value .afc-score-level {
    display: block;
    max-width: 118px;
    margin-top: 8px;
    color: var(--afc-level-color);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.afc-score-label {
    margin-top: 12px;
    color: var(--afc-green);
    font-weight: 850;
}

.afc-summary-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
}

.afc-summary-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 14px;
}

.afc-summary-type {
    min-width: 0;
}

.afc-summary-type strong {
    display: block;
    font-size: 21px;
    font-weight: 900;
}

.afc-summary-type span {
    display: block;
    margin-top: 4px;
    color: var(--afc-muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.afc-detected-badge {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--afc-green-soft);
    color: var(--afc-green);
    font-size: 12px;
    font-weight: 850;
}

.afc-public-data {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 24px 18px;
}

.afc-data-chip {
    max-width: 100%;
    padding: 7px 10px;
    border: 1px solid #e2eaf1;
    border-radius: 10px;
    background: #f8fafc;
    color: var(--afc-text);
    font-size: 12px;
    font-weight: 400;
    overflow-wrap: anywhere;
}

.afc-data-label {
    font-weight: 400;
}

.afc-data-value {
    margin-inline-start: 4px;
    color: var(--afc-ink);
    font-weight: 900;
}

.afc-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--afc-line);
    background: #fbfdff;
}

.afc-status-item {
    padding: 15px 18px;
    border-inline-end: 1px solid var(--afc-line);
    text-align: center;
}

.afc-status-item:last-child {
    border-inline-end: 0;
}

.afc-status-item strong {
    display: block;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

.afc-status-item span {
    display: block;
    margin-top: 5px;
    color: var(--afc-muted);
    font-size: 12px;
}

.afc-status-level {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.afc-status-item[data-status="PASSED"] .afc-status-level { color: var(--afc-green); }
.afc-status-item[data-status="WARNING"] .afc-status-level { color: var(--afc-amber); }
.afc-status-item[data-status="FAILED"] .afc-status-level { color: var(--afc-red); }
.afc-status-item[data-status="UNAVAILABLE"] .afc-status-level { color: #748399; }

.afc-status-item[data-status="PASSED"] strong { color: var(--afc-green); }
.afc-status-item[data-status="WARNING"] strong { color: var(--afc-amber); }
.afc-status-item[data-status="FAILED"] strong { color: var(--afc-red); }
.afc-status-item[data-status="UNAVAILABLE"] strong { color: #8492a5; }

.afc-coverage-note {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 15px;
    border: 1px solid #d9e5ee;
    border-radius: 13px;
    background: #f8fbfd;
    color: #607086;
    font-size: 13px;
    font-weight: 700;
}

.afc-checks-panel {
    overflow: hidden;
}

.afc-checks-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--afc-line);
}

.afc-checks-heading h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
}

.afc-checks-heading p {
    margin: 3px 0 0;
    color: var(--afc-muted);
    font-size: 13px;
}

.afc-filter-row {
    display: flex;
    gap: 6px;
}

.afc-filter-button {
    padding: 7px 10px;
    border: 1px solid var(--afc-line);
    border-radius: 10px;
    background: #fff;
    color: var(--afc-text);
    font-size: 12px;
    font-weight: 800;
}

.afc-filter-button[aria-pressed="true"] {
    border-color: #a7d2f5;
    background: var(--afc-blue-soft);
    color: var(--afc-blue-dark);
}

.afc-check-item {
    border-bottom: 1px solid var(--afc-line);
}

.afc-check-item:last-child {
    border-bottom: 0;
}

.afc-check-item[hidden] {
    display: none;
}

.afc-check-item summary {
    list-style: none;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto 30px;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 12px 20px;
    cursor: pointer;
}

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

.afc-check-item[open] summary {
    background: #f9fcff;
}

.afc-check-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f0f4f7;
    color: #637389;
    font-size: 12px;
    font-weight: 900;
}

.afc-check-title strong {
    display: block;
    font-size: 15px;
    font-weight: 900;
}

.afc-check-title span {
    display: block;
    margin-top: 2px;
    color: var(--afc-muted);
    font-size: 12px;
}

.afc-result-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.afc-result-level {
    font-size: 11px;
    font-weight: 900;
}

.afc-result-pill[data-level="strong"] { background: var(--afc-green-soft); color: var(--afc-green); }
.afc-result-pill[data-level="needs-work"] { background: var(--afc-amber-soft); color: var(--afc-amber); }
.afc-result-pill[data-level="critical"] { background: var(--afc-red-soft); color: var(--afc-red); }
.afc-result-pill[data-level="unavailable"] { background: #f0f4f7; color: #748399; }

.afc-toggle {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #cfe5f8;
    border-radius: 50%;
    background: var(--afc-blue-soft);
    color: var(--afc-blue);
    font-weight: 900;
}

.afc-toggle::before { content: "⌄"; transform: translateY(-2px); }
.afc-check-item[open] .afc-toggle::before { content: "⌃"; transform: translateY(2px); }

.afc-check-body {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(250px, .7fr);
    gap: 13px;
    padding: 0 20px 18px 70px;
}

.afc-requirement,
.afc-importance {
    padding: 14px 15px;
    border: 1px solid #e1eaf1;
    border-radius: 13px;
    background: #fff;
}

.afc-requirement p,
.afc-importance p {
    margin: 0;
    color: var(--afc-text);
    font-size: 14px;
}

.afc-importance {
    border-color: #d7e9f8;
    background: #f5faff;
}

.afc-importance strong {
    display: block;
    margin-bottom: 5px;
    color: var(--afc-blue-dark);
    font-size: 18px;
}

.afc-importance[data-level="strong"] .afc-level-label { color: var(--afc-green); }
.afc-importance[data-level="needs-work"] .afc-level-label { color: var(--afc-amber); }
.afc-importance[data-level="critical"] .afc-level-label { color: var(--afc-red); }
.afc-importance[data-level="unavailable"] .afc-level-label { color: #748399; }

.afc-finding,
.afc-recommendation {
    padding: 14px 15px;
    border-radius: 13px;
}

.afc-finding {
    border: 1px solid #e1eaf1;
    background: #f8fafc;
}

.afc-recommendation {
    border: 1px solid #cfe5f8;
    background: #f1f8ff;
}

.afc-body-label {
    display: block;
    margin-bottom: 5px;
    color: var(--afc-muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.afc-finding p,
.afc-recommendation p {
    margin: 0;
    color: var(--afc-text);
    font-size: 14px;
    font-weight: 700;
}

.afc-upgrade-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    background: linear-gradient(105deg, rgba(8, 120, 229, .06), transparent 60%), #fff;
}

.afc-upgrade-copy strong {
    display: block;
    font-size: 16px;
    font-weight: 900;
}

.afc-upgrade-copy p {
    margin: 3px 0 0;
    color: var(--afc-muted);
    font-size: 13px;
}

.afc-smart-button {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid var(--afc-blue);
    border-radius: 11px;
    background: #fff;
    color: var(--afc-blue-dark);
    font-size: 13px;
    font-weight: 900;
}

@media (max-width: 820px) {
    .afc-report-head { grid-template-columns: 1fr; }
    .afc-score-card {
        min-height: 0;
        grid-template-columns: auto 1fr;
        gap: 18px;
        text-align: start;
    }
    .afc-score-ring { width: 108px; height: 108px; }
    .afc-score-value strong { font-size: 34px; }
    .afc-score-label { margin: 0; }
    .afc-checks-heading { align-items: flex-start; flex-direction: column; }
    .afc-score-overview {
        grid-template-columns: 155px 155px;
        gap: 18px;
        padding-inline: 22px;
    }
    .afc-score-overview .afc-score-ring { width: 145px; height: 145px; }
    .afc-score-mascot { width: 145px; height: 145px; }
}

@media (max-width: 620px) {
    .afc-samples { align-items: flex-start; }
    .afc-report { gap: 12px; }
    .afc-report-title { font-size: 27px; }
    .afc-report-shell > .afc-report-title { padding: 19px 14px 8px; }
    .afc-score-overview {
        grid-template-columns: 128px 100px;
        gap: 14px;
        min-height: 166px;
        padding: 12px 13px 18px;
    }
    .afc-score-overview .afc-score-ring { width: 122px; height: 122px; }
    .afc-score-overview .afc-score-ring::after { inset: 9px; }
    .afc-score-overview .afc-score-value strong { font-size: 31px; }
    .afc-score-overview .afc-score-value .afc-score-level { max-width: 88px; margin-top: 5px; font-size: 10.5px; }
    .afc-score-mascot { width: 100px; height: 118px; }
    .afc-source-note { padding: 10px 13px; font-size: 11.5px; }
    .afc-report-shell > .afc-public-data { padding: 14px 13px; }
    .afc-score-card { grid-template-columns: 94px minmax(0, 1fr); padding: 15px; }
    .afc-score-ring { width: 88px; height: 88px; }
    .afc-score-ring::after { inset: 9px; }
    .afc-score-value strong { font-size: 29px; }
    .afc-summary-top { padding: 17px 15px 12px; }
    .afc-public-data { padding: 0 15px 15px; }
    .afc-detected-badge { padding: 6px 8px; font-size: 10px; }
    .afc-report-shell > .afc-status-grid { grid-template-columns: repeat(2, 1fr); }
    .afc-report-shell > .afc-status-grid .afc-status-item { padding: 13px 9px; }
    .afc-checks-heading { padding: 16px 14px; }
    .afc-filter-row { width: 100%; overflow-x: auto; }
    .afc-filter-button { flex: 0 0 auto; }
    .afc-check-item summary {
        grid-template-columns: 34px minmax(0, 1fr) 27px;
        gap: 9px;
        min-height: 70px;
        padding: 11px 13px;
    }
    .afc-result-pill { grid-column: 2; justify-self: center; text-align: center; }
    .afc-toggle { grid-column: 3; grid-row: 1 / span 2; }
    .afc-check-body { grid-template-columns: 1fr; padding: 0 13px 14px; }
    .afc-upgrade-card { align-items: stretch; flex-direction: column; padding: 17px; }
    .afc-smart-button { width: 100%; }
}
