/* ============================================================
   modal.css — СТИЛИ ДЛЯ ВСЕХ МОДАЛОК
   ============================================================ */

/* --- ОБЩИЕ СТИЛИ ДЛЯ ОВЕРЛЕЯ --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 9999;
}

.modal-overlay.active {
    display: flex;
}

/* --- ОБЩИЕ СТИЛИ ДЛЯ МОДАЛКИ --- */
.modal {
    background: #0a120e;
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 16px;
    max-width: 780px;
    width: 100%;
    max-height: 95vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- ХЕДЕР МОДАЛКИ --- */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(34, 197, 94, 0.08);
    flex-shrink: 0;
}

.modal-header h2 {
    font-family: 'Fira Code', monospace;
    font-size: 20px;
    color: #fff;
    font-weight: 700;
}

.modal-header h2 i {
    margin-right: 10px;
}

/* --- КНОПКА ЗАКРЫТИЯ --- */
.modal-close {
    background: none;
    border: none;
    color: #5a7a6a;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    padding: 0 8px;
    line-height: 1;
}

.modal-close:hover {
    color: #22c55e;
    transform: rotate(90deg);
}

/* --- ТЕЛО МОДАЛКИ --- */
.modal-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
    flex: 1;
}

/* ЗЕЛЁНЫЙ СКРОЛЛ ДЛЯ ВСЕХ МОДАЛОК */
.modal-body::-webkit-scrollbar {
    width: 4px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.modal-body::-webkit-scrollbar-thumb {
    background: #22c55e;
    border-radius: 10px;
}

/* --- ФУТЕР МОДАЛКИ --- */
.modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid rgba(34, 197, 94, 0.08);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.modal-footer .btn {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.modal-footer .btn-primary {
    background: #22c55e;
    color: #0a120e;
    border: none;
}

.modal-footer .btn-primary:hover {
    background: #16a34a;
}

.modal-footer .btn-secondary {
    background: transparent;
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.modal-footer .btn-secondary:hover {
    background: rgba(34, 197, 94, 0.05);
    border-color: #22c55e;
}

/* ============================================================
   СПЕЦИАЛЬНЫЕ СТИЛИ ДЛЯ LOGIN МОДАЛКИ
   ============================================================ */

#loginModal {
    z-index: 99999 !important;
}

.modal-login {
    max-width: 440px;
}

.modal-login-body {
    padding: 24px 28px 28px;
}

.login-welcome {
    text-align: center;
    margin-bottom: 24px;
}

.login-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.1);
}

.login-welcome h3 {
    font-family: 'Fira Code', monospace;
    font-size: 18px;
    color: #fff;
    margin-bottom: 4px;
}

.login-welcome p {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    color: #8aa89a;
    line-height: 1.5;
}

.login-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
}



.yandex-icon {
    flex-shrink: 0;
}

.login-benefits {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: #8aa89a;
}

.benefit-item i {
    font-size: 14px;
}

.login-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(34, 197, 94, 0.04);
    border: 1px solid rgba(34, 197, 94, 0.06);
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: #5a7a6a;
    line-height: 1.4;
}

.login-info i {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ============================================================
   СПЕЦИАЛЬНЫЕ СТИЛИ ДЛЯ SUMMARY МОДАЛКИ (render.js)
   ============================================================ */

#summaryModal {
    z-index: 9999 !important;
}

/* Оверлей с блюром */
#summaryModal.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(10, 18, 14, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    padding: 20px !important;
    
    /* ГЛАВНОЕ ИЗМЕНЕНИЕ: центрируем по вертикали и горизонтали */
    justify-content: center !important;
    align-items: center !important;
    overflow-y: auto !important;
    z-index: 9999 !important;
}

#summaryModal.modal-overlay.active {
    display: flex !important;
}

/* Модалка — чистый контент без фона и бордеров */
#summaryModal .modal-summary {
    max-width: 960px !important;
    width: 100% !important;
    margin: 0 auto !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    max-height: none !important;
    height: auto !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    animation: modalFadeIn 0.4s ease !important;
    box-shadow: none !important;
    overflow: visible !important;
}

#summaryModal .modal-summary .modal-body {
    padding: 0 !important;
    max-height: none !important;
    overflow-y: visible !important;
    background: transparent !important;
}

/* ЗЕЛЁНЫЙ СКРОЛЛ ДЛЯ SUMMARY МОДАЛКИ */
#summaryModal .modal-summary .modal-body::-webkit-scrollbar {
    width: 4px !important;
}

