/**
 * BoltPress Scanner — Shared Stylesheet
 * Covers both the scanner form shortcode and the report page template.
 * All classes prefixed with bp- to avoid theme collisions.
 */

/* ============================================================
   FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@100..900&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --bp-primary: #001F3F;
    --bp-accent: #FFDC00;
    --bp-accent-hover: #E6C600;
    --bp-accent-end: #FF9500;
    --bp-dark-bg: #050510;
    --bp-text: #2D3748;
    --bp-text-light: #FFFFFF;
    --bp-text-muted-dark: rgba(255,255,255,0.7);
    --bp-text-subtle-dark: rgba(255,255,255,0.35);
    --bp-dark-border: rgba(255,255,255,0.05);
    --bp-dark-border-light: rgba(255,255,255,0.15);
    --bp-badge-border: rgba(255,220,0,0.3);
    --bp-success: #48BB78;
    --bp-danger: #E53E3E;
    --bp-danger-light: #FEB2B2;
    --bp-warning: #DD6B20;
    --bp-warning-light: #FBD38D;
    --bp-text-muted: #718096;
    --bp-border: #E2E8F0;
    --bp-bg-alt: #FFF6DB;
    --bp-card-bg: #FFFFFF;
    --bp-card-border: #E2E8F0;
    --bp-card-shadow: 0 4px 12px rgba(0,0,0,0.1);
    --bp-card-shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes bp-fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes bp-scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes bp-glow-pulse {
    0%, 100% { box-shadow: 0 0 15px rgba(255,220,0,0.15), 0 0 40px rgba(255,220,0,0.08); }
    50%      { box-shadow: 0 0 20px rgba(255,220,0,0.25), 0 0 50px rgba(255,220,0,0.12); }
}
@keyframes bp-progress-stripe {
    0%   { background-position: 0 0; }
    100% { background-position: 40px 0; }
}

.bp-anim-fade-up   { animation: bp-fadeInUp 0.6s ease-out both; }
.bp-anim-scale      { animation: bp-scaleIn 0.5s ease-out both; }
.bp-anim-delay-1    { animation-delay: 0.1s; }
.bp-anim-delay-2    { animation-delay: 0.2s; }
.bp-anim-delay-3    { animation-delay: 0.3s; }

/* ============================================================
   GRADIENT TEXT UTILITY
   ============================================================ */
