:root {
    --apple-gray-100: #fbfbfd;
    --apple-gray-200: #f5f5f7;
    --apple-gray-400: #86868b;
    --apple-gray-800: #1d1d1f;
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --apple-green: #34c759;
    --apple-red: #ff3b30;
    --apple-orange: #ff9500;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--apple-gray-100);
    color: var(--apple-gray-800);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* высота navbar */
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: -0.015em;
}

.gradient-text {
    background: linear-gradient(90deg, var(--apple-blue), #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-danger {
    background: linear-gradient(135deg, #ff3b30 0%, #ff9500 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Navbar */
.app-navbar {
    background-color: rgba(251, 251, 253, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.app-navbar .navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.app-navbar .nav-link {
    font-size: 0.85rem;
    color: var(--apple-gray-800);
    font-weight: 400;
    transition: color 0.2s;
}

.app-navbar .nav-link:hover {
    color: var(--apple-blue);
}

/* Hero Section */
.hero-section {
    padding: 120px 0 80px;
    background-color: var(--apple-gray-100);
    overflow: hidden;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: var(--apple-gray-200);
    color: var(--apple-gray-800);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--apple-gray-400);
    font-weight: 400;
    margin-bottom: 48px;
    line-height: 1.3;
}

/* Search Form */
.search-input-group {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.search-input-group:focus-within {
    box-shadow: 0 8px 30px rgba(0, 113, 227, 0.15);
    border-color: var(--apple-blue);
}

.search-input-group .input-group-text {
    background: transparent;
    border: none;
    padding-left: 20px;
    color: var(--apple-gray-400);
}

.search-input-group .form-control {
    border: none;
    box-shadow: none;
    padding: 20px 15px;
    font-size: 1.1rem;
}

.search-input-group .btn-analyze {
    border-radius: 0;
    padding: 0 30px;
    font-weight: 500;
    background-color: var(--apple-blue);
    border-color: var(--apple-blue);
}

.search-input-group .btn-analyze:hover {
    background-color: var(--apple-blue-hover);
}

/* Mobile: stack input and button vertically */
@media (max-width: 768px) {
    .search-input-group {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        border-radius: 16px;
        padding: 12px;
        gap: 10px;
        background: #fff;
        border: 1px solid rgba(0, 0, 0, 0.08);
    }

    .search-input-group > .input-group-text {
        display: none !important;
    }

    .search-input-group > .form-control {
        width: 100% !important;
        flex: none !important;
        border: 1.5px solid #e0e0e0 !important;
        border-radius: 12px !important;
        padding: 15px 16px !important;
        font-size: 1rem !important;
        background: #f9f9fb !important;
        box-shadow: none !important;
        height: auto !important;
    }

    .search-input-group > .form-control::placeholder {
        color: #aaa;
    }

    .search-input-group > .form-control:focus {
        border-color: var(--apple-blue) !important;
        background: #fff !important;
        box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12) !important;
    }

    .search-input-group > .btn-analyze {
        width: 100% !important;
        flex: none !important;
        border-radius: 12px !important;
        padding: 15px !important;
        font-size: 1.05rem !important;
        font-weight: 600 !important;
        border: none !important;
    }
}

.hero-note {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--apple-gray-400);
}

/* Features */
.features-section {
    padding: 100px 0;
    background-color: #fff;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--apple-gray-400);
}

.feature-card {
    background: var(--apple-gray-100);
    border-radius: 18px;
    padding: 30px;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

.feature-card.premium {
    background: linear-gradient(145deg, #f0f7ff, #ffffff);
    border: 1px solid rgba(0, 113, 227, 0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--apple-gray-800);
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.premium-icon {
    color: var(--apple-blue);
}

.feature-card h5 {
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--apple-gray-400);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* Pricing */
.pricing-section {
    padding: 100px 0;
    background-color: var(--apple-gray-100);
}

.pricing-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    height: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    position: relative;
}

.pricing-card.featured {
    border: 2px solid var(--apple-blue);
    transform: scale(1.02);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--apple-blue);
    color: #fff;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--apple-gray-200);
    padding-bottom: 30px;
}

.pricing-header h4 {
    font-weight: 600;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 10px 0;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.pricing-features li {
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.pricing-features i {
    margin-right: 10px;
    font-size: 1.1rem;
    vertical-align: middle;
}

/* Results */
.report-section {
    padding: 60px 0;
}

.report-header {
    margin-bottom: 40px;
}

.report-url {
    font-size: 1.5rem;
    font-weight: 600;
    display: inline-block;
    background: #fff;
    padding: 10px 24px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    margin-bottom: 10px;
}

.report-date {
    color: var(--apple-gray-400);
    font-size: 0.9rem;
}

.score-card {
    text-align: center;
    background: #fff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 8px solid;
}

.score-circle .score-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.score-circle .score-label {
    font-size: 0.9rem;
    color: var(--apple-gray-400);
}

.score-good {
    border-color: var(--apple-green);
    color: var(--apple-green);
}

.score-warning {
    border-color: var(--apple-orange);
    color: var(--apple-orange);
}

.score-bad {
    border-color: var(--apple-red);
    color: var(--apple-red);
}

.score-premium {
    border-color: var(--apple-blue);
    color: var(--apple-blue);
}

.results-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--apple-gray-200);
}

.result-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    page-break-inside: avoid;
    break-inside: avoid;
}

.result-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.result-header .result-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--apple-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.result-info h5 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.result-info p {
    font-size: 0.85rem;
}

.result-status {
    margin-left: auto;
}

.detail-item {
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--apple-gray-100);
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.detail-item i {
    margin-top: 2px;
}

.result-score-bar {
    margin-top: 20px;
}

.result-score-bar .progress {
    height: 6px;
    margin-bottom: 4px;
    border-radius: 3px;
}

/* Paywall */
.paywall-section {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.paywall-blur {
    filter: blur(8px) grayscale(50%);
    opacity: 0.6;
    pointer-events: none;
    user-select: none;
}

.paywall-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(251, 251, 253, 0.5), rgba(251, 251, 253, 0.95));
}

.paywall-content {
    background: #fff;
    padding: 0;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 95%;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.paywall-icon {
    font-size: 40px;
    color: var(--apple-blue);
    margin-bottom: 20px;
}

.paywall-features {
    list-style: none;
    padding: 0;
    text-align: left;
    margin: 24px auto;
    width: fit-content;
}

.paywall-features li {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.paywall-features i {
    color: var(--apple-blue);
    margin-right: 8px;
}

.paywall-note {
    font-size: 0.8rem;
    color: var(--apple-gray-400);
    margin-top: 16px;
    margin-bottom: 0;
}

/* Premium Unlocked Features */
.premium-unlocked-header {
    background: linear-gradient(135deg, #1d1d1f 0%, #434353 100%);
    color: #fff;
    border-radius: 24px;
    padding: 40px;
    display: flex;
    align-items: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    margin-top: 20px;
}

.premium-unlocked-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, #f5d100, #fba100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
    margin-right: 30px;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(251, 161, 0, 0.3);
}

.premium-result-card {
    position: relative;
    border: 2px solid transparent;
    background-clip: padding-box;
    overflow: hidden;
}

.premium-result-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    margin: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(0, 113, 227, 0.3), rgba(0, 113, 227, 0.05));
}

.action-plan-section {
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 113, 227, 0.05);
    border: 1px solid rgba(0, 113, 227, 0.1);
}

.action-plan-title {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.action-plan-title i {
    font-size: 32px;
    color: var(--apple-green);
    margin-right: 15px;
}

.action-plan-item {
    border-left: 4px solid var(--apple-gray-200);
    padding-left: 20px;
    margin-bottom: 30px;
    position: relative;
    page-break-inside: avoid;
    break-inside: avoid;
}

.action-plan-item::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--apple-gray-200);
}