#summaryModal .modal-summary .modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02) !important;
}

#summaryModal .modal-summary .modal-body::-webkit-scrollbar-thumb {
    background: #22c55e !important;
    border-radius: 10px !important;
}

/* Хедер summary модалки */
#summaryModal .modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 0 16px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: transparent !important;
    margin-bottom: 20px !important;
}

#summaryModal .modal-header h2 {
    font-size: 20px !important;
    margin: 0 !important;
    color: #e6f0ea !important;
    font-family: 'Fira Code', monospace !important;
}

#summaryModal .modal-header h2 i {
    color: #22c55e !important;
    margin-right: 10px !important;
}

/* Кнопка закрытия summary модалки */
#summaryModal .modal-close {
    font-size: 20px !important;
    color: #8aa89a !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    line-height: 1 !important;
    font-family: 'Fira Code', monospace !important;
}

#summaryModal .modal-close:hover {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
    transform: rotate(90deg) !important;
}

/* Скрываем кнопку закрытия из контента render.js */
#summaryContent .close-btn {
    display: none !important;
}

/* ============================================================
   STYLES FOR SUMMARY CONTENT (Центрирование и рамка)
   ============================================================ */
#summaryContent {
    display: block;
    width: 100%;
    max-width: 960px;
    margin: 0 auto; /* Убрали 15vh и добавили margin: 0 auto */
    padding: 30px;
    background: #0d0f16;
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    font-family: 'Fira Code', monospace;
    color: #eaeef5;
}

/* ============================================================
   АДАПТИВНОСТЬ ДЛЯ SUMMARY МОДАЛКИ
   ============================================================ */

/* Планшеты (до 768px) */
@media (max-width: 768px) {
    #summaryModal.modal-overlay {
        padding: 16px !important;
        justify-content: center !important;
        align-items: center !important;
        overflow-y: auto !important;
    }
    
    #summaryModal .modal-summary {
        margin: 0 auto !important;
        max-height: 90vh !important;
    }
}

/* Мобильные телефоны (до 480px) */
@media (max-width: 480px) {
    /* Login модалка */
    .modal {
        max-width: 100% !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        height: 100vh !important;
    }
    
    .modal-header {
        padding: 16px 16px 12px !important;
    }
    
    .modal-body {
        padding: 16px !important;
    }
    
    .modal-footer {
        padding: 12px 16px 16px !important;
        justify-content: center !important;
    }
    
    .modal-header h2 {
        font-size: 17px !important;
    }
    
    .modal-login-body {
        padding: 16px 20px 20px !important;
    }
    
    .login-welcome h3 {
        font-size: 16px !important;
    }
    
    .login-icon {
        width: 56px !important;
        height: 56px !important;
        font-size: 24px !important;
    }
    
    .login-oauth-btn {
        font-size: 14px !important;
        padding: 12px 16px !important;
    }
    
    /* Summary модалка */
    #summaryModal.modal-overlay {
        padding: 10px !important;
        background: rgba(10, 18, 14, 0.7) !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    #summaryModal .modal-summary {
        margin: 0 auto !important;
        max-height: 90vh !important;
    }
    
    #summaryModal .modal-header {
        padding: 0 0 12px 0 !important;
        margin-bottom: 16px !important;
    }
    
    #summaryModal .modal-header h2 {
        font-size: 17px !important;
    }
    
    #summaryModal .modal-close {
        width: 36px !important;
        height: 36px !important;
        font-size: 18px !important;
    }
}

/* Очень маленькие экраны (до 360px) */
@media (max-width: 360px) {
    #summaryModal.modal-overlay {
        padding: 6px !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    #summaryModal .modal-summary {
        margin: 0 auto !important;
    }
}

/* ============================================================
   УТИЛИТЫ
   ============================================================ */

