/* ==========================================================================
   AUDIT TOOL STYLES
   Loading screen, teaser results, lead capture gate, full report.
   ========================================================================== */

/* -------------------------------------------------------------------------
   General — accent bar, page background
   ---------------------------------------------------------------------- */

.audit-accent-bar {
    height: 3px;
    background: var(--color-orange, #F28A2E);
    width: 100%;
}

/* -------------------------------------------------------------------------
   Entry Form (no params — standalone audit start page)
   ---------------------------------------------------------------------- */

.audit-entry {
    background: var(--color-navy, #0C1220);
    color: #fff;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(72px + var(--space-3xl, 3rem)) 0 var(--space-3xl, 3rem);
}

.audit-entry__inner {
    max-width: 540px;
    margin: 0 auto;
    text-align: center;
}

.audit-entry__title {
    font-family: var(--font-heading, 'Sora', sans-serif);
    font-size: var(--text-3xl, 2.25rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: var(--space-sm, 0.75rem);
    line-height: 1.2;
}

.audit-entry__subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: var(--text-md, 1.0625rem);
    line-height: 1.7;
    margin-bottom: var(--space-xl, 2rem);
}

.audit-entry__fields {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, 0.75rem);
    text-align: left;
    margin-bottom: var(--space-md, 1rem);
}

.audit-entry__form .form-label {
    color: rgba(255, 255, 255, 0.8);
}

.audit-entry__form .form-input {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.audit-entry__form .form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.audit-entry__form .form-input:focus {
    border-color: var(--color-orange, #F28A2E);
    background: rgba(255, 255, 255, 0.1);
}

.audit-entry__trust {
    font-size: var(--text-xs, 0.75rem);
    color: rgba(255, 255, 255, 0.5);
    margin-top: var(--space-sm, 0.75rem);
}

/* -------------------------------------------------------------------------
   Loading Screen
   ---------------------------------------------------------------------- */

.audit-loading {
    background: var(--color-navy, #0C1220);
    color: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 0;
    transition: opacity 0.5s ease;
}
.audit-loading--complete {
    opacity: 0;
    pointer-events: none;
}
.audit-loading--complete .audit-radar__sweep {
    animation-play-state: paused;
}

.audit-loading__container {
    max-width: 520px;
}

/* --- Radar scan animation --- */
.audit-radar {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    position: relative;
}

.audit-radar__ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(242, 138, 46, 0.2);
    position: absolute;
    top: 0;
    left: 0;
}

.audit-radar__ring::before,
.audit-radar__ring::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(242, 138, 46, 0.1);
}

.audit-radar__ring::before {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
}

.audit-radar__ring::after {
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
}

.audit-radar__sweep {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(242, 138, 46, 0.35) 30deg,
        rgba(242, 138, 46, 0.08) 60deg,
        transparent 90deg
    );
    animation: audit-radar-sweep 2.5s linear infinite;
}

/* Pulsing dot at center */
.audit-radar__sweep::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--color-orange, #F28A2E);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(242, 138, 46, 0.6);
}

@keyframes audit-radar-sweep {
    100% { transform: rotate(360deg); }
}

.audit-loading__title {
    font-family: var(--font-heading, 'Sora', sans-serif);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.audit-loading__business {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

/* --- Steps --- */
.audit-steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
    margin-bottom: 2rem;
}

.audit-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    transition: color 0.3s ease, box-shadow 0.3s ease;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    /* Staggered entrance: start hidden, JS triggers .audit-step--visible */
    opacity: 0;
    transform: translateX(-16px);
}

.audit-step--visible {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.5s ease, transform 0.5s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.audit-step__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    position: relative;
}

.audit-step__spinner,
.audit-step__check {
    position: absolute;
    top: 2px;
    left: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Pending — dim, no spinner visible */
.audit-step .audit-step__spinner {
    opacity: 0.2;
}

/* Processing — orange spin + pulsing glow */
.audit-step--active {
    color: var(--color-orange, #F28A2E);
    position: relative;
    animation: audit-step-glow 2s ease-in-out infinite;
}

.audit-step--active::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242, 138, 46, 0.25) 0%, transparent 70%);
    animation: audit-glow 2s ease-in-out infinite;
    pointer-events: none;
}