.bp-gradient-text {
    background: linear-gradient(90deg, var(--bp-accent), var(--bp-accent-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   SCANNER FORM (Shortcode)
   ============================================================ */
.bp-scanner {
    max-width: 720px;
    margin: 0 auto;
    font-family: 'Nunito Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
}
.bp-scanner *,
.bp-scanner *::before,
.bp-scanner *::after {
    box-sizing: border-box;
}
.bp-scanner h1,
.bp-scanner h2,
.bp-scanner h3,
.bp-scanner h4,
.bp-scanner h5,
.bp-scanner h6 {
    font-family: 'Urbanist', sans-serif;
    line-height: 1.2;
}

/* Hero heading */
.bp-hero {
    text-align: center;
    padding: 60px 20px 0;
}
.bp-hero-title {
    font-size: 3rem;
    color: #fff;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 20px;
}
.bp-hero-subtitle {
    font-size: 1.25rem;
    color: var(--bp-text-muted-dark);
    max-width: 580px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

/* Inline form — input + button side by side */
.bp-scan-form {
    display: flex;
    gap: 0;
    max-width: 640px;
    margin: 0 auto 24px;
}

/* Inputs */
.bp-input {
    flex: 1;
    min-width: 0;
    padding: 18px 24px;
    font-size: 16px;
    font-family: 'Nunito Sans', sans-serif;
    border: 1px solid var(--bp-dark-border-light);
    border-right: none;
    border-radius: 8px 0 0 8px;
    background: rgba(255,255,255,0.06);
    color: #fff;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.bp-input::placeholder {
    color: var(--bp-text-subtle-dark);
}
.bp-input:focus {
    border-color: var(--bp-accent);
    box-shadow: 0 0 0 3px rgba(255,220,0,0.1);
    z-index: 1;
}

/* Button — matches theme .btn / .btn--primary */
.bp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Nunito Sans', sans-serif;
    line-height: 1;
    background: var(--bp-accent);
    color: var(--bp-primary);
    border: 2px solid var(--bp-accent);
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
    text-decoration: none;
    transition: all 0.25s;
}
.bp-button:hover {
    background: var(--bp-accent-hover);
    border-color: var(--bp-accent-hover);
    color: var(--bp-primary);
    transform: translateY(-2px);
}
.bp-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
/* Ghost dark — matches theme .btn--ghost-dark */
.bp-button-secondary {
    background: transparent;
    color: rgba(255,255,255,0.6);
    border: 1px solid var(--bp-dark-border-light);
}
.bp-button-secondary:hover {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.9);
}
.bp-scan-btn {
    border-radius: 0 8px 8px 0;
    padding: 16px 40px;
    font-size: 1.125rem;
    font-weight: 700;
}

/* ============================================================
   PROGRESS CARD — Scanning Animation
   ============================================================ */
@keyframes bp-spin {
    to { transform: rotate(360deg); }
}
@keyframes bp-bar-glow {
    0%   { background-position: 0 0; }
    100% { background-position: 40px 0; }
}
@keyframes bp-stepIn {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes bp-checkPop {
    0%   { transform: scale(0) rotate(-45deg); opacity: 0; }
    60%  { transform: scale(1.15) rotate(0deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes bp-scan-sweep {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes bp-card-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255,220,0,0.06), 0 0 60px rgba(255,149,0,0.03); }
    50%      { box-shadow: 0 0 30px rgba(255,220,0,0.1), 0 0 80px rgba(255,149,0,0.05); }
}
@keyframes bp-scanline {
    0%   { transform: translateX(-100%); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}
@keyframes bp-dot-pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50%      { opacity: 1; transform: scale(1); }
}

.bp-progress {
    margin-top: 32px;
    animation: bp-fadeInUp 0.6s ease-out both;
}
.bp-progress-card {
    max-width: 640px;
    margin: 0 auto;
    background: linear-gradient(170deg, rgba(12, 12, 24, 0.95) 0%, rgba(8, 8, 18, 0.98) 100%);
    border: 1px solid var(--bp-badge-border);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(16px);
    animation: bp-card-glow 3s ease-in-out infinite;
}

/* Card header */
.bp-progress-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px 20px;
    background: linear-gradient(180deg, rgba(255,220,0,0.03) 0%, transparent 100%);
}
.bp-progress-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255,220,0,0.12), rgba(255,149,0,0.08));
    border: 1px solid rgba(255,220,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--bp-accent);
}
/* No pseudo-element overlay on icon */
.bp-progress-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 1.25rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}
/* Pulsing dot next to "Scanning..." */
.bp-progress-title::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bp-accent);
    animation: bp-dot-pulse 1.4s ease-in-out infinite;
    flex-shrink: 0;
}
.bp-progress-header-text {
    min-width: 0;
}
.bp-progress-url-display {
    font-size: 14px;
    color: rgba(255,255,255,0.4);
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Card body */
.bp-progress-body {
    padding: 20px 28px 24px;
}

/* Overall progress */
.bp-progress-overall {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.bp-progress-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.bp-progress-label-text {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bp-progress-pct {
    font-family: 'Urbanist', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--bp-accent);
}
.bp-progress-track {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}
.bp-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    /* Gold→orange gradient with animated stripes */
    background-color: var(--bp-accent);
    background-image: linear-gradient(
        90deg,
        var(--bp-accent) 0%,
        var(--bp-accent-end) 50%,
        var(--bp-accent) 100%
    ), linear-gradient(
        135deg,
        rgba(255,255,255,0.2) 25%, transparent 25%,
        transparent 50%, rgba(255,255,255,0.2) 50%,
        rgba(255,255,255,0.2) 75%, transparent 75%,
        transparent
    );
    background-size: 100% 100%, 10px 10px;
    animation: bp-bar-glow 0.6s linear infinite;
}
.bp-progress-fill::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bp-accent);
    box-shadow: 0 0 8px rgba(255,220,0,0.5), 0 0 20px rgba(255,220,0,0.25), 0 0 40px rgba(255,149,0,0.15);
}
.bp-progress-msg {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    margin: 0;
}

