.audit-shell {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(180deg, #faf7ff 0%, #ffffff 28rem);
    color: #0f172a;
    overflow: hidden;
}
.audit-hero {
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 2rem;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 18px 52px rgba(15, 23, 42, 0.05);
}
.audit-soft-card {
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 1.5rem;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.04);
}
.audit-score-ring {
    width: 9rem;
    height: 9rem;
    border-radius: 9999px;
    background: conic-gradient(var(--audit-score-color) calc(var(--audit-score) * 1%), rgba(0, 0, 0, 0.05) 0);
    padding: 0.75rem;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.1);
}
.audit-score-core {
    border-radius: 9999px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.15);
}
.audit-metric {
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.15);
}
.audit-nav {
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 14px 36px rgba(139, 92, 246, 0.06);
    padding: 0.5rem;
    margin: 0 1rem;
    position: -webkit-sticky;
    position: sticky;
    top: 0.75rem;
    z-index: 1020;
}
/* Keep audit rows and compact cards whole across PDF page breaks */
.pdf-audit-block,
.audit-soft-card,
.pdf-card-keep {
    page-break-inside: avoid;
    break-inside: avoid;
}
.audit-nav .nav-link {
    border-radius: 9999px;
    font-family: 'Outfit', sans-serif;
    color: #475569 !important;
    transition: all 0.3s ease;
}
.audit-nav .nav-link.active,
.audit-nav .nav-link:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    color: #8b5cf6 !important;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.1);
}
.audit-section-card {
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 1.5rem;
    overflow: hidden;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.04);
}
.audit-section-card .card-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1) !important;
}
.audit-section-card,
.audit-section-card .card-body,
.audit-section-card .card-footer {
    break-inside: auto;
    page-break-inside: auto;
}
.audit-section-card .card-header,
.audit-section-card .card-header .row,
.audit-section-card .card-header .col,
.audit-section-card .card-header .col-auto {
    break-inside: avoid;
    page-break-inside: avoid;
}
.audit-section-card .card-header {
    break-after: avoid;
    page-break-after: avoid;
}
.audit-section-card .card-header + .card-body,
.audit-section-card .card-header + .card-footer,
.audit-section-card .card-header + div {
    break-before: avoid;
    page-break-before: avoid;
}
.audit-section-pill {
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.2);
}
.audit-url {
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.15);
}
/* Override default bootstrap text colors to outfit */
.h1, .h2, .h3, .h4, .h5, h1, h2, h3, h4, h5 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #0f172a;
}
.text-muted {
    color: #475569 !important;
}
/* Add specific gradient styling to main title */
.premium-text-gradient {
    background: linear-gradient(135deg, #a78bfa 0%, #f472b6 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
/* Action buttons */
.audit-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 7px 14px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.audit-action-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 12%, rgba(255, 255, 255, 0.28) 45%, transparent 78%);
    transform: translateX(-130%);
    transition: transform 0.65s ease;
    pointer-events: none;
    z-index: 0;
}
.audit-action-btn:hover::after,
.audit-action-btn:focus-visible::after {
    transform: translateX(130%);
}
.audit-action-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}
.audit-action-btn > * {
    position: relative;
    z-index: 1;
}
.audit-action-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform-origin: center;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.audit-action-btn-text {
    transition: transform 0.25s ease, opacity 0.25s ease;
}
/* Ghost button (icon-only) */
.audit-action-btn-ghost {
    background: rgba(139, 92, 246, 0.06);
    color: #64748b;
    border: 1px solid rgba(139, 92, 246, 0.12);
    padding: 7px 10px;
}
.audit-action-btn-ghost:hover {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.25);
}
/* Outline button (Re-run) */
.audit-action-btn-outline {
    background: rgba(139, 92, 246, 0.04);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}
