
    .card-image-overlay {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
      padding: 1.5rem;
    }
    .loading-spinner {
      animation: spin 1s linear infinite;
    }
    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    .file-upload label {
    transition: all 0.3s ease;
}

.file-upload label:hover {
    border-color: #ef4444;
}


details summary {
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::after {
    content: '▼';
    float: right;
    font-size: 12px;
    transition: transform 0.3s ease;
}

details[open] summary::after {
    transform: rotate(180deg);
}

/* Line clamp utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-none {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: visible;
}







/* Базовые стили для заголовков в контенте */
.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 {
    font-weight: bold;
    margin: 1rem 0 0.5rem 0;
    display: block;
}

.content h1 { font-size: 2rem; }
.content h2 { font-size: 1.5rem; }
.content h3 { font-size: 1.25rem; }
.content h4 { font-size: 1.125rem; }
.content h5 { font-size: 1rem; }
.content h6 { font-size: 0.875rem; }

.content strong, .content b { font-weight: bold; }
.content em, .content i { font-style: italic; }
.content p { margin: 0.5rem 0; }

/* Tooltip styles */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 400px;
    max-width: 200vw;
    background-color: #1f2937;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 12px;
    position: absolute;
    z-index: 99999;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    line-height: 1.4;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #374151;
    word-wrap: break-word;
    white-space: normal;
    pointer-events: none;
    /* Prevent overflow off-screen */
    right: auto;
}

/* Keep tooltip within viewport horizontally */
/* (убрано экспериментальное translate/inset-inline-start/contain чтобы не ломать показ) */

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}


.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Dark mode tooltip */
.dark .tooltip .tooltiptext {
    background-color: #111827;
    border-color: #374151;
}

.dark .tooltip .tooltiptext::after {
    border-color: #111827 transparent transparent transparent;
}

/* Tooltip icon */
.tooltip-icon {
    color: #6b7280;
    margin-left: 4px;
    font-size: 12px;
}

/* Global border-radius normalization to Tailwind rounded-md */
:root {
    --app-radius: 0.375rem; /* equals Tailwind rounded-md */
}

/* Normalize common rounded classes to the same radius (exclude fully round) */
.rounded,
.rounded-sm,
.rounded-md,
.rounded-lg,
.rounded-xl,
.rounded-2xl,
.rounded-3xl {
    border-radius: var(--app-radius) !important;
}

/* Wide tooltip for company descriptions */
.tooltip-wide .tooltiptext {
    width: 600px;
    max-width: 200vw;
    text-align: left;
    white-space: normal;
    line-height: 1.5;
}

.tooltip:hover .tooltip-icon {
    color: #3b82f6;
}

/* Мобильные стили для тултипов */
@media (max-width: 768px) {
    .tooltip .tooltiptext {
        width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
        font-size: 13px;
        padding: 10px;
        bottom: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%);
        position: absolute;
        z-index: 99999;
        /* Отступы от краев экрана */
        margin-left: 20px;
        margin-right: 20px;
    }
    
    .tooltip .tooltiptext::after {
        top: 100%;
        left: 50%;
        margin-left: -5px;
    }
    
    /* Широкие тултипы для описаний */
    .tooltip-wide .tooltiptext {
        width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
        margin-left: 20px;
        margin-right: 20px;
    }
}

@media (max-width: 480px) {
    .tooltip .tooltiptext {
        width: calc(50vw - 30px);
        max-width: calc(50vw - 30px);
        font-size: 10px;
        padding: 8px;
        line-height: 1.3;
        /* Отступы от краев экрана */
        margin-left: 15px;
    }
    
    .tooltip-wide .tooltiptext {
        width: calc(80vw - 30px);
        max-width: calc(80vw - 30px);
        margin-left: 1px;
    }
    
    .tooltip-icon {
        font-size: 11px;
    }
}