/* Scan step cards */
.bp-scan-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bp-step-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-left: 3px solid transparent;
    border-radius: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: bp-stepIn 0.35s ease-out both;
    position: relative;
    overflow: hidden;
}
.bp-step-card:nth-child(1) { animation-delay: 0.05s; }
.bp-step-card:nth-child(2) { animation-delay: 0.12s; }
.bp-step-card:nth-child(3) { animation-delay: 0.19s; }
.bp-step-card:nth-child(4) { animation-delay: 0.26s; }

.bp-step-card.bp-step-active {
    background: rgba(255,220,0,0.04);
    border-color: rgba(255,220,0,0.08);
    border-left-color: var(--bp-accent);
}
/* Scan line sweeping across active card */
.bp-step-card.bp-step-active::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,220,0,0.06), transparent);
    animation: bp-scanline 2.5s ease-in-out infinite;
    pointer-events: none;
}
.bp-step-card.bp-step-done {
    background: rgba(72, 187, 120, 0.03);
    border-color: rgba(72, 187, 120, 0.08);
    border-left-color: var(--bp-success);
}

/* Step icon */
.bp-step-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.25);
    transition: all 0.4s;
}
.bp-step-card.bp-step-active .bp-step-icon {
    background: rgba(255,220,0,0.1);
    color: var(--bp-accent);
}
.bp-step-card.bp-step-done .bp-step-icon {
    background: rgba(72, 187, 120, 0.1);
    color: var(--bp-success);
}

/* Step text */
.bp-step-info {
    flex: 1;
    min-width: 0;
}
.bp-step-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    transition: color 0.3s;
}
.bp-step-card.bp-step-active .bp-step-name {
    color: #fff;
}
.bp-step-card.bp-step-done .bp-step-name {
    color: rgba(255,255,255,0.6);
}
.bp-step-detail {
    font-size: 12px;
    color: rgba(255,255,255,0.25);
    margin-top: 2px;
    min-height: 16px;
    transition: color 0.3s;
}
.bp-step-card.bp-step-active .bp-step-detail {
    color: rgba(255,220,0,0.5);
}

/* Step status badge */
.bp-step-status {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bp-status-pending {
    color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.03);
}
.bp-status-running {
    color: var(--bp-accent);
    background: rgba(255,220,0,0.08);
}
.bp-status-done {
    color: var(--bp-success);
    background: rgba(72, 187, 120, 0.08);
}

/* Spinner — golden */
.bp-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,220,0,0.2);
    border-top-color: var(--bp-accent);
    border-radius: 50%;
    animation: bp-spin 0.7s linear infinite;
    flex-shrink: 0;
}

/* Check icon animation */
.bp-check-icon {
    animation: bp-checkPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Card footer */
.bp-progress-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.04);
    font-size: 12px;
    color: rgba(255,255,255,0.25);
}
.bp-progress-footer svg {
    opacity: 0.5;
}
.bp-progress-footer-url {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}

/* ============================================================
   ERROR CARD
   ============================================================ */
.bp-error {
    margin-top: 24px;
    padding: 24px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(229,62,62,0.08);
    border: 1px solid rgba(229,62,62,0.3);
    border-radius: 12px;
    text-align: center;
    animation: bp-fadeInUp 0.4s ease-out both;
}
.bp-error-msg {
    font-size: 15px;
    color: var(--bp-danger-light);
    margin: 0 0 16px;
}

/* ============================================================
   RESULT VIEW — Score Card Layout
   ============================================================ */
.bp-result {
    margin-top: 24px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    animation: bp-fadeInUp 0.5s ease-out both;
}

/* Result heading — "WordPress Scan Results" */
.bp-result-heading {
    text-align: center;
    margin-bottom: 28px;
}
.bp-result-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 2.25rem;
    color: #fff;
    margin: 0 0 10px;
    letter-spacing: -1px;
}
.bp-result-info {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}
.bp-result-url {
    font-weight: 600;
    color: rgba(255,255,255,0.6);
}