/* Скрытие на мобильных */
@media (max-width: 480px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Цвета для статусов */
.text-success { color: #22c55e; }
.text-danger { color: #ef4444; }
.text-warning { color: #fbbf24; }
.text-info { color: #3b82f6; }


/* ============================================================
   МОДАЛКА
   ============================================================ */
.hiw-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hiw-modal.active {
    display: flex;
}

.hiw-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 8, 11, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.hiw-modal-content {
    position: relative;
    background: var(--bg-card, #0a0c12);
    border: 1px solid var(--border-color, #1a1f2e);
    border-radius: 20px;
    width: 100%;
    max-width: 980px;
    max-height: 90vh;
    overflow-y: auto;
    color: var(--text-primary, #eaeef5);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9);
    animation: hiwModalIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes hiwModalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
/* ============================================================
   ЦЕНЫ В МОДАЛКЕ «КАК ЭТО РАБОТАЕТ»
   ============================================================ */
.hiw-pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: stretch;
}

.hiw-pricing-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
}

.hiw-pricing-card-pro {
    border-color: rgba(34, 197, 94, 0.4);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.06), rgba(255, 255, 255, 0.02));
    box-shadow: 0 12px 40px -20px rgba(34, 197, 94, 0.4);
}

.hiw-pricing-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    align-self: flex-start;
}

.hiw-pricing-badge-free {
    background: rgba(138, 148, 166, 0.12);
    color: #8aa89a;
    border: 1px solid rgba(138, 148, 166, 0.15);
}

.hiw-pricing-badge-pro {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.hiw-pricing-discount {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.hiw-pricing-price {
    font-family: 'Fira Code', monospace;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.02em;
}

.hiw-pricing-sub {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: #8aa89a;
    margin-top: 6px;
    margin-bottom: 4px;
}

.hiw-pricing-old {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #8aa89a;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    margin-bottom: 8px;
}

.hiw-pricing-timer {
    display: inline-block;
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(251, 191, 36, 0.15);
    margin-bottom: 14px;
    align-self: flex-start;
}

.hiw-pricing-features {
    list-style: none;
    padding: 0;
    margin: 12px 0 18px;
    flex: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 14px;
}

.hiw-pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 0.78rem;
    line-height: 1.5;
    padding: 5px 0;
    color: #e6f0ea;
}

.hiw-pricing-features li i {
    color: #22c55e;
    font-size: 0.7rem;
    width: 14px;
    flex-shrink: 0;
    margin-top: 4px;
}

.hiw-pricing-features li.muted {
    color: #4a536b;
}

.hiw-pricing-features li.muted i {
    color: #4a536b;
}

.hiw-pricing-features li strong {
    font-weight: 500;
    color: inherit;
}

.hiw-pricing-card-pro .hiw-pricing-features li {
    color: #fff;
}

.hiw-pricing-card-pro .hiw-pricing-features li strong {
    font-weight: 600;
}

.hiw-pricing-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid transparent;
    margin-top: auto;
}

.hiw-pricing-btn-ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e6f0ea;
}

.hiw-pricing-btn-ghost:hover {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.05);
}

.hiw-pricing-btn-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #0a120e;
    box-shadow: 0 8px 24px -10px rgba(34, 197, 94, 0.6);
}

.hiw-pricing-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px -10px rgba(34, 197, 94, 0.8);
}

/* ============================================================
   СВЕТЛАЯ ТЕМА для блока цен в модалке
   ============================================================ */
body.light-theme .hiw-pricing-card {
    background: #f8f9fb;
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .hiw-pricing-card-pro {
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.07), #f0fdf4);
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 12px 40px -20px rgba(34, 197, 94, 0.35);
}

body.light-theme .hiw-pricing-badge-free {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
    border-color: rgba(100, 116, 139, 0.15);
}

body.light-theme .hiw-pricing-price {
    color: #0a120e;
}

body.light-theme .hiw-pricing-sub,
body.light-theme .hiw-pricing-old {
    color: #64748b;
}

body.light-theme .hiw-pricing-features {
    border-top-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .hiw-pricing-features li {
    color: #0a120e;
}

body.light-theme .hiw-pricing-features li i {
    color: #16a34a;
}

body.light-theme .hiw-pricing-features li.muted,
body.light-theme .hiw-pricing-features li.muted i {
    color: #94a3b8;
}

body.light-theme .hiw-pricing-card-pro .hiw-pricing-features li {
    color: #0a120e;
}

body.light-theme .hiw-pricing-btn-ghost {
    border-color: rgba(0, 0, 0, 0.1);
    color: #0a120e;
}

body.light-theme .hiw-pricing-btn-ghost:hover {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.06);
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 640px) {
    .hiw-pricing-grid {
        grid-template-columns: 1fr;
    }
    .hiw-pricing-price {
        font-size: 1.4rem;
    }
}

/* ============================================================
   ПРЕВЬЮ ОТЧЁТА В МОДАЛКЕ
   ============================================================ */
.hiw-preview {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 20px;
    overflow: hidden;
    font-family: 'Fira Code', monospace;
}

/* Шапка */
.hiw-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.7rem;
}