/* Ensure tooltips are not clipped by parent containers */
.card, .grid, .space-y-1, .flex, .company-card, .bg-white, .dark\\:bg-gray-800, .rounded-lg, .shadow-md, .overflow-hidden, .metrics, .metric {
    overflow: visible !important;
}


/* Ensure cards don't clip tooltips */
.card, .company-card {
    overflow: visible !important;
}

/* Мини-логотип из 4 полос для шапки */
.brand-logo {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* центрируем полосы, чтобы сужение шло к центру */
    gap: 2px;
    position: relative; /* для оверлея градиента */
    /* Глобальный градиент по умолчанию (светлая тема): от тёмного к красному (цвет СТАТУС) */
    --brand-gradient: linear-gradient(to bottom, #1f2937 0%, #dc2626 100%);
}
.brand-bar {
    display: block;
    height: 3px; /* высота в 2 раза уже */
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    /* Срез общего градиента контейнера */
    background-image: var(--brand-gradient);
    background-repeat: no-repeat;
    background-size: 100% 28px; /* 6 полос по 3px + 5 зазоров по 2px = 28px */
}
/* Сужение к центру вниз (перевернутый треугольник): сверху шире, к низу уже */
.brand-bar-1 { width: 26px; }
.brand-bar-2 { width: 22px; }
.brand-bar-3 { width: 18px; }
.brand-bar-4 { width: 14px; }
.brand-bar-5 { width: 10px; }
.brand-bar-6 { width: 6px; }

/* Смещение фоновой позиции для каждого среза */
.brand-bar-1 { background-position: left 0 top 0; }
.brand-bar-2 { background-position: left 0 top -5px; }
.brand-bar-3 { background-position: left 0 top -10px; }
.brand-bar-4 { background-position: left 0 top -15px; }
.brand-bar-5 { background-position: left 0 top -20px; }
.brand-bar-6 { background-position: left 0 top -25px; }

/* Тёмная тема: общий градиент контейнера сверху вниз от красного (СТАТУС) к белому */
.dark .brand-logo { --brand-gradient: linear-gradient(to bottom, #dc2626 0%, #ffffff 100%); }

/* Вертикальный оверлей-градиент сверху вниз для всей воронки */
.brand-logo::before {
    content: "";
    position: absolute;
    inset: 0; /* покрывает всю высоту/ширину стека полос */
    pointer-events: none;
    border-radius: 6px;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.18) 0%,   /* мягкий верхний блик */
        rgba(255,255,255,0.06) 40%,
        rgba(0,0,0,0.10) 100%        /* лёгкая нижняя тень */
    );
    mix-blend-mode: soft-light; /* аккуратное смешивание с разными цветами полос */
}

.dark .brand-logo::before {
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.08) 0%,
        rgba(255,255,255,0.04) 40%,
        rgba(0,0,0,0.25) 100%
    );
    mix-blend-mode: overlay;
}

/* Анимация 3: пружина (spring) при появлении и лёгкий bounce на hover */
@keyframes funnelSpring {
    0% { transform: translateY(-8px) scaleX(0.9); opacity: 0; }
    60% { transform: translateY(2px) scaleX(1.05); opacity: 1; }
    85% { transform: translateY(-1px) scaleX(0.98); }
    100% { transform: translateY(0) scaleX(1); }
}

@keyframes funnelBounce {
    0% { transform: translateY(0) scaleX(1); }
    40% { transform: translateY(2px) scaleX(1.04); }
    70% { transform: translateY(-1px) scaleX(0.98); }
    100% { transform: translateY(0) scaleX(1); }
}

.brand-bar {
    animation: funnelSpring 1800ms cubic-bezier(.2,.8,.2,1) both;
}
.brand-bar-1 { animation-delay: 0ms; }
.brand-bar-2 { animation-delay: 160ms; }
.brand-bar-3 { animation-delay: 280ms; }
.brand-bar-4 { animation-delay: 380ms; }
.brand-bar-5 { animation-delay: 500ms; }
.brand-bar-6 { animation-delay: 620ms; }