/* Score card — circular gauge + label + grade + bar */
.bp-score-card {
    background: rgba(12, 12, 24, 0.7);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

/* Circular score ring */
.bp-score-ring {
    width: 100px;
    height: 100px;
    position: relative;
    flex-shrink: 0;
}
.bp-score-ring-svg {
    width: 100%;
    height: 100%;
}
.bp-score-ring-bg {
    stroke: rgba(255,255,255,0.06);
}
.bp-score-ring-fill {
    transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.4s;
    stroke: var(--bp-accent);
}
.bp-score-ring-value {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.bp-score-number {
    font-family: 'Urbanist', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}
.bp-score-max {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    margin-top: 2px;
}

/* Score detail — label, grade, verdict */
.bp-score-detail {
    flex: 1;
    min-width: 0;
}
.bp-score-label-text {
    font-family: 'Urbanist', sans-serif;
    font-size: 1.2rem;
    color: #fff;
    font-weight: 700;
    margin-bottom: 4px;
}
.bp-score-grade-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.bp-score-grade {
    font-family: 'Urbanist', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
    color: #fff;
    background: #999;
}
.bp-score-verdict {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    line-height: 1;
}
.bp-score-description {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    line-height: 1.4;
}

/* Score bar (full-width at bottom of card) */
.bp-score-bar-wrap {
    width: 100%;
    margin-top: 4px;
}
.bp-score-bar {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.bp-score-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s;
    background: var(--bp-accent);
}

/* Summary sections */
.bp-result-summary {
    margin-bottom: 20px;
}
.bp-summary-section {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 10px;
}
.bp-summary-section h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 10px;
}
.bp-summary-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.bp-summary-section li {
    font-size: 14px;
    padding: 4px 0;
    line-height: 1.5;
}
.bp-summary-section li::before {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 8px;
    content: '';
    vertical-align: middle;
}
.bp-summary-critical {
    background: rgba(229,62,62,0.08);
}
.bp-summary-critical h4 {
    color: var(--bp-danger);
}
.bp-summary-critical li {
    color: var(--bp-danger-light);
}
.bp-summary-critical li::before {
    background: var(--bp-danger);
}
.bp-summary-warnings {
    background: rgba(221,107,32,0.08);
}
.bp-summary-warnings h4 {
    color: var(--bp-warning);
}
.bp-summary-warnings li {
    color: var(--bp-warning-light);
}
.bp-summary-warnings li::before {
    background: var(--bp-warning);
}
.bp-summary-passes {
    background: rgba(72,187,120,0.08);
}
.bp-summary-passes h4 {
    color: var(--bp-success);
}
.bp-summary-passes li {
    color: rgba(72,187,120,0.9);
}
.bp-summary-passes li::before {
    background: var(--bp-success);
}

/* Report link button */
.bp-result-actions {
    text-align: center;
    margin-bottom: 28px;
}
.bp-report-link {
    display: inline-block;
    width: 100%;
    max-width: 320px;
}

/* ============================================================
   UNLOCK CARD — Email capture for full report
   ============================================================ */
.bp-unlock-card {
    background: rgba(12, 12, 24, 0.7);
    border: 1px solid var(--bp-badge-border);
    border-radius: 16px;
    padding: 36px 32px;
    text-align: center;
    animation: bp-fadeInUp 0.5s ease-out both;
    animation-delay: 0.15s;
}
.bp-unlock-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255,220,0,0.08);
    border: 1px solid rgba(255,220,0,0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bp-accent);
    margin-bottom: 16px;
}
.bp-unlock-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 1.35rem;
    color: #fff;
    margin: 0 0 8px;
}
.bp-unlock-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    max-width: 400px;
    margin: 0 auto 24px;
    line-height: 1.5;
}
.bp-unlock-form {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.bp-unlock-email {
    text-align: center;
    border-right: 1px solid var(--bp-dark-border-light);
    border-radius: 8px;
}
.bp-unlock-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    text-align: left;
    cursor: pointer;
    line-height: 1.4;
}
.bp-unlock-consent a {
    color: var(--bp-accent);
    text-decoration: underline;
    text-decoration-color: rgba(255,220,0,0.3);
}
.bp-unlock-consent a:hover {
    text-decoration-color: var(--bp-accent);
}
.bp-unlock-checkbox {
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: var(--bp-accent);
}
.bp-unlock-btn {
    width: 100%;
}
.bp-unlock-btn:disabled {
    opacity: 0.45;
}
.bp-unlock-note {
    font-size: 12px;
    color: rgba(255,255,255,0.3);
    margin: 14px 0 0;
}


/* ============================================================
   REPORT PAGE — Page wrapper
   ============================================================ */