.audit-action-btn-outline:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
    transform: translateY(-1px);
}
.audit-action-btn-outline:active {
    transform: translateY(0) scale(0.97);
}
/* Primary button (Download PDF) */
.audit-action-btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}
.audit-action-btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
    transform: translateY(-1px);
}
.audit-action-btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}
.audit-action-btn-outline:hover .audit-action-btn-icon {
    transform: rotate(-18deg);
}
.audit-action-btn-primary:hover .audit-action-btn-icon {
    transform: translateY(1px);
}
.audit-action-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
    cursor: wait;
}
.audit-action-btn.is-loading::after {
    animation: auditActionButtonShimmer 1.1s linear infinite;
}
.audit-action-btn.is-loading .audit-action-btn-icon {
    animation: auditActionButtonSpin 0.95s linear infinite;
}
.audit-action-btn.is-loading .audit-action-btn-text {
    opacity: 0.92;
}
/* Metric badges */
.audit-metric-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
}
/* Fix overflow in metric tiles without hiding values */
.audit-metric {
    overflow: visible;
    min-width: 0;
}
.audit-metric .h3,
.audit-metric .h5 {
    white-space: normal;
    overflow: visible;
    overflow-wrap: break-word;
    line-height: 1.25;
}
.audit-metric .small {
    overflow: visible;
    text-overflow: unset;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.badge-pass {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
}
.badge-fail {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}
.badge-warn {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}
.badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}
.badge-neutral {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
}

/* Score explanation box */
.audit-score-explain {
    background: rgba(139, 92, 246, 0.04);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    max-width: 420px;
}

/* Engine score tiles */
.audit-engine-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: none;
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 14px;
    transition: all 0.2s ease;
    min-width: 0;
    min-height: 132px;
}
.audit-engine-tile:hover {
    border-color: rgba(139, 92, 246, 0.2);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.08);
}
.audit-engine-logo {
    display: block;
    flex-shrink: 0;
}
.audit-engine-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    font-family: 'Outfit', sans-serif;
    background: rgba(255, 255, 255, 0.96);
}
.audit-engine-ring {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.audit-engine-ring-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}
.audit-engine-name {
    margin-top: 0.1rem;
    line-height: 1.2;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    min-height: 2rem;
}
.audit-engine-label {
    margin-top: 0.18rem;
    line-height: 1.15;
}

/* Copy success state */
.audit-action-btn.copy-success {
    background: rgba(22, 163, 74, 0.1) !important;
    border-color: rgba(22, 163, 74, 0.3) !important;
    color: #16a34a !important;
}
@keyframes auditActionButtonSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
@keyframes auditActionButtonShimmer {
    from {
        transform: translateX(-130%);
    }
    to {
        transform: translateX(130%);
    }
}