.action-plan-item.high-priority {
    border-left-color: var(--apple-red);
}

.action-plan-item.high-priority::before {
    border-color: var(--apple-red);
}

.action-plan-item.medium-priority {
    border-left-color: var(--apple-orange);
}

.action-plan-item.medium-priority::before {
    border-color: var(--apple-orange);
}

.action-plan-item.low-priority {
    border-left-color: var(--apple-green);
}

.action-plan-item.low-priority::before {
    border-color: var(--apple-green);
}

.action-plan-actions {
    background: var(--apple-gray-100);
    border-radius: 12px;
    padding: 15px 20px;
    margin-top: 15px;
}

/* Admin */
.admin-body {
    background-color: var(--apple-gray-200);
}

.admin-nav {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.admin-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    height: 100%;
}

.admin-stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.admin-stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 16px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--apple-gray-400);
}

.admin-table {
    font-size: 0.9rem;
}

.domain-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--apple-gray-200);
}

.domain-item:last-child {
    border-bottom: none;
}

/* Base Buttons */
.btn-primary {
    background-color: var(--apple-blue);
    border-color: var(--apple-blue);
    border-radius: 8px;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--apple-blue-hover);
    border-color: var(--apple-blue-hover);
}

.btn-outline-primary {
    color: var(--apple-blue);
    border-color: var(--apple-blue);
    border-radius: 8px;
}