.bp-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Transition zone: dark theme -> light report body */
.bp-report-zone {
    background: #f7f8fa;
    border-radius: 24px 24px 24px 24px;
    margin-top: 60px;
    margin-bottom: 60px;
    padding: 20px 20px 20px;
}

/* Annotation labels */
.bp-annotation {
    font-size: 11px;
    color: var(--bp-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bp-annotation::before {
    content: '';
    display: block;
    width: 16px;
    height: 1px;
    background: var(--bp-text-muted);
}

/* ============================================================
   REPORT HEADER
   ============================================================ */
.bp-report-header {
    display: flex;
    align-items: center;
    gap: 36px;
    padding: 32px 36px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    border-radius: 16px;
    border: 1px solid var(--bp-card-border);
    box-shadow: var(--bp-card-shadow);
    margin-bottom: 20px;
}

/* Score gauge — conic-gradient progress ring */
.bp-score-gauge {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    border: none;
    --bp-gauge-color: var(--bp-warning);
    background: conic-gradient(
        var(--bp-gauge-color) calc(var(--bp-score, 0) * 3.6deg),
        #E8ECF1 calc(var(--bp-score, 0) * 3.6deg)
    );
    box-shadow: 0 0 24px rgba(221, 107, 32, 0.15);
}
.bp-score-gauge::before {
    content: '';
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: linear-gradient(145deg, #FAFCFF, #FFFFFF);
}
.bp-score-gauge > * {
    position: relative;
    z-index: 1;
}
.bp-score-gauge.bp-gauge-green {
    --bp-gauge-color: var(--bp-success);
    box-shadow: 0 0 24px rgba(72, 187, 120, 0.2);
}
.bp-score-gauge.bp-gauge-amber {
    --bp-gauge-color: var(--bp-warning);
    box-shadow: 0 0 24px rgba(221, 107, 32, 0.2);
}
.bp-score-gauge.bp-gauge-red {
    --bp-gauge-color: var(--bp-danger);
    box-shadow: 0 0 24px rgba(229, 62, 62, 0.2);
}

.bp-report-header .bp-score-number {
    font-family: 'Urbanist', sans-serif;
    font-size: 36px;
    line-height: 1;
    color: var(--bp-primary);
}
.bp-report-header .bp-score-grade {
    font-family: 'Urbanist', sans-serif;
    font-size: 20px;
    line-height: 1;
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    color: var(--bp-warning);
    margin-top: 2px;
}
.bp-report-header .bp-score-grade.bp-grade-green  { color: var(--bp-success); }
.bp-report-header .bp-score-grade.bp-grade-amber  { color: var(--bp-warning); }
.bp-report-header .bp-score-grade.bp-grade-red    { color: var(--bp-danger); }

.bp-report-header .bp-score-label {
    font-size: 9px;
    color: var(--bp-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
}
.bp-score-label {
    font-size: 10px;
    color: var(--bp-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Report meta text */
.bp-report-meta h2 {
    font-size: 1.6rem;
    color: var(--bp-primary);
    margin-bottom: 6px;
}
.bp-report-meta .bp-url {
    font-size: 14px;
    color: var(--bp-text-muted);
    margin-bottom: 12px;
    opacity: 0.85;
}
.bp-report-meta .bp-summary {
    font-size: 14px;
    color: var(--bp-danger);
    font-weight: 700;
}

/* ============================================================
   WP INFO BAR — 4 columns
   ============================================================ */
.bp-wp-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.bp-wp-info-item {
    background: var(--bp-card-bg);
    border-radius: 12px;
    border: 1px solid var(--bp-card-border);
    border-top: 3px solid var(--bp-card-border);
    padding: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.bp-wp-info-item:has(.bp-status.bp-ok)   { border-top-color: var(--bp-success); }
.bp-wp-info-item:has(.bp-status.bp-bad)  { border-top-color: var(--bp-danger); }
.bp-wp-info-item:has(.bp-status.bp-warn) { border-top-color: var(--bp-warning); }
.bp-wp-info-item .bp-label {
    font-size: 11px;
    color: var(--bp-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.bp-wp-info-item .bp-value {
    font-family: 'Urbanist', sans-serif;
    font-size: 18px;
    color: var(--bp-primary);
    margin-top: 4px;
    font-weight: 600;
}
.bp-wp-info-item .bp-status {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.bp-wp-info-item .bp-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.bp-wp-info-item .bp-status.bp-bad  { color: var(--bp-danger); }
.bp-wp-info-item .bp-status.bp-ok   { color: var(--bp-success); }
.bp-wp-info-item .bp-status.bp-warn { color: var(--bp-warning); }

/* ============================================================
   CATEGORY CARDS — 3 columns
   ============================================================ */
.bp-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.bp-cat-card {
    padding: 24px;
    background: var(--bp-card-bg);
    border-radius: 16px;
    border: 1px solid var(--bp-card-border);
    text-align: center;
    box-shadow: var(--bp-card-shadow);
    transition: transform 0.25s, box-shadow 0.25s;
}
.bp-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--bp-card-shadow-lg);
}
.bp-cat-score {
    font-family: 'Urbanist', sans-serif;
    font-size: 40px;
}
.bp-cat-score.bp-red   { color: var(--bp-danger); }
.bp-cat-score.bp-amber { color: var(--bp-warning); }
.bp-cat-score.bp-green { color: var(--bp-success); }

.bp-cat-label {
    font-size: 12px;
    color: var(--bp-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
}
.bp-cat-grade {
    font-size: 14px;
    font-weight: 700;
    margin-top: 4px;
}

/* ============================================================
   SECTION BOXES — white card containers
   ============================================================ */
.bp-section-box {
    background: var(--bp-card-bg);
    border-radius: 16px;
    border: 1px solid var(--bp-card-border);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--bp-card-shadow);
}
.bp-section-box h3 {
    font-size: 1.125rem;
    color: var(--bp-primary);
    margin-bottom: 16px;
}
.bp-sub-heading {
    font-family: 'Urbanist', sans-serif;
    font-size: 0.85rem;
    color: var(--bp-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 24px;
    margin-bottom: 12px;
}

/* ============================================================
   ISSUES
   ============================================================ */
.bp-issue-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}
.bp-issue-row:last-child {
    border-bottom: none;
}
.bp-severity {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}
.bp-severity.bp-critical {
    background: #9B2C2C;
    color: #fff;
}
.bp-severity.bp-high {
    background: #E53E3E;
    color: #fff;
}
.bp-severity.bp-medium {
    background: #DD6B20;
    color: #fff;
}
.bp-severity.bp-low {
    background: #ECC94B;
    color: #744210;
}
.bp-issue-text {
    font-size: 14px;
    color: var(--bp-text);
    line-height: 1.5;
}
.bp-issue-text strong {
    color: var(--bp-primary);
}
.bp-issue-text .bp-impact {
    display: block;
    font-size: 13px;
    color: var(--bp-text-muted);
    margin-top: 3px;
}
.bp-issue-text code {
    font-size: 13px;
    background: #f7f8fa;
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--bp-primary);
}

/* ============================================================
   DATA TABLES
   ============================================================ */
.bp-data-table {
    width: 100%;
    border-collapse: collapse;
}
.bp-data-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--bp-text-muted);
    padding: 10px 12px;
    border-bottom: 2px solid var(--bp-border);
}
.bp-data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: var(--bp-text);
}
.bp-data-table td strong {
    color: var(--bp-primary);
}

/* Check pass / fail indicators */
.bp-check-pass {
    color: var(--bp-success);
    font-weight: 700;
}
.bp-check-pass::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--bp-success);
    margin-right: 6px;
    vertical-align: middle;
}
.bp-check-fail {
    color: var(--bp-danger);
    font-weight: 700;
}
.bp-check-fail::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--bp-danger);
    margin-right: 6px;
    vertical-align: middle;
}