/* Cooldown text */
.audit-action-btn-cooldown {
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.15);
    line-height: 1;
    letter-spacing: 0.02em;
}
.report-download-button .download-button-label {
    display: none;
}
.report-download-button.is-loading .download-button-label {
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #7c3aed;
}
.report-download-status {
    display: none;
    align-items: center;
    min-width: 15rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 243, 255, 0.96));
    box-shadow: 0 14px 36px rgba(99, 102, 241, 0.08);
    position: relative;
    overflow: hidden;
}
.report-download-status::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: translateX(-100%);
    animation: reportDownloadShimmer 1.6s linear infinite;
}
.report-download-status.is-visible {
    display: flex;
}
.report-download-spinner {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 9999px;
    border: 3px solid rgba(139, 92, 246, 0.14);
    border-top-color: #8b5cf6;
    border-right-color: #0ea5e9;
    animation: reportDownloadSpin 1s linear infinite;
    flex-shrink: 0;
    margin-right: 0.9rem;
    position: relative;
}
.report-download-spinner::before,
.report-download-spinner::after {
    content: '';
    position: absolute;
    border-radius: 9999px;
    background: #8b5cf6;
    opacity: 0.6;
    animation: reportDownloadPulse 1.5s ease-in-out infinite;
}
.report-download-spinner::before {
    width: 0.38rem;
    height: 0.38rem;
    top: 0.2rem;
    right: 0.2rem;
}
.report-download-spinner::after {
    width: 0.32rem;
    height: 0.32rem;
    bottom: 0.28rem;
    left: 0.28rem;
    animation-delay: 0.25s;
}
.report-download-status-copy {
    position: relative;
    z-index: 1;
}
.report-download-status-title {
    font-size: 0.86rem;
    font-weight: 800;
    color: #312e81;
    line-height: 1.2;
}
.report-download-status-text {
    margin-top: 0.18rem;
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.4;
}
@keyframes reportDownloadSpin {
    to { transform: rotate(360deg); }
}
@keyframes reportDownloadPulse {
    0%, 100% { transform: scale(0.85); opacity: 0.45; }
    50% { transform: scale(1.2); opacity: 0.9; }
}
@keyframes reportDownloadShimmer {
    to { transform: translateX(100%); }
}
.pdf-export-header {
    display: none;
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 1.5rem;
    background: #ffffff;
    box-shadow: 0 16px 48px rgba(139, 92, 246, 0.05);
    overflow: hidden;
}
.pdf-export-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}
.pdf-export-header-accent {
    height: 0.3rem;
    margin: -1rem -1rem 1rem -1rem;
    background: linear-gradient(90deg, #0ea5e9 0%, #6366f1 45%, #ec4899 100%);
}
.pdf-export-header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.pdf-export-header-logo {
    max-height: 3rem;
    width: auto;
    display: block;
}
.pdf-export-report-title {
    font-size: 0.95rem;
    letter-spacing: 0.16rem;
    font-weight: 800;
    color: #475569 !important;
    text-transform: uppercase;
}
.pdf-export-meta {
    text-align: right;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: nowrap;
}
.pdf-export-meta-label {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.12rem;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.1rem;
}
.pdf-export-meta-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
}
/* ========================================
   PDF: Continuous document flow
   One flowing document, no manual page wrappers
   ======================================== */
.is-exporting-pdf #pdf-root {
    width: 794px;
    overflow: visible !important;
}
.is-exporting-pdf #report-download-content,
.is-exporting-pdf .pdf-mode-shell,
.is-exporting-pdf .pdf-mode-section,
.is-exporting-pdf .pdf-mode-section-break,
.is-exporting-pdf .audit-section-card,
.is-exporting-pdf .card,
.is-exporting-pdf .card-body,
.is-exporting-pdf .card-footer {
    min-height: 0 !important;
    height: auto !important;
    break-before: auto !important;
    page-break-before: auto !important;
    break-after: auto !important;
    page-break-after: auto !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
    overflow: visible !important;
}
.is-exporting-pdf .pdf-mode-section,
.is-exporting-pdf .pdf-mode-section-break {
    margin: 0 0 0.75rem 0 !important;
}
.is-exporting-pdf .audit-section-card .card-header,
.is-exporting-pdf .audit-section-card .card-header .row,
.is-exporting-pdf .audit-section-card .card-header .col,
.is-exporting-pdf .audit-section-card .card-header .col-auto,
.is-exporting-pdf .audit-section-card .card-header + .card-body,
.is-exporting-pdf .audit-section-card .card-header + .card-footer,
.is-exporting-pdf .audit-section-card .card-header + div {
    break-before: auto !important;
    page-break-before: auto !important;
    break-after: auto !important;
    page-break-after: auto !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
}

/* Keep only small cards/rows together */
.is-exporting-pdf .pdf-audit-block,
.is-exporting-pdf .audit-row,
.is-exporting-pdf .issue-card,
.is-exporting-pdf .learn-box,
.is-exporting-pdf .audit-metric,
.is-exporting-pdf .metric-card,
.is-exporting-pdf .card-body.pt-0,
.is-exporting-pdf .card-body.pt-0 .alert.alert-secondary,
.is-exporting-pdf .collapse .card-body.pt-0,
.is-exporting-pdf .collapse > .card-body.pt-0 > .alert.alert-secondary {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
}
.is-exporting-pdf .pdf-audit-block {
    break-before: auto !important;
    page-break-before: auto !important;
    break-after: auto !important;
    page-break-after: auto !important;
}

