/* Встроенные HTML-аудиты: изоляция от глобальных стилей сайта */
.audit-embed-main {
    position: relative;
    background: #f9f9f9;
}

.audit-embed-main.audit-embed-main--seo-report {
    background: #e2e8f0;
}

.audit-hero-compact {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #e5e7eb;
}

.audit-hero-breadcrumbs,
.audit-hero-breadcrumbs a,
.audit-hero-breadcrumbs .breadcrumb-current {
    color: rgba(229, 231, 235, 0.8);
}

.audit-hero-title {
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
}

.audit-hero-lead {
    margin: 0;
    max-width: 980px;
    color: rgba(229, 231, 235, 0.78);
    font-size: 14px;
    line-height: 1.55;
}

.audit-case-root,
.seo-report-root {
    position: relative;
    isolation: isolate;
}

/* Фиксированные элементы аудита не перекрывают шапку сайта (у неё z-index выше) */
.audit-case-root .sidebar {
    z-index: 40;
}

/* Шапка сайта использует .nav-link с !important; сайдбар аудита — тоже .nav-link */
.audit-case-root .sidebar .nav-link,
.audit-case-root .sidebar .nav-link:hover,
.audit-case-root .sidebar .nav-link.active {
    color: #fff !important;
    background: transparent !important;
    font-weight: inherit !important;
    border-radius: 3px !important;
    padding: 8px 10px !important;
}

.audit-case-root .sidebar .nav-link:hover,
.audit-case-root .sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.12) !important;
}

.audit-case-root .sidebar-toggle {
    z-index: 45;
}

.audit-case-root .scroll-btn {
    z-index: 35;
}

.audit-case-root .image-popup {
    z-index: 60;
}

.audit-case-root .webmaster-panel {
    z-index: 55;
}

.audit-case-root .scroll-btn,
.audit-case-root .scroll-btn.up,
.audit-case-root .scroll-btn.down {
    display: none !important;
}

@media (min-width: 1025px) {
    .audit-case-root .sidebar-toggle {
        top: calc(15px + env(safe-area-inset-top, 0px));
    }
}

.audit-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.audit-related-card {
    display: block;
    padding: 18px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    text-decoration: none;
    transition: all .2s ease;
}

.audit-related-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.audit-related-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.25rem;
}

.audit-related-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 7px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.audit-related-filter em {
    font-style: normal;
    opacity: .7;
    font-weight: 600;
}

.audit-related-filter--all {
    color: #334155;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.audit-related-filter--all.is-active {
    color: #fff;
    background: #0f172a;
    border-color: #0f172a;
}

.audit-related-filter--seo {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.audit-related-filter--audit {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.audit-related-filter--report {
    color: #b45309;
    background: #fffbeb;
    border-color: #fde68a;
}

.audit-related-filter:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.audit-related-filter.is-active {
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

.audit-related-filter--seo.is-active {
    color: #fff;
    background: #059669;
    border-color: #059669;
}

.audit-related-filter--audit.is-active {
    color: #fff;
    background: #2563eb;
    border-color: #2563eb;
}

.audit-related-filter--report.is-active {
    color: #fff;
    background: #d97706;
    border-color: #d97706;
}

.audit-related-filter.is-active em {
    opacity: .9;
}

.audit-related-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #2563eb;
    background: #eff6ff;
    padding: 4px 8px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.audit-related-tag--seo {
    color: #047857;
    background: #d1fae5;
}

.audit-related-tag--audit {
    color: #1d4ed8;
    background: #dbeafe;
}

.audit-related-tag--report {
    color: #b45309;
    background: #fef3c7;
}

.audit-related-card[hidden] {
    display: none !important;
}

.audit-related-empty {
    margin: .5rem 0 0;
    color: #6b7280;
    font-size: 14px;
}

.audit-related-title {
    margin: 0 0 8px;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.audit-related-lead {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.audit-related-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: #111827;
    font-size: 13px;
    font-weight: 600;
}

.audit-related-all-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    text-decoration: none;
    color: #111827;
    font-size: 13px;
    font-weight: 600;
}

.audit-related-all-link:hover {
    background: #f8fafc;
}

@media (max-width: 768px) {
    .audit-hero-title {
        font-size: 22px;
    }
}