/* ============================================================
   STATUS PILLS
   ============================================================ */
.bp-status-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}
.bp-status-pill.bp-pass {
    background: #F0FFF4;
    color: var(--bp-success);
}
.bp-status-pill.bp-fail {
    background: #FFF5F5;
    color: var(--bp-danger);
}
.bp-status-pill.bp-warn {
    background: #FFFAF0;
    color: var(--bp-warning);
}
.bp-status-pill.bp-neutral {
    background: #f7f8fa;
    color: var(--bp-text-muted);
}

/* Version status text helpers */
.bp-outdated {
    color: var(--bp-danger);
    font-weight: 700;
}
.bp-current {
    color: var(--bp-success);
    font-weight: 600;
}
.bp-unknown {
    color: var(--bp-text-muted);
    font-style: italic;
}

/* ============================================================
   ALERT — Danger
   ============================================================ */
.bp-alert-danger {
    padding: 14px 18px;
    background: #FFF5F5;
    border-radius: 10px;
    border-left: 4px solid var(--bp-danger);
    font-size: 14px;
    color: #9B2C2C;
    margin-top: 16px;
}

/* ============================================================
   OBSERVATORY BADGE
   ============================================================ */
.bp-observatory-badge {
    margin-top: 16px;
    padding: 14px 18px;
    background: #f7f8fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.bp-observatory-badge .bp-obs-grade {
    font-family: 'Urbanist', sans-serif;
    font-size: 28px;
    color: var(--bp-warning);
}
.bp-observatory-badge .bp-obs-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--bp-primary);
}
.bp-observatory-badge .bp-obs-detail {
    font-size: 13px;
    color: var(--bp-text-muted);
}