/* Long content blocks must flow naturally */
.is-exporting-pdf .border-top,
.is-exporting-pdf .collapse,
.is-exporting-pdf .list-group,
.is-exporting-pdf .table-responsive,
.is-exporting-pdf .resource-box,
.is-exporting-pdf .code-box,
.is-exporting-pdf .technical-list,
.is-exporting-pdf .resource-list,
.is-exporting-pdf .code-list,
.is-exporting-pdf ol,
.is-exporting-pdf ul,
.is-exporting-pdf pre {
    break-inside: auto !important;
    page-break-inside: auto !important;
}
.is-exporting-pdf .resource-box,
.is-exporting-pdf .code-box,
.is-exporting-pdf .technical-list,
.is-exporting-pdf .resource-list,
.is-exporting-pdf .code-list,
.is-exporting-pdf ol,
.is-exporting-pdf ul {
    line-height: 1.28 !important;
    margin-bottom: 0.2rem !important;
}
.is-exporting-pdf pre,
.is-exporting-pdf code {
    line-height: 1.22 !important;
}

.is-exporting-pdf .pdf-mode-section .card-footer .position-relative.text-secondary,
.pdf-mode-section .card-footer .position-relative.text-secondary {
    width: 2.5rem !important;
    height: 2.5rem !important;
    min-width: 2.5rem !important;
    min-height: 2.5rem !important;
    color: #475569 !important;
}
.is-exporting-pdf .pdf-mode-section .card-footer .position-relative.text-secondary > .position-absolute,
.pdf-mode-section .card-footer .position-relative.text-secondary > .position-absolute {
    background: #eef2f7 !important;
    opacity: 1 !important;
    border: 1px solid #d7e3f1;
    border-radius: 0.85rem !important;
}
.is-exporting-pdf .pdf-mode-section .card-footer .position-relative.text-secondary svg,
.pdf-mode-section .card-footer .position-relative.text-secondary svg {
    position: relative;
    z-index: 1;
    width: 1rem !important;
    height: 1rem !important;
    display: block;
    color: #475569 !important;
    fill: currentColor !important;
}
.pdf-mode-shell {
    padding: 0 !important;
    padding-bottom: 0 !important;
    background: #ffffff !important;
    overflow: visible !important;
}
/* Remove excessive container padding in PDF mode */
.is-exporting-pdf .user-panel-container {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}
.is-exporting-pdf .user-panel-page {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}
.pdf-mode-header {
    padding-top: 0.8rem !important;
    padding-bottom: 0.8rem !important;
    margin-bottom: 0.8rem !important;
    border: 1px solid #d7e3f1;
    border-radius: 1.35rem;
    box-shadow: none;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}
