.seo-note {
    color: var(--muted);
    font-size: 0.86rem;
    margin: 0 0 16px;
    line-height: 1.5;
}

.seo-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.seo-metric {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
}

.seo-metric-label {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.seo-metric strong {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.seo-metric-action {
    display: flex;
    align-items: center;
    justify-content: center;
}

.seo-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.seo-toolbar input[type="search"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.seo-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.seo-card:hover {
    border-color: #99f6e4;
    box-shadow: 0 6px 18px rgba(15, 118, 110, 0.08);
}

.seo-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.seo-card h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
}

.seo-card-site {
    font-size: 0.8rem;
    color: var(--muted);
    direction: ltr;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 10px;
}

.seo-badge {
    min-width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    background: #f1f5f9;
    color: #475569;
    flex-shrink: 0;
}

.seo-badge.g-A { background: #ecfdf5; color: #065f46; }
.seo-badge.g-B { background: #f0fdfa; color: #0f766e; }
.seo-badge.g-C { background: #fffbeb; color: #92400e; }
.seo-badge.g-D { background: #fff7ed; color: #9a3412; }
.seo-badge.g-F { background: #fef2f2; color: #991b1b; }

.seo-fails {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    color: #991b1b;
}

.seo-fails li::before {
    content: '· ';
}

.seo-card-foot {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.seo-empty {
    text-align: center;
    padding: 28px;
    color: var(--muted);
}

.seo-log {
    background: #0f172a;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    max-height: 160px;
    overflow: auto;
    margin-bottom: 14px;
    white-space: pre-wrap;
}

@media (max-width: 720px) {
    .seo-metrics { grid-template-columns: 1fr 1fr; }
    .seo-metric-action { grid-column: 1 / -1; }
}