/* ============================================================
   PERFORMANCE — Scores (mobile / desktop)
   ============================================================ */
.bp-perf-scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.bp-perf-score-card {
    text-align: center;
    padding: 24px;
    border: 1px solid var(--bp-card-border);
    border-radius: 12px;
    background: var(--bp-card-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.bp-perf-num {
    font-family: 'Urbanist', sans-serif;
    font-size: 2.75rem;
}
.bp-perf-label {
    font-size: 12px;
    color: var(--bp-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ============================================================
   METRICS GRID — Core Web Vitals (5 columns)
   ============================================================ */
.bp-metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.bp-metric-box {
    text-align: center;
    padding: 14px 8px;
    border-radius: 10px;
}
.bp-metric-value {
    font-family: 'Urbanist', sans-serif;
    font-size: 20px;
}
.bp-metric-label {
    font-size: 11px;
    color: var(--bp-text-muted);
    margin-top: 2px;
    letter-spacing: 0.5px;
}
.bp-metric-box.bp-poor {
    background: #FFF5F5;
}
.bp-metric-box.bp-poor .bp-metric-value {
    color: var(--bp-danger);
}
.bp-metric-box.bp-needs-work {
    background: #FFFAF0;
}
.bp-metric-box.bp-needs-work .bp-metric-value {
    color: var(--bp-warning);
}
.bp-metric-box.bp-good {
    background: #F0FFF4;
}
.bp-metric-box.bp-good .bp-metric-value {
    color: var(--bp-success);
}

/* ============================================================
   CTA BOX — Dark with glow
   ============================================================ */
.bp-cta-box {
    background: var(--bp-dark-bg);
    border-radius: 20px;
    padding: 56px 40px;
    text-align: center;
    border: 1px solid var(--bp-badge-border);
    animation: bp-glow-pulse 3s ease-in-out infinite;
    margin: 32px 0 20px;
}
.bp-cta-box h3 {
    font-size: 1.875rem;
    color: var(--bp-text-light);
    margin-bottom: 12px;
}
.bp-cta-box p {
    font-size: 1rem;
    color: var(--bp-text-muted-dark);
    margin-bottom: 28px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}
.bp-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 48px;
    background: var(--bp-accent);
    color: var(--bp-primary);
    font-size: 1.125rem;
    font-weight: 600;
    font-family: 'Nunito Sans', sans-serif;
    line-height: 1;
    border-radius: 8px;
    text-decoration: none;
    border: 2px solid var(--bp-accent);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s;
}
.bp-cta-button:hover {
    background: var(--bp-accent-hover);
    border-color: var(--bp-accent-hover);
    transform: translateY(-2px);
}

/* ============================================================
   FOOTER BAR
   ============================================================ */
.bp-footer-bar {
    text-align: center;
    padding: 10px;
    font-size: 13px;
    color: var(--bp-text-muted);
}
.bp-footer-bar strong {
    color: var(--bp-primary);
}
.bp-footer-bar a {
    color: var(--bp-primary);
    font-weight: 600;
    text-decoration: none;
}
.bp-footer-bar a:hover {
    text-decoration: underline;
}

/* ============================================================
   TRUST BAR (scanner page hero area)
   ============================================================ */
.bp-trust-bar {
    display: flex;
    justify-content: center;
    gap: 36px;
    margin-top: 28px;
}
.bp-trust-item {
    font-size: 13px;
    color: var(--bp-text-subtle-dark);
}
.bp-trust-item strong {
    color: rgba(255,220,0,0.8);
}

/* ============================================================
   RESPONSIVE — Tablets & Mobile
   ============================================================ */
@media (max-width: 768px) {
    /* Scanner form */
    .bp-scanner {
        max-width: 100%;
        padding: 0 16px;
    }
    .bp-hero {
        padding: 40px 12px 0;
    }
    .bp-hero-title {
        font-size: 2.25rem;
        letter-spacing: -1px;
    }
    .bp-hero-subtitle {
        font-size: 1.05rem;
        margin-bottom: 28px;
    }
    .bp-scan-form {
        flex-direction: column;
        gap: 10px;
    }
    .bp-scan-form .bp-input {
        border-right: 1px solid var(--bp-dark-border-light);
        border-radius: 8px;
    }
    .bp-scan-form .bp-scan-btn {
        border-radius: 8px;
        width: 100%;
    }
    .bp-trust-bar {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    .bp-progress-card {
        border-radius: 14px;
    }
    .bp-progress-header {
        padding: 18px 20px 16px;
    }
    .bp-progress-icon {
        width: 44px;
        height: 44px;
    }
    .bp-progress-body {
        padding: 16px 20px 20px;
    }
    .bp-step-card {
        padding: 12px 14px;
        gap: 10px;
    }
    .bp-step-icon {
        width: 30px;
        height: 30px;
    }
    .bp-step-name {
        font-size: 13px;
    }
    .bp-step-status {
        font-size: 10px;
        padding: 3px 10px;
    }

    /* Report page */
    .bp-report-zone {
        padding: 24px 16px 40px;
        border-radius: 16px 16px 0 0;
    }
    .bp-report-header {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
        gap: 20px;
    }
    .bp-wp-info {
        grid-template-columns: repeat(2, 1fr);
    }
    .bp-categories {
        grid-template-columns: 1fr;
    }
    .bp-perf-scores {
        grid-template-columns: 1fr;
    }
    .bp-metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .bp-section-box {
        padding: 20px 16px;
    }
    .bp-data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .bp-issue-row {
        flex-direction: column;
        gap: 8px;
    }
    .bp-cta-box {
        padding: 36px 20px;
    }
    .bp-cta-box h3 {
        font-size: 1.5rem;
    }
    .bp-observatory-badge {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .bp-hero-title {
        font-size: 1.85rem;
    }
    .bp-wp-info {
        grid-template-columns: 1fr;
    }
    .bp-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bp-score-card {
        flex-direction: column;
        text-align: center;
    }
    .bp-score-grade-row {
        justify-content: center;
    }
    .bp-result-info {
        flex-direction: column;
        gap: 4px;
    }
}

/* ── Unlock states ──────────────────────────────────── */
.bp-unlock-card.is-loading .bp-unlock-form { opacity: 0.5; pointer-events: none; }
.bp-unlock-card.is-loading .bp-unlock-btn { position: relative; color: transparent; }
.bp-unlock-card.is-loading .bp-unlock-btn::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(0,31,63,0.3);
  border-top-color: #001F3F;
  border-radius: 50%;
  animation: bp-spin 0.6s linear infinite;
}
/* Behavioral utility: JS toggles this class to show/hide sections */
.bp-is-hidden { display: none !important; }

/* Default states: success + error hidden until toggled by .is-success / .is-error */
.bp-unlock-success,
.bp-unlock-error { display: none; }
.bp-unlock-card.is-success .bp-unlock-success { display: block; }
.bp-unlock-card.is-error .bp-unlock-error { display: block; }
.bp-unlock-card.is-success > .bp-unlock-title,
.bp-unlock-card.is-success > .bp-unlock-desc,
.bp-unlock-card.is-success .bp-unlock-form,
.bp-unlock-card.is-success .bp-unlock-icon,
.bp-unlock-card.is-success .bp-unlock-note { display: none; }
.bp-unlock-success {
  text-align: center;
  animation: bp-fadeInUp 0.4s ease-out;
}
.bp-unlock-success svg { margin-bottom: 12px; }
.bp-unlock-error { margin-top: 8px; }
.bp-unlock-error-msg {
  color: var(--bp-danger, #E53E3E);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}