.btn-outline-primary:hover {
    background-color: var(--apple-blue);
    border-color: var(--apple-blue);
}

.app-footer {
    padding: 60px 0 30px;
    margin-top: 60px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
}

/* =========================================
   ANALYZE PROGRESS OVERLAY
========================================= */
#analyzeOverlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: overlayIn 0.25s ease;
}

@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.analyze-overlay-inner {
    text-align: center;
    padding: 40px 32px;
    max-width: 480px;
    width: 90%;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.10);
    border: 1px solid rgba(0, 113, 227, 0.1);
}

.analyze-spinner {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    animation: spinnerRot 1s linear infinite;
}

@keyframes spinnerRot {
    to { transform: rotate(360deg); }
}

.analyze-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.analyze-bar-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.analyze-bar-track {
    flex: 1;
    height: 8px;
    background: #f0f0f5;
    border-radius: 100px;
    overflow: hidden;
}

.analyze-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0071e3, #5856d6);
    border-radius: 100px;
    transition: width 0.25s ease;
}

.analyze-pct {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0071e3;
    min-width: 36px;
    text-align: right;
}

.analyze-step {
    font-size: 0.9rem;
    color: #6e6e73;
    min-height: 1.4em;
    transition: opacity 0.3s ease;
}

.analyze-hint {
    font-size: 0.78rem;
    color: #aeaeb2;
    margin-top: 8px;
}