.pdf-mode-header .pdf-export-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
}
.pdf-mode-header .pdf-export-header-brand {
    justify-self: start;
}
.pdf-mode-header .pdf-export-meta {
    justify-self: end;
}
.pdf-mode-header .pdf-export-title-center {
    text-align: center;
}
.pdf-mode-header .pdf-export-title-center .pdf-export-report-title {
    font-size: 1.05rem;
    margin: 0;
    padding-top: 0;
}
.pdf-mode-header .pdf-export-header-brand .pdf-export-report-title {
    display: none;
}
.pdf-mode-hero {
    padding: 1rem 1.2rem !important;
    margin-bottom: 0.5rem !important;
    border: 1px solid #d7e3f1;
    border-radius: 1.55rem;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
    box-shadow: none;
}
/* Right score panel */
.pdf-mode-hero .audit-soft-card {
    padding: 1.05rem 1.2rem !important;
}
.pdf-mode-hero .audit-score-ring {
    width: 7.6rem;
    height: 7.6rem;
}
/* Wider right column in PDF mode */
.is-exporting-pdf .pdf-mode-hero .row > .col-xl-7 {
    flex: 0 0 54%;
    max-width: 54%;
}
.is-exporting-pdf .pdf-mode-hero .row > .col-xl-5 {
    flex: 0 0 42%;
    max-width: 42%;
}
/* Reduce row gap between cover columns */
.is-exporting-pdf .pdf-mode-hero .row {
    margin-left: -8px;
    margin-right: -8px;
}
.is-exporting-pdf .pdf-mode-hero .row > [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
}
/* Right panel: reduce paragraph font, increase AI label spacing */
.pdf-mode-hero .audit-soft-card .small {
    font-size: 0.74rem !important;
    line-height: 1.38 !important;
}
.pdf-mode-hero .audit-soft-card .text-uppercase {
    margin-top: 0.6rem !important;
    letter-spacing: 0.1rem;
}
.pdf-mode-hero .audit-soft-card .font-weight-bold {
    margin-top: 0.2rem !important;
}
.pdf-cover-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 9999px;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.1) 0%, rgba(139, 92, 246, 0.12) 100%);
    border: 1px solid rgba(99, 102, 241, 0.14);
    color: #475569;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12rem;
    text-transform: uppercase;
}
.pdf-cover-kicker-dot {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 9999px;
    background: linear-gradient(180deg, #0ea5e9 0%, #8b5cf6 100%);
}
.pdf-cover-title {
    font-size: 2.2rem;
    line-height: 1.15;
    letter-spacing: -0.06em;
    margin-bottom: 0.6rem;
    color: #0f172a;
}
.pdf-cover-summary {
    max-width: 42rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #475569 !important;
    margin-bottom: 0.85rem !important;
}
.pdf-cover-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 0.8rem;
}
.pdf-cover-meta-card {
    padding: 12px 10px;
    border-radius: 0.85rem;
    border: 1px solid #d7e3f1;
    background: rgba(255, 255, 255, 0.92);
    min-height: auto;
}
.pdf-cover-meta-label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    color: #94a3b8;
    line-height: 1.2;
}
.pdf-cover-meta-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.1;
    word-break: break-word;
}
.pdf-mode-section .card,
.pdf-mode-section .audit-section-card,
.pdf-mode-section .audit-soft-card,
.pdf-mode-section .audit-metric {
    box-shadow: none !important;
    border-color: #d7e3f1 !important;
    background: #ffffff !important;
}
.pdf-mode-hero .audit-metric {
    border-radius: 1rem !important;
    background: rgba(255, 255, 255, 0.96) !important;
    padding: 12px 10px !important;
}
.pdf-mode-hero .audit-metric .small {
    font-size: 9px !important;
    line-height: 1.2 !important;
}
.pdf-mode-hero .audit-metric .h3 {
    font-size: 18px !important;
    line-height: 1.1 !important;
}
.pdf-mode-hero .audit-metric .text-muted {
    font-size: 9px !important;
    line-height: 1.25 !important;
}
.pdf-mode-hero .audit-metric-badge {
    width: 22px !important;
    height: 22px !important;
    border-radius: 6px !important;
}
.pdf-mode-hero .audit-metric-badge svg {
    width: 10px !important;
    height: 10px !important;
}
.pdf-mode-section .audit-section-pill,
.pdf-mode-hero .audit-section-pill {
    background: #f5ecff !important;
    border-color: #e4d2ff !important;
    color: #7c3aed !important;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.pdf-mode-hero .audit-url {
    border-color: #d7e3f1 !important;
    background: rgba(255, 255, 255, 0.96) !important;
}
.pdf-mode-section .text-muted,
.pdf-mode-hero .text-muted,
.pdf-export-meta {
    color: #64748b !important;
}
.pdf-mode-hero .h2,
.pdf-mode-hero h1,
.pdf-mode-section .h4 {
    color: #0f172a !important;
    letter-spacing: -0.02em;
}
.pdf-mode-hero a,
.pdf-mode-section a {
    color: #0f766e !important;
}
.pdf-mode-section .card-header .font-weight-bold.h4 {
    position: relative;
    padding-left: 1rem;
}
.pdf-mode-section .card-header .font-weight-bold.h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.15rem;
    bottom: 0.15rem;
    width: 0.22rem;
    border-radius: 9999px;
    background: linear-gradient(180deg, #0ea5e9 0%, #8b5cf6 100%);
}
.pdf-mode-hero .display-4 {
    font-size: 3.15rem !important;
    letter-spacing: -0.05em;
}
.pdf-mode-hero .h3 {
    font-size: 2rem !important;
    letter-spacing: -0.03em;
}
.pdf-mode-hero .audit-score-ring {
    width: 9rem;
    height: 9rem;
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.06);
    /* Fallback for html2canvas — conic-gradient may not render */
    background: #e2e8f0 !important;
    border: 4px solid var(--audit-score-color, #8b5cf6);
}
.pdf-mode-hero .audit-score-core {
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

/* PDF fallback: ensure SVG icons render */
.is-exporting-pdf svg {
    display: inline-block !important;
    visibility: visible !important;
}
/* PDF fallback: metric badges */
.is-exporting-pdf .audit-metric-badge {
    background: rgba(139, 92, 246, 0.08) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}
.is-exporting-pdf .badge-pass {
    background: rgba(22, 163, 74, 0.12) !important;
}
.is-exporting-pdf .badge-fail {
    background: rgba(220, 38, 38, 0.12) !important;
}
.is-exporting-pdf .badge-warn {
    background: rgba(245, 158, 11, 0.12) !important;
}
.is-exporting-pdf .badge-info {
    background: rgba(59, 130, 246, 0.12) !important;
}
.is-exporting-pdf .badge-neutral {
    background: rgba(148, 163, 184, 0.12) !important;
}
/* PDF fallback: engine tiles */
.is-exporting-pdf .audit-engine-tile {
    background: #ffffff !important;
    border: 1px solid #d7e3f1 !important;
    border-radius: 0.95rem !important;
    box-shadow: none !important;
    outline: none !important;
    overflow: hidden !important;
}
.is-exporting-pdf .audit-engine-ring svg {
    display: block !important;
}
/* PDF fallback: ensure all backgrounds render */
.is-exporting-pdf .audit-metric,
.is-exporting-pdf .audit-soft-card {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}
/* PDF: metric grid tiles */
.is-exporting-pdf .audit-metric-grid .audit-metric {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
}
/* PDF: section pills */
.is-exporting-pdf .audit-section-pill {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
}
/* PDF: score explanation and engine tiles */
.is-exporting-pdf .audit-score-explain,
.is-exporting-pdf .audit-engine-tile {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}
.is-exporting-pdf .audit-score-explain {
    border-radius: 1rem !important;
    box-shadow: none !important;
    max-width: none !important;
    width: 100% !important;
    padding: 0.85rem 0.9rem !important;
}
.is-exporting-pdf .pdf-mode-hero .audit-soft-card {
    max-width: 100% !important;
    margin-left: auto;
}
.is-exporting-pdf .pdf-mode-hero .audit-soft-card > .d-flex.align-items-start.justify-content-center.mb-4 {
    gap: 1.45rem !important;
    margin-bottom: 1rem !important;
}
.is-exporting-pdf .pdf-mode-hero .audit-score-explain .small {
    font-size: 0.72rem !important;
    line-height: 1.45 !important;
}
.is-exporting-pdf .audit-engine-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(88px, 1fr));
    gap: 12px !important;
    align-items: stretch !important;
}
.is-exporting-pdf .audit-engine-grid .audit-engine-tile {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 92px !important;
    min-height: 132px !important;
    padding: 0.85rem 0.5rem !important;
    border: 1px solid #d7e3f1 !important;
    border-radius: 1rem !important;
    background: #ffffff !important;
    overflow: hidden !important;
}
.is-exporting-pdf .audit-engine-grid .audit-engine-ring {
    width: 50px !important;
    height: 50px !important;
    margin-bottom: 0.45rem !important;
}
.is-exporting-pdf .audit-engine-grid .audit-engine-ring svg {
    width: 50px !important;
    height: 50px !important;
}
.is-exporting-pdf .audit-engine-grid .audit-engine-ring-value {
    font-size: 0.86rem !important;
    font-weight: 800 !important;
}
.is-exporting-pdf .audit-engine-grid .audit-engine-logo-fallback {
    width: 18px !important;
    height: 18px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    background: #ffffff !important;
    border: 1px solid currentColor !important;
}
.is-exporting-pdf .audit-engine-grid .audit-engine-name {
    margin-top: 0.12rem !important;
    font-size: 7.8px !important;
    line-height: 1.12 !important;
    min-height: 1.75rem !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    font-kerning: none !important;
    font-variant-ligatures: none !important;
    text-rendering: geometricPrecision !important;
}
.is-exporting-pdf .audit-engine-grid .audit-engine-name-pdf {
    white-space: nowrap !important;
}
.is-exporting-pdf .audit-engine-grid .audit-engine-name-pdf span {
    display: inline-block !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
}
.is-exporting-pdf .audit-engine-grid .audit-engine-label {
    margin-top: 0.14rem !important;
    font-size: 0.74rem !important;
    line-height: 1.1 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    letter-spacing: 0 !important;
    font-kerning: none !important;
    font-variant-ligatures: none !important;
}
.pdf-export-header-brand {
    position: relative;
}
.pdf-export-header-brand::before {
    content: '';
    position: absolute;
    left: -0.9rem;
    top: 0.15rem;
    bottom: 0.15rem;
    width: 0.2rem;
    border-radius: 9999px;
    background: linear-gradient(180deg, #0ea5e9 0%, #8b5cf6 100%);
}
.pdf-export-report-title {
    position: relative;
    padding-top: 0.1rem;
}
/* PDF root container — full width on live page, fixed for PDF rendering */
#pdf-root {
    width: 100%;
    margin: 0 auto;
    position: relative;
    background: transparent;
}
.is-exporting-pdf #pdf-root {
    width: 794px;
    overflow: visible !important;
}
/* Body reset for PDF rendering */
.is-exporting-pdf,
.is-exporting-pdf html,
.is-exporting-pdf body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
/* Clone positioning */
.pdf-export-clone {
    position: absolute;
    left: -10000px;
    top: 0;
    width: 794px;
    background: #ffffff;
    z-index: -1;
}
.is-exporting-pdf .pdf-export-header {
    display: block;
}
.is-exporting-pdf .pdf-export-page-heading {
    display: none !important;
}
.is-exporting-pdf .pdf-export-hide {
    display: none !important;
}
.is-exporting-pdf .pdf-export-hide-nav {
    display: none !important;
}
@media (max-width: 991.98px) {
    .audit-shell {
        padding: 0 !important;
    }
    .audit-hero {
        border-radius: 1.5rem;
        padding: 1.35rem !important;
        margin-bottom: 1rem !important;
    }
    .audit-nav {
        margin: 0;
        border-radius: 1.25rem;
        padding: 0.4rem 0.5rem;
    }
    .audit-nav .navbar-collapse {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }
    .audit-nav .navbar-nav {
        gap: 0.35rem;
    }
    .audit-nav .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0.85rem 1rem !important;
    }
    .audit-section-card {
        border-radius: 1.3rem;
    }
    .audit-section-card .card-header,
    .audit-section-card .card-body,
    .audit-section-card .card-footer {
        padding-left: 1.2rem !important;
        padding-right: 1.2rem !important;
    }
    .report-download-status {
        min-width: 0;
        width: 100%;
    }
    .pdf-cover-meta-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .audit-hero {
        padding: 1.05rem !important;
        border-radius: 1.2rem;
    }
    .audit-soft-card,
    .audit-section-card {
        border-radius: 1.1rem;
    }
    .audit-nav {
        border-radius: 1rem;
    }
    .audit-nav .navbar-toggler {
        min-height: 2.7rem;
        min-width: 2.7rem;
        border-radius: 0.9rem;
        background: rgba(248, 250, 252, 0.92);
    }
    .audit-nav .nav-link {
        white-space: normal;
        line-height: 1.35;
        align-items: flex-start !important;
    }
    .audit-nav .nav-link .badge {
        margin-top: 0.2rem;
    }
    .audit-section-card .card-header,
    .audit-section-card .card-body,
    .audit-section-card .card-footer {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .report-download-status {
        padding: 0.8rem 0.9rem;
    }
    .report-download-spinner {
        width: 2.1rem;
        height: 2.1rem;
        margin-right: 0.75rem;
    }
    .audit-section-card .width-12 {
        width: auto !important;
    }
    .audit-section-card .progress {
        margin-top: 0.2rem;
    }
    .audit-section-card img.image-rendering-optimize-contrast {
        max-width: 100%;
        height: auto;
    }
}

