/* ── Page Speed Scorer ── */
.ps-score-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px 0 18px;
}

.ps-score-circle {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.ps-score-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ps-score-circle-bg {
    fill: none;
    stroke: rgba(3,29,54,.07);
    stroke-width: 8;
}

.ps-score-circle-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset .8s ease;
}

.ps-score-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ps-score-num {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
}

.ps-score-label {
    font-size: 11px;
    color: #6b7a8d;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 2px;
}

.ps-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 480px) { .ps-metrics { grid-template-columns: 1fr; } }

.ps-metric {
    background: var(--secondary-color, #F8F8F8);
    border: 1px solid rgba(3,29,54,.07);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ps-metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(10,73,166,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color, #0A49A6);
    font-size: 15px;
    flex-shrink: 0;
}

.ps-metric-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color, #031D36);
    display: block;
}

.ps-metric-key {
    font-size: 11px;
    color: #6b7a8d;
    margin-top: 2px;
    display: block;
}

.ps-recommendations {
    border-top: 1px solid rgba(3,29,54,.06);
    padding-top: 16px;
}

.ps-recommendations h5 {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color, #031D36);
    margin-bottom: 10px;
}

.ps-rec-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(3,29,54,.05);
    font-size: 13px;
    color: #374151;
}

.ps-rec-item:last-child { border-bottom: none; }

.ps-rec-item i { font-size: 14px; margin-top: 1px; flex-shrink: 0; }
.ps-rec-good   i { color: #16a34a; }
.ps-rec-warn   i { color: #d97706; }
.ps-rec-bad    i { color: #dc2626; }

.ps-grade-label {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

/* ── Sections ── */
.ps-section {
    border: 1px solid rgba(3,29,54,.09);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
}

.ps-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(3,29,54,.04);
    border-bottom: 1px solid rgba(3,29,54,.08);
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color, #031D36);
}

.ps-section-head i {
    color: var(--accent-color, #0A49A6);
    font-size: 13px;
}

.ps-section-body {
    padding: 14px 16px;
}

/* ── Detail Summary (badge row above table) ── */
.ps-detail-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.ps-summary-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ps-summary-good { background: #dcfce7; color: #15803d; }
.ps-summary-warn { background: #fef3c7; color: #b45309; }
.ps-summary-bad  { background: #fee2e2; color: #b91c1c; }

/* ── Detail Table ── */
.ps-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid rgba(3,29,54,.07);
}

.ps-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    color: var(--primary-color, #031D36);
    min-width: 420px;
}

.ps-detail-table thead tr {
    background: rgba(3,29,54,.04);
}

.ps-detail-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #6b7a8d;
    border-bottom: 1px solid rgba(3,29,54,.07);
    white-space: nowrap;
}

.ps-detail-table td {
    padding: 7px 10px;
    border-bottom: 1px solid rgba(3,29,54,.05);
    vertical-align: middle;
}

.ps-detail-table tbody tr:last-child td { border-bottom: none; }

.ps-detail-table tbody tr:hover { background: rgba(10,73,166,.03); }

.ps-detail-table td:first-child {
    color: #9ca3af;
    font-size: 11px;
    width: 30px;
    text-align: center;
}

.ps-url-cell {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #374151;
}

/* ── Inline Badges (table cells) ── */
.ps-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .2px;
    white-space: nowrap;
}

.ps-badge-good { background: #dcfce7; color: #15803d; }
.ps-badge-warn { background: #fef3c7; color: #b45309; }
.ps-badge-bad  { background: #fee2e2; color: #b91c1c; }

/* ── Tag (e.g., media attribute) ── */
.ps-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(3,29,54,.07);
    color: #374151;
}

/* ── Empty state ── */
.ps-empty {
    font-size: 13px;
    color: #9ca3af;
    text-align: center;
    padding: 12px 0 4px;
    font-style: italic;
}

/* ── SEO Checks Grid ── */
.ps-checks-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

@media (max-width: 580px) { .ps-checks-grid { grid-template-columns: 1fr; } }

.ps-check-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 11px;
    border-radius: 10px;
    font-size: 12px;
    border: 1px solid transparent;
}

.ps-check-item i {
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

.ps-check-item > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ps-check-item strong {
    font-size: 12px;
    font-weight: 700;
    display: block;
    white-space: nowrap;
}

.ps-check-item span {
    font-size: 11px;
    color: #6b7a8d;
    display: block;
    word-break: break-word;
}

.ps-check-pass {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.ps-check-pass i { color: #16a34a; }
.ps-check-pass strong { color: #15803d; }

.ps-check-fail {
    background: #fff7ed;
    border-color: #fed7aa;
}

.ps-check-fail i { color: #dc2626; }
.ps-check-fail strong { color: #b91c1c; }

/* ── Recommendations List ── */
.ps-recs-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