.audit-step--active .audit-step__spinner {
    opacity: 1;
    stroke: var(--color-orange, #F28A2E);
    animation: audit-spin 1s linear infinite;
}

/* Complete — green check with entrance */
.audit-step--complete {
    color: #22c55e;
}

.audit-step--complete .audit-step__spinner {
    opacity: 0;
}

.audit-step--complete .audit-step__check {
    opacity: 1;
    stroke: #22c55e;
    animation: audit-check-pop 0.3s ease-out;
}

.audit-step__label {
    font-size: 0.95rem;
    font-weight: 500;
}

@keyframes audit-spin {
    100% { transform: rotate(360deg); }
}

@keyframes audit-glow {
    0%, 100% { opacity: 0.4; transform: translateY(-50%) scale(0.9); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.1); }
}

@keyframes audit-step-glow {
    0%, 100% { box-shadow: 0 0 12px rgba(242, 138, 46, 0); }
    50% { box-shadow: 0 0 20px rgba(242, 138, 46, 0.15); }
}

@keyframes audit-check-pop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

/* --- Progress bar with shimmer --- */
.audit-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.audit-progress__bar {
    height: 100%;
    width: 0;
    background: var(--color-orange, #F28A2E);
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.audit-progress__bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: audit-shimmer 1.8s ease-in-out infinite;
}

@keyframes audit-shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* Status message */
.audit-loading__status {
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    min-height: 1.4em;
    transition: opacity 0.3s ease;
}

.audit-loading__noscript {
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.7);
}

.audit-loading__noscript a {
    color: var(--color-orange, #F28A2E);
}

/* -------------------------------------------------------------------------
   Teaser Results
   ---------------------------------------------------------------------- */

.audit-teaser {
    padding: 4rem 0 2rem;
    text-align: center;
    background: #FAFAF8;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.audit-teaser--visible {
    opacity: 1;
}

/* Score Circle */
.audit-score {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

/* Grade-based outer glow */
.audit-score--poor   { filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.2)); }
.audit-score--fair   { filter: drop-shadow(0 0 20px rgba(242, 138, 46, 0.2)); }
.audit-score--good   { filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.25)); }
.audit-score--excellent { filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.3)); }

.audit-score__outer {
    stroke: #e5e7eb;
    opacity: 0.2;
}

.audit-score__track {
    stroke: #e5e7eb;
}