/* Accessibility: keep small report badges and inline links at >= 4.5:1. */
#report-download-content .badge-info {
    color: #1e40af;
    background-color: #dbeafe;
}
#report-download-content .badge-success {
    color: #14532d;
    background-color: #d1fae5;
}
#report-download-content .badge-danger {
    color: #7f1d1d;
    background-color: #fee2e2;
}
#report-download-content .badge-warning {
    color: #664d03;
    background-color: #fff3cd;
}
#report-download-content .audit-section-card a:not(.btn):not(.audit-action-btn):not(.badge) {
    color: #0369a1;
}
#report-download-content .audit-section-card a:not(.btn):not(.audit-action-btn):not(.badge):hover {
    color: #075985;
}
#report-download-content .text-success {
    color: #166534 !important;
}
#report-download-content .text-warning {
    color: #92400e !important;
}
#report-download-content .text-danger {
    color: #991b1b !important;
}
#report-download-content .badge-light {
    color: #334155 !important;
    background-color: #e2e8f0 !important;
}
#report-download-content code {
    color: #9d174d !important;
}
#report-download-content span.badge[style*="#16a34a"] {
    background-color: #166534 !important;
}

/* -------------------------------------------------------------------------
   SERP Snippet Preview (rendered in the report Overview)
   Mimics a Google organic result so the audited title/description/URL can be
   judged the way a searcher sees them. The desktop/mobile toggle is optional
   and only changes how the preview is drawn, never the report data.
   ------------------------------------------------------------------------- */