/* =========================================
   PRINT / PDF STYLES
========================================= */
@media print {
    /* --- Base --- */
    body {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
        background: #fbfbfd !important;
        font-size: 11pt !important;
        line-height: 1.4 !important;
    }

    @page {
        size: A4;
        margin: 15mm 12mm;
    }

    /* --- Hide non-print elements --- */
    .app-navbar,
    .app-footer,
    .cookie-banner,
    .pdf-hide,
    #mainNavbar,
    .navbar,
    footer {
        display: none !important;
    }

    /* --- Remove excess spacing from report section --- */
    .report-section {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* --- Layout: two-column grid for result cards --- */
    .row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin: 0 !important;
    }

    .row.g-4 {
        gap: 12px !important;
    }

    .col-md-6 {
        flex: 0 0 48% !important;
        max-width: 48% !important;
        padding: 0 !important;
        margin-bottom: 12px !important;
    }

    .col-md-5,
    .col-md-7 {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    .col-lg-4,
    .col-lg-8,
    .col-12 {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    /* Score card centered */
    .row.justify-content-center {
        display: flex !important;
        justify-content: center !important;
    }

    .row.justify-content-center .col-md-7 {
        flex: 0 0 60% !important;
        max-width: 60% !important;
    }

    /* --- Cards --- */
    .result-card,
    .score-card {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        height: auto !important;
        min-height: 0 !important;
        margin-bottom: 12px !important;
        box-shadow: none !important;
        border: 1px solid #e0e0e0 !important;
    }

    .result-card {
        padding: 16px !important;
    }

    /* --- Section spacing --- */
    .mb-5 {
        margin-bottom: 20px !important;
    }

    .mb-4 {
        margin-bottom: 14px !important;
    }

    .mt-4 {
        margin-top: 14px !important;
    }

    .mt-5 {
        margin-top: 20px !important;
    }

    .pt-4 {
        padding-top: 14px !important;
    }

    /* --- Headings: minimal spacing --- */
    .results-title {
        font-size: 1.1rem !important;
        margin-bottom: 10px !important;
        page-break-after: avoid !important;
        break-after: avoid !important;
    }

    .report-header {
        margin-bottom: 10px !important;
    }

    .report-url {
        font-size: 1.2rem !important;
    }

    /* --- Result header flex --- */
    .result-header {
        display: flex !important;
        align-items: flex-start !important;
    }

    .d-flex.align-items-center.justify-content-between {
        display: flex !important;
        margin-bottom: 10px !important;
        page-break-after: avoid !important;
        break-after: avoid !important;
    }

    /* --- Alert block: don't split --- */
    .alert {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* --- Score circle --- */
    .score-card {
        padding: 20px !important;
    }

    .score-circle {
        width: 120px !important;
        height: 120px !important;
    }

    .score-value {
        font-size: 2.2rem !important;
    }

    .score-label {
        font-size: 0.8rem !important;
    }

    /* --- Action plan items --- */
    .action-plan-item {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        border-left: 0 !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
        border: 1px solid #eaeaea !important;
        padding: 18px !important;
        border-radius: 12px !important;
        margin-bottom: 12px !important;
        box-shadow: none !important;
    }

    .action-plan-item::before {
        display: none !important;
    }

    .action-plan-item.high-priority {
        border-top: 4px solid var(--apple-red) !important;
    }

    .action-plan-item.medium-priority {
        border-top: 4px solid var(--apple-orange) !important;
    }

    .action-plan-item.low-priority {
        border-top: 4px solid var(--apple-green) !important;
    }

    /* --- Code blocks in action plan --- */
    .code-patch-wrapper pre {
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
        font-size: 0.75rem !important;
        max-height: none !important;
        overflow: visible !important;
    }

    /* --- Hide locked action plan & paywall in print --- */
    .action-plan-locked {
        display: none !important;
    }

    .paywall-overlay {
        display: none !important;
    }

    /* --- Hide paywall warning alert for unpaid --- */
    .alert-warning {
        page-break-inside: avoid !important;
    }

    /* --- Links: don't show URL after text --- */
    a[href]::after {
        content: none !important;
    }

    /* --- Badges print with colors --- */
    .badge {
        border: 1px solid currentColor !important;
    }

    /* --- Progress bars --- */
    .progress {
        background-color: #e9ecef !important;
    }

    .progress-bar {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* --- AI opinion & simulation block --- */
    .ai-opinion-text {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* AI simulator card: keep icon + title + text together */
    .mb-5 > .result-card[style*="border:2px"] {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* --- Hide blurred/locked content in print --- */
    .premium-result-card .result-details[style*="blur"],
    .premium-result-card .result-score-bar[style*="blur"] {
        display: none !important;
    }

    /* Remove inline blur/opacity from premium cards (locked state) */
    .premium-result-card .position-absolute {
        display: none !important;
    }

    /* --- Score scale --- */
    .score-scale-item {
        page-break-inside: avoid !important;
    }
}

/* ========== PDF Show/Hide helpers ========== */
.pdf-show {
    display: none !important;
}

/* ========== PDF Rendering Mode (html2pdf.js) ========== */
.pdf-rendering .app-navbar,
.pdf-rendering .app-footer,
.pdf-rendering .cookie-banner,
.pdf-rendering .pdf-hide,
.pdf-rendering footer {
    display: none !important;
}

.pdf-rendering .pdf-show {
    display: flex !important;
}

.pdf-rendering .container {
    max-width: 100% !important;
    padding: 0 10px !important;
}

.pdf-rendering .report-section {
    padding-top: 0 !important;
}

/* Single-column layout for cleaner PDF */
.pdf-rendering .col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

.pdf-rendering .row.g-4 {
    gap: 8px !important;
}

/* Cards: compact with no shadows, allow page breaks inside */
.pdf-rendering .result-card,
.pdf-rendering .score-card {
    box-shadow: none !important;
    border: 1px solid #e0e0e0 !important;
    margin-bottom: 8px !important;
    padding: 12px !important;
}

/* Action plan: compact */
.pdf-rendering .action-plan-item {
    border-left: 0 !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    border: 1px solid #eaeaea !important;
    padding: 14px !important;
    border-radius: 12px !important;
    margin-bottom: 8px !important;
    box-shadow: none !important;
}

.pdf-rendering .action-plan-item::before {
    display: none !important;
}

.pdf-rendering .action-plan-item.high-priority {
    border-top: 4px solid var(--apple-red) !important;
}

.pdf-rendering .action-plan-item.medium-priority {
    border-top: 4px solid var(--apple-orange) !important;
}

.pdf-rendering .action-plan-item.low-priority {
    border-top: 4px solid var(--apple-green) !important;
}

/* Reduce spacing */
.pdf-rendering .mb-5 {
    margin-bottom: 15px !important;
}

.pdf-rendering .mb-4 {
    margin-bottom: 10px !important;
}

/* Score circle smaller */
.pdf-rendering .score-card {
    padding: 16px !important;
}

.pdf-rendering .score-circle {
    width: 100px !important;
    height: 100px !important;
}

.pdf-rendering .score-value {
    font-size: 2rem !important;
}

.pdf-rendering .score-card .mt-4 {
    margin-top: 10px !important;
}

.pdf-rendering .score-card .mb-4 {
    margin-bottom: 8px !important;
}

/* Code blocks wrap */
.pdf-rendering .code-patch-wrapper pre {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    font-size: 0.75rem !important;
}

/* Hide locked content */
.pdf-rendering .action-plan-locked,
.pdf-rendering .paywall-overlay {
    display: none !important;
}

/* No page-break-inside: avoid on large containers — let content flow naturally */
/* Only avoid breaks on small inline elements like headers and badges */
.pdf-rendering .results-title,
.pdf-rendering .action-plan-title {
    page-break-after: avoid !important;
    break-after: avoid !important;
}

/* ========== Cookie Consent Banner ========== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 0 16px 16px;
    animation: cookieSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cookieSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-banner-inner {
    max-width: 680px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.cookie-banner-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.cookie-banner-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--apple-blue), #5856d6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.cookie-banner-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--apple-gray-800);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.cookie-banner-desc {
    font-size: 0.82rem;
    color: var(--apple-gray-400);
    line-height: 1.55;
    margin: 0;
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, var(--apple-blue), #5856d6);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px 22px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
}

.cookie-btn-accept:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.35);
    color: white;
}

.cookie-btn-reject {
    background: var(--apple-gray-200);
    color: var(--apple-gray-800);
    border: none;
    border-radius: 12px;
    padding: 10px 22px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
}

.cookie-btn-reject:hover {
    background: #e8e8ed;
}

.cookie-privacy-link {
    font-size: 0.8rem;
    color: var(--apple-blue);
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
}

.cookie-privacy-link:hover {
    text-decoration: underline;
}

@media (max-width: 576px) {
    .cookie-banner-inner {
        padding: 20px;
        border-radius: 16px;
    }

    .cookie-banner-content {
        gap: 12px;
    }

    .cookie-banner-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 1rem;
    }

    .cookie-banner-actions {
        gap: 8px;
    }

    .cookie-btn-accept,
    .cookie-btn-reject {
        flex: 1;
        text-align: center;
        padding: 10px 16px;
    }

    .cookie-privacy-link {
        width: 100%;
        text-align: center;
    }
}