.audit-score__fill {
    stroke: var(--color-orange, #F28A2E);
    transition: stroke-dashoffset 1.5s ease-out, stroke 0.3s ease;
}

.audit-score__value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.audit-score__number {
    font-family: var(--font-heading, 'Sora', sans-serif);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--color-navy, #0C1220);
}

.audit-score__max {
    display: block;
    font-size: 1rem;
    color: var(--color-secondary-text, #666);
}

/* Grade */
.audit-grade {
    font-family: var(--font-heading, 'Sora', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.audit-grade--poor { color: #ef4444; }
.audit-grade--fair { color: var(--color-orange, #F28A2E); }
.audit-grade--good { color: #22c55e; }
.audit-grade--excellent { color: #22c55e; }

/* Summary */
.audit-summary {
    max-width: 600px;
    margin: 0 auto 2.5rem;
    color: var(--color-secondary-text, #666);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Divider */
.audit-divider {
    border: none;
    height: 2px;
    max-width: 560px;
    margin: 0 auto 2rem;
    background: linear-gradient(90deg, transparent, var(--color-orange, #F28A2E), transparent);
    opacity: 0.3;
}

/* Category Breakdown */
.audit-categories {
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.audit-category {
    display: grid;
    grid-template-columns: 180px 1fr auto auto;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.audit-category--visible {
    opacity: 1;
    transform: translateY(0);
}

.audit-category__name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-navy, #0C1220);
}

.audit-category__bar-track {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.audit-category__bar-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    background: var(--color-orange, #F28A2E);
    transition: width 1s ease-out;
}

/* Gradient fills per grade — set via JS inline style */

.audit-category__score {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-secondary-text, #666);
    min-width: 40px;
    text-align: right;
}

.audit-category__badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 3px 10px;
    border-radius: 999px;
    min-width: 56px;
    text-align: center;
}

.audit-category__badge--poor { background: rgba(239, 68, 68, 0.15); color: #EF4444; }
.audit-category__badge--fair { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
.audit-category__badge--good { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.audit-category__badge--excellent { background: rgba(16, 185, 129, 0.15); color: #10B981; }

/* -------------------------------------------------------------------------
   Lead Capture Gate
   ---------------------------------------------------------------------- */

.audit-gate {
    position: relative;
    padding: 0 0 4rem;
    background: #FAFAF8;
}

.audit-gate__blurred {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
    padding: 2rem 0;
    transition: filter 0.6s ease;
}

.audit-gate__blurred.audit-gate__blurred--revealed {
    filter: none;
    pointer-events: auto;
    user-select: auto;
}

.audit-report-preview {
    max-width: 600px;
    margin: 0 auto;
}

.audit-report-preview__section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.audit-report-preview__section:last-child {
    border-bottom: none;
}

.audit-report-preview h3 {
    font-family: var(--font-heading, 'Sora', sans-serif);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--color-navy, #0C1220);
}

.audit-report-preview p {
    color: var(--color-secondary-text, #666);
    line-height: 1.6;
    font-size: 0.9rem;
}

.audit-report-preview__placeholder p {
    padding: 0.25rem 0;
}

.audit-gate__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2rem;
    z-index: 10;
    transition: opacity 0.4s ease;
}

.audit-gate__overlay--hidden {
    opacity: 0;
    pointer-events: none;
}

.audit-gate__card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 2.25rem 2rem;
    max-width: 440px;
    width: 100%;
    margin: 0 1rem;
    animation: audit-gate-entrance 0.6s ease-out both;
}

@keyframes audit-gate-entrance {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.audit-gate__title {
    font-family: var(--font-heading, 'Sora', sans-serif);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-navy, #0C1220);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.audit-gate__lock {
    color: var(--color-orange, #F28A2E);
    flex-shrink: 0;
}

.audit-gate__desc {
    color: var(--color-secondary-text, #666);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

/* Gate form fields */
.audit-gate__form .form-group {
    margin-bottom: 1.1rem;
}

.audit-gate__form .form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-navy, #0C1220);
    margin-bottom: 0.4rem;
}

.audit-gate__form .form-input {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.audit-gate__form .form-input:focus {
    background: #fff;
    border-color: var(--color-orange, #F28A2E);
    box-shadow: 0 0 0 3px rgba(242, 138, 46, 0.12);
}

.audit-gate__trust {
    text-align: center;
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 1rem;
    letter-spacing: 0.01em;
}

/* Step transitions */
.audit-gate__step--hidden {
    display: none;
}

/* ----- Verification step (State 2) ----- */
.audit-gate__verify-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.audit-gate__verify-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFF7ED 0%, #FEF3C7 100%);
    margin: 0 auto 1rem;
}

.audit-gate__verify-icon svg {
    color: var(--color-orange, #F28A2E);
}

.audit-gate__verify-title {
    font-family: var(--font-heading, 'Sora', sans-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-navy, #0C1220);
    margin-bottom: 0.5rem;
}

.audit-gate__verify-msg {
    color: var(--color-secondary-text, #666);
    font-size: 0.9rem;
    line-height: 1.5;
}

.audit-gate__verify-msg strong {
    color: var(--color-navy, #0C1220);
    font-weight: 600;
}

/* Verification code input — large centered digits */
.audit-gate__form .form-input--code {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5em;
    padding: 0.9rem 1rem;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    color: var(--color-navy, #0C1220);
}

.audit-gate__form .form-input--code::placeholder {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    font-family: var(--font-body, 'Inter', sans-serif);
}

/* Verify error */
.audit-gate__error {
    background: #FEF2F2;
    color: #DC2626;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 1rem;
    border: 1px solid #FECACA;
}

.audit-gate__error[hidden] {
    display: none;
}

/* Verify links */
.audit-gate__links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f3f4f6;
}

.audit-gate__links a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-orange, #F28A2E);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.audit-gate__links a:hover {
    background: #FFF7ED;
    text-decoration: none;
}

.audit-gate__sep {
    color: #d1d5db;
    font-size: 0.7rem;
}

/* Inline field errors */
.gate-field-error {
    display: block;
    color: #EF4444;
    font-size: 0.8rem;
    margin-top: 0.35rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, max-height 0.25s ease;
}

.gate-field-error[hidden] {
    display: none;
}

.gate-field-error--visible {
    opacity: 1;
    max-height: 2rem;
}

.form-input--error {
    border-color: #EF4444 !important;
}

/* General form error (server-side) */
.gate-form-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #EF4444;
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    text-align: center;
}

.gate-form-error[hidden] {
    display: none;
}

/* Login mode link */
.audit-gate__login-link {
    display: block;
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--color-orange, #F28A2E);
    text-decoration: none;
    cursor: pointer;
}

.audit-gate__login-link:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------------------------
   Summary Band
   ---------------------------------------------------------------------- */

.audit-summary-band {
    background: #0F1923;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 1.5rem 1rem;
    margin-top: 2rem;
}

.audit-summary-band__inner {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    max-width: 720px;
    margin: 0 auto;
}

.audit-summary-band__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
}

.audit-summary-band__name {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.audit-summary-band__score {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.audit-summary-band__badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 10px;
    border-radius: 999px;
}

.audit-summary-band__badge--excellent { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.audit-summary-band__badge--good { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.audit-summary-band__badge--fair { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
.audit-summary-band__badge--poor { background: rgba(239, 68, 68, 0.15); color: #EF4444; }

/* -------------------------------------------------------------------------
   Full Report
   ---------------------------------------------------------------------- */

.audit-report {
    padding: 3rem 0 0;
    background: #FAFAF8;
}

/* Section cards */
.audit-report__section {
    max-width: 680px;
    margin: 0 auto 1.5rem;
}

.report-card {
    background: #F8F8F6;
    border-radius: 8px;
    padding: 1.5rem 2rem;
    border-left: 4px solid transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.report-card--ai { border-left-color: var(--color-orange, #F28A2E); }
.report-card--gbp { border-left-color: #22c55e; }
.report-card--web { border-left-color: #3b82f6; }
.report-card--competitors { border-left-color: #8b5cf6; }

.report-card__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.report-card__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.report-card--ai .report-card__icon { color: var(--color-orange, #F28A2E); }
.report-card--gbp .report-card__icon { color: #22c55e; }
.report-card--web .report-card__icon { color: #3b82f6; }
.report-card--competitors .report-card__icon { color: #8b5cf6; }

.audit-report__heading {
    font-family: var(--font-heading, 'Sora', sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-navy, #0C1220);
    margin: 0;
}

/* -------------------------------------------------------------------------
   Collapsible AI Panels
   ---------------------------------------------------------------------- */

.ai-summary {
    margin-bottom: 1rem;
}

.ai-summary__line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.ai-summary__label {
    font-weight: 600;
    color: var(--color-navy, #0C1220);
}

.ai-summary__status--found { color: #22c55e; font-weight: 600; }
.ai-summary__status--partial { color: #f97316; font-weight: 600; }
.ai-summary__status--not-found { color: #ef4444; font-weight: 600; }
.ai-summary__status--unavailable { color: #9ca3af; font-weight: 600; }

.ai-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-orange, #F28A2E);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: inherit;
}

.ai-toggle:hover {
    text-decoration: underline;
}

.ai-toggle__arrow {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.ai-toggle__arrow--up {
    transform: rotate(90deg);
}

.ai-panel {
    margin-top: 1.25rem;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.ai-panel--visible {
    max-height: 5000px;
    opacity: 1;
}

/* Chat panels */
.audit-report__chat {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.audit-report__chat--gemini {
    background: #1a2332;
}

.audit-chat__user {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.audit-chat__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.audit-chat__text {
    color: #fff;
    font-size: 0.95rem;
}

.audit-chat__ai {
    display: flex;
    gap: 0.75rem;
}

.audit-chat__avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #22c55e;
}

.audit-chat__avatar--gemini {
    color: #4285f4;
}

.audit-chat__content {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
    flex: 1;
    min-width: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Mention badge */
.audit-report__mention {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 1rem;
}

.audit-report__mention--found { background: #f0fdf4; color: #22c55e; }
.audit-report__mention--partial { background: #fff7ed; color: #f97316; }
.audit-report__mention--not-found { background: #fef2f2; color: #ef4444; }
.audit-report__mention--unavailable { background: #f3f4f6; color: #9ca3af; }

/* Direct name search sub-section */
.audit-report__direct {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.audit-report__direct-heading {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-secondary-text, #666);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
}

/* -------------------------------------------------------------------------
   GBP Section
   ---------------------------------------------------------------------- */

.audit-report__gbp-status {
    margin-bottom: 1.25rem;
    font-size: 1rem;
    font-weight: 600;
}

.gbp-not-found {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.gbp-not-found__title {
    color: #ef4444;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.gbp-not-found__impact {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.audit-report__checklist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.audit-checklist__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

.audit-checklist__icon--yes { color: #22c55e; }
.audit-checklist__icon--no { color: #ef4444; }

.audit-report__gbp-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.audit-gbp-stat {
    text-align: center;
    background: #fff;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    flex: 1;
    min-width: 70px;
}

.audit-gbp-stat__value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-navy, #0C1220);
}

.audit-gbp-stat__label {
    font-size: 0.75rem;
    color: var(--color-secondary-text, #666);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* -------------------------------------------------------------------------
   Web Presence
   ---------------------------------------------------------------------- */

.audit-report__web-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.audit-web-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    padding: 0.4rem 0;
}

.audit-web-item a {
    color: var(--color-orange, #F28A2E);
    text-decoration: none;
    font-size: 0.85rem;
}

.audit-web-item a:hover {
    text-decoration: underline;
}

.audit-web-item__icon--yes { color: #22c55e; font-weight: 700; }
.audit-web-item__icon--no { color: #ef4444; }

/* -------------------------------------------------------------------------
   Competitors
   ---------------------------------------------------------------------- */

.audit-report__competitors-intro {
    color: var(--color-secondary-text, #666);
    margin-bottom: 1rem;
}

.audit-report__competitors-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.audit-competitor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    gap: 0.5rem;
}

.audit-competitor__name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-navy, #0C1220);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-competitor__sources {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.audit-competitor__badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.audit-competitor__badge--chatgpt { background: #f0fdf4; color: #16a34a; }
.audit-competitor__badge--gemini { background: #eff6ff; color: #2563eb; }

/* Old single-source class (backwards compat) */
.audit-competitor__source {
    font-size: 0.8rem;
    color: var(--color-secondary-text, #666);
}

/* -------------------------------------------------------------------------
   Action Buttons Row
   ---------------------------------------------------------------------- */

/* "Run Another Audit" muted link inside dark band */
.audit-rerun-link {
    display: inline-block;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.audit-rerun-link:hover {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: underline;
}

/* -------------------------------------------------------------------------
   Dark Issues Strip
   ---------------------------------------------------------------------- */

.audit-dark-strip {
    background: #162231;
    padding: 2.5rem 0 3rem;
    color: #fff;
}

.audit-dark-strip .audit-report__section {
    margin-bottom: 0;
}

/* Issues header — big number + heading */
.audit-issues-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.audit-issues-header__count {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--color-orange, #F28A2E);
    font-family: var(--font-heading, 'Sora', sans-serif);
    margin-bottom: 0.25rem;
}

.audit-issues-header__title {
    font-family: var(--font-heading, 'Sora', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem;
}

.audit-issues-header__subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    margin: 0;
}

/* Issues grid */
.audit-dark-strip .audit-report__issues {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    max-width: 680px;
    margin: 0 auto;
}

/* 2 cards: 2-col centred */
.audit-dark-strip .audit-report__issues--count-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 540px;
}

/* 1 card: full width, centred */
.audit-dark-strip .audit-report__issues--count-1 {
    grid-template-columns: 1fr;
    max-width: 540px;
}

/* Issue cards */
.audit-issue--dark {
    background: #1A2736;
    border-left: none;
    border-top: 4px solid #9ca3af;
    border-radius: 8px;
    padding: 2rem;
}

.audit-issue--dark.audit-issue--critical { border-top-color: #ef4444; }
.audit-issue--dark.audit-issue--important { border-top-color: var(--color-orange, #F28A2E); }
.audit-issue--dark.audit-issue--nice_to_have { border-top-color: #9ca3af; }

.audit-issue--dark .audit-issue__title {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.audit-issue--dark .audit-issue__impact {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.65;
}

/* Urgency line */
.audit-issues-urgency {
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 0;
    color: var(--color-orange, #F28A2E);
    font-size: 0.95rem;
    font-weight: 600;
}

/* CTA inside dark strip — raised card */
.audit-dark-strip .audit-report__cta {
    max-width: 600px;
    margin: 2.5rem auto 0;
    text-align: center;
    padding: 2rem 2.5rem 1.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #fff;
}

.audit-dark-strip .audit-report__cta-divider {
    display: none; /* divider is the border-top on .audit-report__cta */
}

.audit-report__cta h2 {
    font-family: var(--font-heading, 'Sora', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.35rem;
}

.audit-report__cta p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.audit-report__cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* -------------------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------------- */

@media (max-width: 640px) {
    .audit-summary-band__inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .audit-category {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .audit-category__name {
        font-size: 0.85rem;
    }

    .audit-category__bar-track {
        order: 2;
    }

    .audit-category__score {
        text-align: left;
    }

    .report-card {
        padding: 1.25rem 1.25rem;
    }

    .audit-report__checklist {
        grid-template-columns: 1fr;
    }

    .audit-report__competitors-list {
        grid-template-columns: 1fr;
    }

    .audit-dark-strip .audit-report__issues,
    .audit-dark-strip .audit-report__issues--count-2 {
        grid-template-columns: 1fr;
    }

    .audit-issues-header__count {
        font-size: 2.75rem;
    }

    .audit-issues-header__title {
        font-size: 1.25rem;
    }

    .audit-issue--dark {
        padding: 1.5rem;
    }

    .audit-report__cta-buttons {
        flex-direction: column;
    }

    .audit-dark-strip .audit-report__cta {
        padding: 1.5rem 1.25rem 1.25rem;
        margin-top: 2rem;
    }

    .audit-gate__card {
        padding: 1.5rem;
    }

    .audit-score__number {
        font-size: 2.5rem;
    }

    .audit-radar {
        width: 90px;
        height: 90px;
        margin-bottom: 1.5rem;
    }

    .view-report-header {
        padding: calc(72px + var(--space-lg, 1.5rem)) 0 var(--space-lg, 1.5rem);
    }

    .view-report-header__score-num {
        font-size: 1.6rem;
    }
}

/* -------------------------------------------------------------------------
   View Report Page — Header & Layout
   ---------------------------------------------------------------------- */

.view-report-header {
    background: var(--color-navy, #0C1220);
    color: #fff;
    padding: calc(72px + var(--space-2xl, 3rem)) 0 var(--space-xl, 2rem);
    text-align: center;
}

.view-report-header .container {
    position: relative;
}

.view-report-header__back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
    position: absolute;
    left: 0;
    top: 0;
}

.view-report-header__back svg {
    width: 18px;
    height: 18px;
}

.view-report-header__back:hover {
    color: #fff;
}

.view-report-header__title {
    font-family: var(--font-heading, 'Sora', sans-serif);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.view-report-header__meta {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--text-md, 1.0625rem);
    margin: 0 0 1.25rem;
}

.view-report-header__score {
    display: inline-flex;
    align-items: baseline;
    gap: 0.2rem;
}

.view-report-header__score-num {
    font-family: var(--font-heading, 'Sora', sans-serif);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.view-report-header__score-num--poor    { color: #ef4444; }
.view-report-header__score-num--fair    { color: #f59e0b; }
.view-report-header__score-num--good    { color: #2DD4A8; }
.view-report-header__score-num--excellent { color: #10b981; }

.view-report-header__score-of {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 500;
    margin-right: 0.6rem;
}

.view-report-header__grade {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25em 0.7em;
    border-radius: 100px;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

.view-report-header__grade--poor      { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.view-report-header__grade--fair      { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.view-report-header__grade--good      { background: rgba(45, 212, 168, 0.15); color: #2DD4A8; }
.view-report-header__grade--excellent { background: rgba(16, 185, 129, 0.15); color: #10b981; }

/* View mode: report section visible by default */
.audit-page--view .audit-report {
    display: block;
}

/* Footer inside dark strip */
.view-report-footer {
    text-align: center;
    margin-top: 1.5rem;
}