.serp-preview {
    width: 100%;
    max-width: 100%;
    text-align: left;
}
.serp-preview__label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6d28d9;
}
.serp-preview__toggle {
    display: inline-flex;
    padding: 2px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 9999px;
    background: #f5f3ff;
}
.serp-preview__device {
    border: 0;
    background: transparent;
    color: #6b7280;
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    padding: 4px 10px;
    border-radius: 9999px;
    cursor: pointer;
}
.serp-preview__device.is-active {
    background: #ffffff;
    color: #6d28d9;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}
.serp-preview__window {
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.serp-preview__result {
    max-width: 640px;
}
.serp-preview__source {
    display: flex;
    align-items: center;
    gap: 10px;
}
.serp-preview__favicon {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    object-fit: cover;
    background: #ffffff;
}
.serp-preview__favicon--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    font-size: 0.75rem;
    font-weight: 700;
}
.serp-preview__source-text {
    min-width: 0;
}
.serp-preview__site {
    color: #202124;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
}
.serp-preview__crumbs {
    color: #4d5156;
    font-size: 0.75rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.serp-preview__title {
    margin-top: 8px;
    font-size: 1.125rem;
    line-height: 1.35;
}
.serp-preview__title a {
    color: #1a0dab !important;
    text-decoration: none;
}
.serp-preview__title a:hover,
.serp-preview__title a:focus {
    color: #1a0dab !important;
    text-decoration: underline;
}
.serp-preview__desc {
    margin-top: 4px;
    color: #4d5156;
    font-size: 0.8125rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.serp-preview__note {
    margin-top: 8px;
    color: #94a3b8;
    font-size: 0.7rem;
    line-height: 1.4;
}

/* Mobile rendering: narrower, denser, slightly smaller result. */
.serp-preview.is-mobile .serp-preview__window {
    max-width: 360px;
    padding: 12px 14px;
}
.serp-preview.is-mobile .serp-preview__title {
    font-size: 1rem;
}
.serp-preview.is-mobile .serp-preview__desc {
    font-size: 0.78rem;
}
.is-exporting-pdf .serp-preview__toggle,
.serp-preview__toggle.d-print-none {
    display: none !important;
}