/* Небольшой bounce при hover на ссылке-логотипе */
a:hover .brand-bar {
    animation: funnelBounce 960ms cubic-bezier(.2,.8,.2,1);
}

/* Specific fix for company cards */
.company-card.overflow-hidden {
    overflow: visible !important;
}

/* Specific fix for rating block */
.metrics, .metric {
    overflow: visible !important;
    position: relative;
}



/* Стили для карточек компаний */
.card-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    position: relative;
    overflow: visible;
}

.company-card {
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.company-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Стили для аккордеона */
.accordion-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.accordion-tab {
    background-color: #f3f4f6;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    border-radius: 0.5rem;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark .accordion-tab {
    background-color: #374151;
    color: #f3f4f6;
}

.accordion-tab:hover {
    background-color: #e5e7eb;
}

.dark .accordion-tab:hover {
    background-color: #4B5563;
}

.accordion-tab.active {
    background-color: #dc2626;
    color: white;
    font-weight: 600;
}

.accordion-content {
    display: none;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 8px;
}

.dark .accordion-content {
    border-color: #4B5563;
}

.accordion-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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


/* Стили для чипов */
.chip {
    display: inline-block;
    padding: 0.1rem 0.3rem;
    border-radius: var(--app-radius);
    font-size: 0.7rem;
    font-weight: 500;
}



/* Стили для логотипов компаний */
.company-logo {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.company-logo:hover {
    transform: scale(1.05);
}

/* Адаптивность для логотипов */
@media (max-width: 640px) {
    .company-logo {
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* Стили для блока "Ваша компания?" */
.company-cta-block {
    position: relative;
    overflow: hidden;
}

.company-cta-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 51, 234, 0.05) 100%);
    pointer-events: none;
}

.company-cta-block .bg-primary-100 {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Адаптивность для блока CTA */
@media (max-width: 640px) {
    .company-cta-block {
        padding: 0.75rem;
    }

    .company-cta-block h3 {
        font-size: 0.875rem;
    }

    .company-cta-block p {
        font-size: 0.75rem;
    }

    .company-cta-block .flex.flex-col.sm\\:flex-row.gap-2 {
        flex-direction: column;
        gap: 0.5rem;
    }

    .company-cta-block .flex.flex-col.sm\\:flex-row.gap-2 a {
        width: 100%;
        font-size: 0.75rem;
        padding: 0.375rem 1rem;
    }
}

/* Мобильные стили для карточек */
@media (max-width: 768px) {
    .company-card {
        margin: 0 8px;
        border-radius: 8px;
    }

    .card-head {
        padding: 12px;
        display: flex;
        align-items: initial;
        flex-direction: column;
        gap: 8px;
    }

    /* Первая строка: номер, название, статус */
    .title {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        margin-bottom: 0;
    }

    .title .number {
        font-size: 20px;
        margin-right: 8px;
        flex-shrink: 0;
    }

    .title strong {
        font-size: 16px;
        margin-right: 8px;
        flex: 1;
        min-width: 0;
    }

    .title .chip {
        margin-right: 8px;
        flex-shrink: 0;
        font-size: 12px;
        padding: 4px 8px;
    }

    .top-badge {
        margin-left: 12px;
        flex-shrink: 0;
        font-weight: bold;
        animation: pulse 2s infinite;
        padding: 4px 8px;
    }

    /* Вторая строка: логотип, рейтинг, сайт, презентация */
    .metrics {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
        margin-top: 0;
    }

    .company-logo {
        width: 50px !important;
        height: 14px !important;
        margin-right: 6px;
        flex-shrink: 0;
    }

    .metric {
        flex-shrink: 0;
    }

    .metric .v {
        font-size: 12px;
        padding: 1px 3px;
    }

    .chips {
        display: flex;
        gap: 4px;
        flex-wrap: nowrap;
        margin-left: auto;
    }

    .chips .chip {
        font-size: 10px;
        padding: 2px 6px;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .company-card {
        margin: 0 4px;
    }

    .card-head {
        padding: 8px;
    }

    .title .number {
        font-size: 18px;
    }

    .title strong {
        font-size: 14px;
    }

    .title .chip {
        font-size: 11px;
        padding: 3px 6px;
    }

    .top-badge {
        margin-left: 8px;
        padding: 3px 6px;
    }

    .company-logo {
        width: 40px !important;
        height: 12px !important;
    }

    .metrics {
        gap: 4px;
    }

    .metric .v {
        font-size: 12px;
        padding: 1px 4px;
    }

    .chips .chip {
        font-size: 9px;
        padding: 1px 4px;
    }
}

/* Article content safeguards - переопределяем внешние стили */
.content * {
    /* Сбрасываем все внешние стили */
    all: unset;
    display: revert;
    box-sizing: border-box;
    
    /* Агрессивно переопределяем все возможные стили */
    color: inherit !important;
    background: none !important;
    background-color: transparent !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    font-style: inherit !important;
    line-height: inherit !important;
    text-decoration: none !important;
    text-align: left !important;
    vertical-align: baseline !important;
    white-space: normal !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

.content {
    /* Базовые стили для контейнера */
    font-family: inherit;
    line-height: 1.6;
    color: inherit;
}

.content img,
.content video {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 1rem auto !important;
    border: none !important;
    padding: 0 !important;
    background: none !important;
}

.content figure {
    margin: 1rem 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

.content iframe {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9;
    height: auto !important;
    display: block !important;
    margin: 1rem 0 !important;
    border: none !important;
    padding: 0 !important;
    background: none !important;
}

.content table {
    width: 100% !important;
    border-collapse: collapse !important;
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0 !important;
    border: 1px solid #e5e7eb !important;
    background: none !important;
}

.content table th,
.content table td {
    border: 1px solid #e5e7eb !important;
    padding: 0.5rem 0.75rem !important;
    text-align: left !important;
    vertical-align: top !important;
    background: none !important;
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
}

.dark .content table th,
.dark .content table td {
    border-color: #374151 !important;
}

.content ul,
.content ol {
    padding-left: 1.25rem !important;
    margin: 0.5rem 0 !important;
    list-style: revert !important;
}

.content li {
    margin: 0.25rem 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

.content blockquote {
    border-left: 4px solid #e5e7eb !important;
    padding-left: 1rem !important;
    margin: 1rem 0 !important;
    color: #4b5563 !important;
    background: none !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
}

.dark .content blockquote {
    border-color: #374151 !important;
    color: #9ca3af !important;
}

.content pre,
.content code {
    overflow: auto !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
    background: #f3f4f6 !important;
    padding: 0.5rem !important;
    border-radius: 0.25rem !important;
    border: none !important;
    margin: 0.5rem 0 !important;
}

.dark .content pre,
.dark .content code {
    background: #374151 !important;
}

.content p {
    margin: 0.5rem 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    color: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

.content a {
    color: #3b82f6 !important;
    text-decoration: underline !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.content a:hover {
    color: #1d4ed8 !important;
}

.content strong,
.content b {
    font-weight: bold !important;
    background: none !important;
    color: inherit !important;
}

.content em,
.content i {
    font-style: italic !important;
    background: none !important;
    color: inherit !important;
}

.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 {
    font-weight: bold !important;
    margin: 1rem 0 0.5rem 0 !important;
    display: block !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    color: inherit !important;
}

.content h1 { font-size: 2rem !important; }
.content h2 { font-size: 1.5rem !important; }
.content h3 { font-size: 1.25rem !important; }
.content h4 { font-size: 1.125rem !important; }
.content h5 { font-size: 1rem !important; }
.content h6 { font-size: 0.875rem !important; }