.hiw-preview-domain {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e6f0ea;
    font-weight: 600;
}
.hiw-preview-domain i {
    color: #22c55e;
    font-size: 0.7rem;
}

.hiw-preview-blur {
    color: rgba(255, 255, 255, 0.15);
    user-select: none;
    margin-left: 2px;
}

.hiw-preview-date {
    color: #4a536b;
    font-size: 0.65rem;
}
.hiw-preview-date i {
    color: #6c5ce7;
    margin-right: 4px;
}

/* Скор */
.hiw-preview-score {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.hiw-preview-ring {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.hiw-preview-ring svg {
    width: 100%;
    height: 100%;
}

.hiw-preview-ring-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.hiw-preview-num {
    font-size: 1.1rem;
    font-weight: 800;
    color: #f97316;
}

.hiw-preview-out {
    font-size: 0.5rem;
    color: #4a536b;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hiw-preview-status {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.hiw-preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.hiw-preview-badge-warn {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.hiw-preview-count {
    font-size: 0.62rem;
    color: #8aa89a;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Разделы */
.hiw-preview-sections {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.hiw-preview-section {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 10px 14px;
}

.hiw-preview-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #e6f0ea;
    margin-bottom: 6px;
}

.hiw-preview-icon-fail { color: #ef4444; }
.hiw-preview-icon-ok { color: #22c55e; }
.hiw-preview-icon-warn { color: #fbbf24; }

.hiw-preview-tag {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hiw-preview-tag-fail {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.hiw-preview-tag-ok {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.15);
}

.hiw-preview-tag-warn {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.15);
}

.hiw-preview-section-body {
    font-size: 0.68rem;
    color: #8aa89a;
    line-height: 1.55;
}

.hiw-preview-section-body strong { color: #e6f0ea; font-weight: 600; }
.hiw-preview-section-body code {
    background: rgba(108, 92, 231, 0.1);
    color: #a78bfa;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.65rem;
}

/* Рекомендации */
.hiw-preview-recs {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.hiw-preview-recs-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #e6f0ea;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hiw-preview-recs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hiw-preview-rec {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.65rem;
    line-height: 1.5;
    color: #8aa89a;
}

.hiw-preview-rec i {
    flex-shrink: 0;
    margin-top: 3px;
    font-size: 0.6rem;
}

.hiw-preview-rec-critical i { color: #ef4444; }
.hiw-preview-rec-high i { color: #f97316; }
.hiw-preview-rec-more i { color: #6c5ce7; }

.hiw-preview-rec strong { color: #e6f0ea; font-weight: 600; }
.hiw-preview-rec code {
    background: rgba(108, 92, 231, 0.1);
    color: #a78bfa;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.6rem;
}

.hiw-preview-rec-more {
    color: #6c5ce7;
    font-style: italic;
    padding-top: 4px;
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
    margin-top: 4px;
}

/* Затемнение снизу */
.hiw-preview-blur-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background: linear-gradient(180deg, transparent, rgba(10, 12, 18, 0.9) 60%);
    pointer-events: none;
    z-index: 1;
}

/* CTA внизу */
.hiw-preview-cta {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}

.hiw-preview-cta-text {
    font-size: 0.72rem;
    color: #8aa89a;
    line-height: 1.4;
}
.hiw-preview-cta-text strong { color: #e6f0ea; font-weight: 600; }

.hiw-preview-cta-price {
    font-size: 1rem;
    font-weight: 800;
    color: #22c55e;
    white-space: nowrap;
}
.hiw-preview-cta-price span {
    font-size: 0.65rem;
    color: #4a536b;
    font-weight: 500;
}

/* ============================================================
   СВЕТЛАЯ ТЕМА
   ============================================================ */
body.light-theme .hiw-preview {
    background: #f8f9fb;
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .hiw-preview-header {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .hiw-preview-domain {
    color: #0a120e;
}

body.light-theme .hiw-preview-blur {
    color: rgba(0, 0, 0, 0.2);
}

body.light-theme .hiw-preview-score {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .hiw-preview-section,
body.light-theme .hiw-preview-recs {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .hiw-preview-section-head,
body.light-theme .hiw-preview-recs-title {
    color: #0a120e;
}

body.light-theme .hiw-preview-section-body,
body.light-theme .hiw-preview-rec,
body.light-theme .hiw-preview-count,
body.light-theme .hiw-preview-cta-text {
    color: #64748b;
}

body.light-theme .hiw-preview-section-body strong,
body.light-theme .hiw-preview-rec strong,
body.light-theme .hiw-preview-cta-text strong {
    color: #0a120e;
}

body.light-theme .hiw-preview-section-body code,
body.light-theme .hiw-preview-rec code {
    background: rgba(108, 92, 231, 0.08);
    color: #6c5ce7;
}

body.light-theme .hiw-preview-blur-overlay {
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.95) 60%);
}

body.light-theme .hiw-preview-cta {
    border-top-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .hiw-preview-cta-price {
    color: #16a34a;
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 640px) {
    .hiw-preview {
        padding: 14px;
    }
    .hiw-preview-score {
        padding: 10px 12px;
        gap: 12px;
    }
    .hiw-preview-ring {
        width: 56px;
        height: 56px;
    }
    .hiw-preview-num {
        font-size: 1rem;
    }
    .hiw-preview-section {
        padding: 8px 12px;
    }
    .hiw-preview-rec {
        font-size: 0.62rem;
    }
    .hiw-preview-cta {
        flex-direction: column;
        align-items: flex-start;
    }
}
.hiw-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color, #1a1f2e);
    color: var(--text-secondary, #8a94a6);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    z-index: 1;
    font-size: 1rem;
}

.hiw-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.hiw-modal-body {
    padding: 40px 44px 44px;
}

.hiw-modal-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
    color: var(--text-primary, #eaeef5);
}

.hiw-modal-lead {
    font-size: 0.95rem;
    color: var(--text-secondary, #8a94a6);
    line-height: 1.65;
    margin: 0 0 36px;
}

.hiw-modal-lead strong {
    color: var(--text-primary, #eaeef5);
    font-weight: 600;
}

.hiw-modal-block {
    margin-bottom: 36px;
}

.hiw-modal-block:last-child {
    margin-bottom: 0;
}

.hiw-modal-subtitle {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary, #eaeef5);
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}

.hiw-no {
    color: #ef4444;
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
}

/* Что проверяем */
.hiw-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hiw-check {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-base, #0d0f16);
    border: 1px solid var(--border-color, #1a1f2e);
    border-radius: 12px;
    align-items: flex-start;
}
.hiw-check.full {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-base, #0d0f16);
    border: 1px solid var(--border-color, #1a1f2e);
    border-radius: 12px;
    align-items: flex-start;
    grid-column: 1 / -1;
}
.hiw-check-icon {
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.hiw-check-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary, #eaeef5);
    margin-bottom: 4px;
}

.hiw-check-text {
    font-size: 0.78rem;
    color: var(--text-secondary, #8a94a6);
    line-height: 1.5;
}

/* Сравнение отчётов */
.hiw-report-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.hiw-report-col {
    background: var(--bg-base, #0d0f16);
    border: 1px solid var(--border-color, #1a1f2e);
    border-radius: 12px;
    padding: 20px;
}

.hiw-report-col-pro {
    border-color: rgba(34, 197, 94, 0.4);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.05), var(--bg-base, #0d0f16));
}

.hiw-report-col-head {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color, #1a1f2e);
}

.hiw-report-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-family: 'Fira Code', monospace;
}

.hiw-report-tag-free {
    background: rgba(138, 148, 166, 0.1);
    color: var(--text-secondary, #8a94a6);
}

.hiw-report-tag-pro {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.hiw-report-col-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary, #eaeef5);
}

.hiw-report-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hiw-report-list li {
    font-size: 0.83rem;
    color: var(--text-secondary, #8a94a6);
    padding: 6px 0 6px 20px;
    position: relative;
    line-height: 1.5;
}

.hiw-report-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 13px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color, #2a3345);
}

.hiw-report-col-pro .hiw-report-list li {
    color: var(--text-primary, #eaeef5);
}

.hiw-report-col-pro .hiw-report-list li::before {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.hiw-report-list strong {
    color: var(--text-primary, #eaeef5);
    font-weight: 600;
}

/* Шаги в модалке */
.hiw-modal-steps {
    padding-left: 20px;
    margin: 0;
}

.hiw-modal-steps li {
    font-size: 0.88rem;
    color: var(--text-secondary, #8a94a6);
    line-height: 1.65;
    padding: 6px 0;
    margin-bottom: 4px;
}

.hiw-modal-steps strong {
    color: var(--text-primary, #eaeef5);
    font-weight: 700;
}

/* Что не делаем */
.hiw-modal-donts {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.hiw-modal-donts li {
    font-size: 0.88rem;
    color: var(--text-secondary, #8a94a6);
    padding: 6px 0 6px 26px;
    position: relative;
    line-height: 1.55;
}

.hiw-modal-donts li::before {
    content: "\f00d";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 6px;
    color: #ef4444;
    font-size: 0.75rem;
}

.hiw-modal-note {
    font-size: 0.83rem;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
    border-left: 2px solid #22c55e;
    padding: 10px 14px;
    border-radius: 6px;
    margin: 0;
}

/* FAQ */
.hiw-faq {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hiw-faq-item {
    background: var(--bg-base, #0d0f16);
    border: 1px solid var(--border-color, #1a1f2e);
    border-radius: 10px;
    padding: 14px 18px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.hiw-faq-item[open] {
    border-color: rgba(34, 197, 94, 0.3);
}

.hiw-faq-item summary {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary, #eaeef5);
    list-style: none;
    position: relative;
    padding-right: 24px;
}

.hiw-faq-item summary::-webkit-details-marker {
    display: none;
}

.hiw-faq-item summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--text-secondary, #8a94a6);
    transition: transform 0.2s;
}

.hiw-faq-item[open] summary::after {
    content: "−";
    color: #22c55e;
}

.hiw-faq-item p {
    font-size: 0.83rem;
    color: var(--text-secondary, #8a94a6);
    line-height: 1.6;
    margin: 10px 0 0;
}

/* CTA в модалке */
.hiw-modal-cta {
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--border-color, #1a1f2e);
    margin-top: 36px;
    padding-top: 32px;
}

/* Адаптив модалки */
@media (max-width: 640px) {
    .hiw-modal {
        padding: 0;
        align-items: flex-end;
    }
    .hiw-modal-content {
        max-height: 95vh;
        border-radius: 20px 20px 0 0;
        border-bottom: none;
    }
    .hiw-modal-body {
        padding: 32px 20px 32px;
    }
    .hiw-modal-title {
        font-size: 1.4rem;
    }
    .hiw-checks,
    .hiw-report-compare {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   СВЕТЛАЯ ТЕМА для модалки «Как это работает»
   ============================================================ */
body.light-theme .hiw-modal-content {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    color: #0a120e;
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.3);
    scrollbar-color: #22c55e rgba(0, 0, 0, 0.03);
}

body.light-theme .hiw-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
}

body.light-theme .hiw-modal-close {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
    color: #64748b;
}

body.light-theme .hiw-modal-close:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Заголовки и акцентный текст */
body.light-theme .hiw-modal-title,
body.light-theme .hiw-modal-subtitle,
body.light-theme .hiw-modal-lead strong,
body.light-theme .hiw-check-title,
body.light-theme .hiw-report-col-title,
body.light-theme .hiw-report-list strong,
body.light-theme .hiw-modal-steps strong,
body.light-theme .hiw-faq-item summary {
    color: #0a120e;
}

/* Обычный текст */
body.light-theme .hiw-modal-lead,
body.light-theme .hiw-check-text,
body.light-theme .hiw-report-list li,
body.light-theme .hiw-modal-steps li,
body.light-theme .hiw-modal-donts li,
body.light-theme .hiw-faq-item p {
    color: #64748b;
}

/* Карточки «Что проверяем» */
body.light-theme .hiw-check {
    background: #f8f9fb;
    border-color: rgba(0, 0, 0, 0.06);
}

/* Сравнение отчётов */
body.light-theme .hiw-report-col {
    background: #f8f9fb;
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .hiw-report-col-pro {
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.06), #f8f9fb);
    border-color: rgba(34, 197, 94, 0.4);
}

body.light-theme .hiw-report-col-head {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .hiw-report-list li::before {
    background: rgba(0, 0, 0, 0.15);
}

body.light-theme .hiw-report-col-pro .hiw-report-list li {
    color: #0a120e;
}

/* FAQ */
body.light-theme .hiw-faq-item {
    background: #f8f9fb;
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .hiw-faq-item[open] {
    border-color: rgba(34, 197, 94, 0.4);
}

body.light-theme .hiw-faq-item summary::after {
    color: #64748b;
}

/* CTA */
body.light-theme .hiw-modal-cta {
    border-top-color: rgba(0, 0, 0, 0.06);
}

/* Плашка-примечание */
body.light-theme .hiw-modal-note {
    color: #16a34a;
    background: rgba(34, 197, 94, 0.08);
    border-left-color: #16a34a;
}

/* Иконки в квадратах */
body.light-theme .hiw-check-icon {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #16a34a;
}