/* Risk = News + только переопределения фона и Risk-специфики */
/* DuoView: акценты точечно, градации серого для глубины, не дешёвый жёлтый */

/* Все заголовки и текст строго по центру */
/* Пространство после hero секции - как на News (примерно 2см) */
.content > .news-hero {
    margin-top: 0 !important;
    margin-bottom: 96px !important;
    max-width: 720px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.news-hero-label,
.news-hero-title,
.news-hero-subtitle,
.news-hero-description,
.signal-noise,
.signal-noise-title,
.signal-noise-intro,
.news-trust-stats,
.news-trust-badge,
.news-trust-tagline,
.risk-section-calculator .news-today-title,
.risk-section-calculator .signal-noise-intro,
.risk-calculator-heading,
.results-title,
.strategy-info,
.strategy-title,
.strategy-allocation,
.why-section,
.why-title,
.why-content {
    text-align: center;
}
.why-title {
    justify-content: center;
}
.strategy {
    text-align: center;
}
.form-group,
.form-group label,
.api-key-summary,
.api-key-group,
.api-key-group label,
.api-key-hint,
.risk-calculator-container,
.form-wrapper {
    text-align: center;
}
.button-wrapper {
    display: flex;
    justify-content: center;
}
.risk-section,
.risk-section-calculator {
    text-align: center;
}

/* Переопределяем News-переменные для Risk (DuoView Pro палитра) */
:root {
    --news-bg: #001a00;
    --news-text: #F0F8F0;
    --news-accent: #9FE89F;
    --news-highlight: #FFFFFF;
    --news-subtle: #D0E8D0;
    --news-muted: #A8C8A8;
    --news-dim: #88B088;
    --risk-bg-base: #001800;
    --risk-accent: #9FE89F;
    --risk-accent-dim: rgba(159, 232, 159, 0.25);
    --risk-gold: #D4AF37;
    --risk-text-secondary: #555555;
    --risk-transition: 0.3s ease;
    --progress: 0%;
}

/* Фон Risk — зелёный */
body {
    background: #001a00 !important;
}
body::before {
    content: '' !important;
    background: 
        linear-gradient(rgba(150, 220, 150, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(150, 220, 150, 0.04) 1px, transparent 1px),
        radial-gradient(ellipse 120% 80% at 50% 0%, rgba(0, 80, 0, 0.2), transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 60, 0, 0.2), transparent 60%),
        #001a00 !important;
    background-size: 50px 50px, 50px 50px, 100% 100%, 100% 100%, 100% 100% !important;
    background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat !important;
}
body::after {
    background: rgba(0, 0, 0, 0.06) !important;
}

/* Футер Risk — как News, в зелёной палитре */
.news-footer {
    border-top-color: rgba(150, 220, 150, 0.15) !important;
    margin-top: 180px !important;
    padding: 40px 24px 0.5cm !important;
    position: relative;
    margin-bottom: 0 !important;
}

body {
    padding-bottom: 0 !important;
}

.page {
    padding-bottom: 0 !important;
}

.content {
    padding-bottom: 0 !important;
}

.news-footer::before {
    background: linear-gradient(90deg, transparent, rgba(159, 232, 159, 0.5), transparent) !important;
    top: 0 !important;
}

.news-footer-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85) !important;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.news-footer-crafted {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65) !important;
    margin: 16px 0 0;
    letter-spacing: 0.06em;
    font-family: 'Poppins', sans-serif;
}

.news-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
}

.news-footer-link {
    font-size: 13px;
    color: rgba(159, 232, 159, 0.9) !important;
    text-decoration: none;
    transition: color 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.news-footer-link:hover {
    color: #FFFFFF !important;
}

/* Футер в стиле главной: тот же фон с точками, градиент, цвет #0c0f14, шрифт Manrope, эффекты */
.news-footer.kro-footer {
    --kro-bg: #0a0c10;
    --kro-bg-mid: #0e1116;
    --kro-bg-soft: #13161c;
    padding: 48px 24px 72px !important;
    margin-top: 180px !important;
    text-align: center;
    font-family: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
}

.news-footer.kro-footer::before {
    display: none !important;
}

.news-footer.kro-footer .kro-footer-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse 32% 22% at 50% 30%, rgba(245, 158, 11, 0.05) 0%, transparent 55%),
                radial-gradient(ellipse 80% 60% at 50% 20%, rgba(255, 255, 255, 0.025) 0%, transparent 50%),
                linear-gradient(180deg, #0a0c10 0%, #0e1116 25%, #13161c 100%);
}

.news-footer.kro-footer .kro-footer-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 100% 70% at 50% 50%, transparent 35%, rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
}

.news-footer.kro-footer .kro-footer-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.02) 1px, transparent 0),
                      radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.014) 1px, transparent 0);
    background-size: 32px 32px, 24px 24px;
    pointer-events: none;
}

.news-footer.kro-footer .news-footer-text {
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.94) !important;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.news-footer.kro-footer .news-footer-crafted {
    font-size: clamp(17px, 2.1vw, 20px);
    color: rgba(255, 255, 255, 0.88) !important;
    margin-bottom: 32px;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.55;
}

.news-footer.kro-footer .news-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
}

.news-footer.kro-footer .news-footer-link {
    font-size: clamp(14px, 1.6vw, 16px);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none;
    position: relative;
    transition: color 0.25s ease, transform 0.25s ease;
}

.news-footer.kro-footer .news-footer-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-footer.kro-footer .news-footer-link:hover {
    color: rgba(255, 255, 255, 0.98) !important;
    transform: translateY(-2px);
}

.news-footer.kro-footer .news-footer-link:hover::after {
    width: 100%;
}

.news-footer.kro-footer .news-footer-cta {
    display: inline-block;
    font-size: clamp(14px, 1.7vw, 16px);
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(255, 230, 200, 0.95);
    background-color: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.38);
    padding: 14px 26px;
    border-radius: 999px;
    text-decoration: none;
    transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 0 0 rgba(245, 158, 11, 0);
}

.news-footer.kro-footer .news-footer-cta:hover {
    border-color: rgba(245, 158, 11, 0.55);
    background-color: rgba(245, 158, 11, 0.24);
    color: rgba(255, 248, 235, 1);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.3), 0 0 32px rgba(245, 158, 11, 0.22);
}

.news-footer.kro-footer .news-footer-cta:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.news-footer.kro-footer .kro-footer-bottom {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.news-footer.kro-footer .kro-footer-legal {
    font-family: ui-monospace, 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.48);
    letter-spacing: 0.12em;
    margin: 0;
    line-height: 1.5;
}

.news-footer.kro-scroll-in {
    opacity: 0;
    transform: translateY(52px) scale(0.98);
    transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-footer.kro-scroll-in-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.news-footer.kro-scroll-in .kro-footer-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.58s cubic-bezier(0.22, 1, 0.36, 1), transform 0.58s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-footer.kro-scroll-in-visible .kro-footer-reveal:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0s; }
.news-footer.kro-scroll-in-visible .kro-footer-reveal:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.15s; }
.news-footer.kro-scroll-in-visible .kro-footer-reveal:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }
.news-footer.kro-scroll-in-visible .kro-footer-reveal:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.45s; }

@media (prefers-reduced-motion: reduce) {
    .news-footer.kro-scroll-in,
    .news-footer.kro-scroll-in .kro-footer-reveal,
    .news-footer.kro-scroll-in-visible .kro-footer-reveal:nth-child(n) {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Профессиональная визуализация для секций Risk - улучшает концентрацию */
.signal-noise-list {
    gap: 14px !important;
}

/* Десктоп: карточки одного размера, поуже — ограничиваем всю секцию */
@media (min-width: 769px) {
    .content .signal-noise#section-rules,
    .content .signal-noise#section-protection {
        max-width: 720px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .content #section-rules .signal-noise-list,
    .content #section-protection .signal-noise-list {
        grid-template-columns: 1fr !important;
    }
    .content #section-rules .signal-noise-item,
    .content #section-protection .signal-noise-item {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 160px !important;
        box-sizing: border-box !important;
        align-items: center !important;
        text-align: center !important;
    }
    .content #section-rules .signal-noise-label,
    .content #section-rules .signal-noise-text,
    .content #section-protection .signal-noise-label,
    .content #section-protection .signal-noise-text {
        text-align: center !important;
    }
}

/* Анимация появления при скролле */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* Карточки: DuoView-стиль — гравировка, асимметричное свечение, inner glow */
.content .signal-noise-list .signal-noise-item,
.signal-noise-item {
    position: relative !important;
    padding: 16px 20px !important;
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(159, 232, 159, 0.15) !important;
    border-left: 3px solid rgba(159, 232, 159, 0.5) !important;
    border-radius: 12px !important;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.35s ease, border-color 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
    text-align: left !important;
    box-shadow: inset 2px 0 0 rgba(159, 232, 159, 0.12), 0 2px 12px rgba(0, 0, 0, 0.15), -8px 12px 50px rgba(159, 232, 159, 0.06), 0 0 40px rgba(159, 232, 159, 0.06) !important;
    overflow: hidden !important;
}
.content .signal-noise-list .signal-noise-item::before,
.signal-noise-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, transparent 40%, rgba(159, 232, 159, 0.03) 100%);
    pointer-events: none;
}

.content .signal-noise-list .signal-noise-item:nth-child(even),
.signal-noise-item:nth-child(even) {
    box-shadow: inset 2px 0 0 rgba(159, 232, 159, 0.12), 0 2px 12px rgba(0, 0, 0, 0.15), -6px 10px 45px rgba(159, 232, 159, 0.07), 0 0 38px rgba(159, 232, 159, 0.06) !important;
}

.content .signal-noise-list .signal-noise-item:hover,
.signal-noise-item:hover {
    background: rgba(0, 0, 0, 0.26) !important;
    transform: translateY(-2px) scale(1.01) !important;
    border-left-color: rgba(159, 232, 159, 0.7) !important;
    border-color: rgba(159, 232, 159, 0.12) !important;
    box-shadow: inset 2px 0 0 rgba(159, 232, 159, 0.18), 0 8px 24px rgba(0, 0, 0, 0.25), -12px 16px 60px rgba(159, 232, 159, 0.1), 0 0 60px rgba(159, 232, 159, 0.1), 0 0 0 1px rgba(159, 232, 159, 0.08) !important;
}
.content .signal-noise-list .signal-noise-item:nth-child(even):hover,
.signal-noise-item:nth-child(even):hover {
    box-shadow: inset 2px 0 0 rgba(159, 232, 159, 0.18), 0 8px 24px rgba(0, 0, 0, 0.25), -10px 14px 55px rgba(159, 232, 159, 0.09), 0 0 58px rgba(159, 232, 159, 0.09), 0 0 0 1px rgba(159, 232, 159, 0.08) !important;
}

.signal-noise-label {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #FFFFFF !important;
    margin-bottom: 4px !important;
    padding-bottom: 8px !important;
    font-family: 'Poppins', sans-serif;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.signal-noise-label strong {
    color: rgba(159, 232, 159, 0.95);
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

.signal-noise-item:hover .signal-noise-label strong {
    color: rgba(159, 232, 159, 1);
    text-shadow: 0 0 12px rgba(159, 232, 159, 0.3);
}

.signal-noise-text {
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.82) !important;
    line-height: 1.65 !important;
    font-family: 'Poppins', sans-serif;
}

.signal-noise-text strong {
    color: rgba(159, 232, 159, 0.9);
}

/* Заголовки секций — как News */
.signal-noise-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #FFFFFF !important;
    margin-bottom: 12px !important;
    font-family: 'Raleway', sans-serif !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
}

.signal-noise-intro {
    font-size: 15px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    line-height: 1.6 !important;
    margin-bottom: 16px !important;
    font-family: 'Poppins', sans-serif !important;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* Визуальные метрики в карточках */
.signal-noise-item {
    counter-increment: risk-item;
}

.signal-noise-list {
    counter-reset: risk-item;
}

/* Дополнительные визуальные эффекты */
@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Интерактивные эффекты при попадании в центр экрана */
@keyframes underlineDraw {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

@keyframes highlightFade {
    from {
        background-color: transparent;
        box-shadow: 0 0 0 rgba(159, 232, 159, 0);
    }
    to {
        background-color: rgba(159, 232, 159, 0.15);
        box-shadow: 0 0 12px rgba(159, 232, 159, 0.3);
    }
}

/* Эффекты подсветки отключены — не высвечиваются при скролле */

/* Боковые визуалы убраны - оставляем только визуалы около табличек */

/* Показываем визуалы когда секция в центре */
body:has(#section-rules.risk-in-center) .risk-side-visual-left,
body:has(#section-protection.risk-in-center) .risk-side-visual-left,
body:has(#section-rules.risk-in-center) .risk-side-visual-right,
body:has(#section-protection.risk-in-center) .risk-side-visual-right {
    opacity: 0.8 !important;
}

/* SVG иллюстрации для боковых элементов */
.risk-chart-visual {
    width: 100% !important;
    height: 100% !important;
}

.risk-chart-line,
.risk-falling-line {
    stroke-dasharray: 1000 !important;
    stroke-dashoffset: 1000 !important;
    animation: drawLine 2s ease-out forwards !important;
}

.risk-portfolio-big {
    animation: portfolioShrink 2s ease-out 0.5s forwards !important;
    transform-origin: center !important;
}

.risk-portfolio-medium {
    animation: portfolioShrink 2s ease-out 1s forwards !important;
    transform-origin: center !important;
    opacity: 0 !important;
}

.risk-portfolio-small {
    animation: portfolioShrink 2s ease-out 1.5s forwards !important;
    transform-origin: center !important;
    opacity: 0 !important;
}

@keyframes portfolioShrink {
    from {
        opacity: 0;
        transform: scale(1.2);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

/* Визуалы — DuoView Pro: минимализм, один кадр */
.risk-corner-visual {
    position: absolute !important;
    width: 160px !important;
    height: 160px !important;
    pointer-events: none !important;
    z-index: 10 !important;
    opacity: 0 !important;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    border: 1px solid rgba(159, 232, 159, 0.15) !important;
    display: none !important;
    visibility: hidden !important;
    transform: scale(0.95) !important;
}

/* Плавная анимация появления для мобильных */
@keyframes mobileVisualFadeIn {
    from {
        opacity: 0 !important;
        transform: scale(0.85) translateY(15px) !important;
    }
    to {
        opacity: 1 !important;
        transform: scale(1) translateY(0) !important;
    }
}

.risk-corner-visual.mobile-fade-in {
    animation: mobileVisualFadeIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
    opacity: 0 !important; /* Начинаем с прозрачности для анимации */
}

.risk-corner-visual.show {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
}

.risk-corner-visual svg {
    width: 100% !important;
    height: 100% !important;
}

.risk-visual-row {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    flex-wrap: wrap;
}

/* Верхний правый угол - справа от таблички */
.risk-corner-top-right {
    top: 0 !important;
    right: -180px !important;
}

/* Нижний левый угол - слева от таблички */
.risk-corner-bottom-left {
    bottom: 0 !important;
    left: -180px !important;
}

.risk-corner-visual.show {
    opacity: 0.95 !important;
    display: block !important;
    visibility: visible !important;
}

/* Убеждаемся, что таблички имеют position relative и overflow visible */
.risk-favorite-item {
    position: relative !important;
    overflow: visible !important;
}

/* Убеждаемся, что список тоже не обрезает визуалы */
.signal-noise-list {
    overflow: visible !important;
}

/* Как News */
.signal-noise {
    margin: 0 auto 40px !important;
}

/* Мобильная версия — сохраняем Risk-стиль (News-стиль только на десктопе) */
@media (max-width: 768px) {
    .signal-noise-list {
        gap: 28px !important;
        justify-items: center !important;
    }
    .signal-noise-list > li {
        width: 100%;
        max-width: 100%;
    }
    .risk-corner-visual {
        width: 100px !important;
        height: 100px !important;
        padding: 16px !important;
    }
    
    .risk-corner-visual svg {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
    }
    
    .content .signal-noise-list .signal-noise-item,
    .signal-noise-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 18px 20px !important;
        gap: 8px !important;
        background: rgba(0, 0, 0, 0.2) !important;
        border: 1px solid rgba(159, 232, 159, 0.15) !important;
        border-left: 3px solid rgba(159, 232, 159, 0.5) !important;
        border-right: 3px solid rgba(159, 232, 159, 0.5) !important;
        margin-bottom: 14px !important;
    }
    
    .signal-noise-label,
    .signal-noise-text {
        padding-left: 0 !important;
        padding-right: 0 !important;
        text-align: center !important;
    }
    
    .signal-noise-label::before {
        display: none !important;
    }
    
    .risk-visual-row {
        display: flex !important;
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center !important;
        align-items: center !important;
        margin-top: 14px !important;
        width: 100%;
    }

    .risk-favorite-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 18px 20px !important;
        gap: 8px !important;
        background: rgba(0, 0, 0, 0.2) !important;
        border: 1px solid rgba(159, 232, 159, 0.15) !important;
        border-left: 3px solid rgba(159, 232, 159, 0.5) !important;
        border-right: 3px solid rgba(159, 232, 159, 0.5) !important;
    }
    
    .risk-favorite-item .signal-noise-label,
    .risk-favorite-item .signal-noise-text {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
        text-align: center !important;
    }
    
    .risk-favorite-item .signal-noise-label::before {
        display: none !important;
    }
    
    /* DuoView-стиль: один контейнер, иконка полностью видна */
    .risk-favorite-item .risk-corner-visual {
        position: static !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        margin: 14px auto 0 !important;
        width: 100px !important;
        height: 100px !important;
        padding: 16px !important;
        background: rgba(0, 0, 0, 0.2) !important;
        border: 1px solid rgba(159, 232, 159, 0.18) !important;
        border-radius: 12px !important;
    }
    
    .risk-favorite-item .risk-corner-visual svg {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
    }
    
    /* Одна иконка в ряд на мобильном — как DuoView */
    .risk-favorite-item .risk-visual-row {
        flex-direction: row;
        justify-content: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* 600px — как News, всё по центру */
@media (max-width: 600px) {
    .signal-noise-item {
        margin-bottom: 0 !important;
        align-items: center !important;
    }
    .risk-favorite-item {
        padding: 14px 16px !important;
        gap: 8px !important;
        align-items: center !important;
    }
    .risk-favorite-item .signal-noise-label,
    .risk-favorite-item .signal-noise-text {
        max-width: 100% !important;
        text-align: center !important;
    }
    .risk-favorite-item .risk-corner-visual {
        width: 92px !important;
        height: 92px !important;
        padding: 14px !important;
        border-radius: 12px !important;
        margin-top: 12px !important;
    }
    .risk-visual-row {
        gap: 12px;
        margin-top: 12px !important;
    }
}

/* 480px — как News, компактнее, всё по центру */
@media (max-width: 480px) {
    .signal-noise-item {
        margin-bottom: 0 !important;
        align-items: center !important;
    }
    .risk-favorite-item {
        padding: 14px 16px !important;
        gap: 8px !important;
        align-items: center !important;
    }
    .risk-favorite-item .signal-noise-label,
    .risk-favorite-item .signal-noise-text {
        max-width: 100% !important;
        text-align: center !important;
    }
    .risk-favorite-item .risk-corner-visual {
        width: 88px !important;
        height: 88px !important;
        padding: 12px !important;
        border-radius: 10px !important;
        margin-top: 12px !important;
    }
    .risk-favorite-item .risk-corner-visual svg {
        min-height: 60px !important;
    }
    .risk-visual-row {
        gap: 10px;
        margin-top: 12px !important;
    }
}

/* Иконки в конце важных фраз - используем отдельный элемент через JavaScript */
.risk-icon-indicator {
    position: absolute !important;
    right: 24px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 28px !important;
    height: 28px !important;
    background: radial-gradient(circle, rgba(159, 232, 159, 0.4), rgba(159, 232, 159, 0.1)) !important;
    border-radius: 50% !important;
    opacity: 0 !important;
    z-index: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    color: rgba(159, 232, 159, 0.9) !important;
    box-shadow: 0 0 12px rgba(159, 232, 159, 0.4) !important;
    pointer-events: none !important;
    display: none !important;
}

/* risk-icon-indicator скрыт */

/* --- Favorite card layout — только десктоп (мобильный в @media выше) --- */
.risk-favorite-item {
    max-width: 100%;
}

@media (min-width: 769px) {
    .risk-favorite-item .risk-corner-visual {
        position: static !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        margin: 8px auto 0 !important;
        width: min(232px, 84vw) !important;
        padding: 20px !important;
        border-radius: 12px !important;
        background: rgba(0, 0, 0, 0.25) !important;
        border: 1px solid rgba(159, 232, 159, 0.12) !important;
        overflow: hidden !important;
    }

    .risk-favorite-item .risk-corner-visual svg {
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        max-height: 100% !important;
        min-height: 140px;
        margin: 0 auto !important;
        transform: none;
        transform-origin: center;
        object-fit: contain;
        font-family: 'Poppins', sans-serif;
    }

    .risk-favorite-item .risk-corner-top-right,
    .risk-favorite-item .risk-corner-bottom-left {
        margin-top: 18px !important;
    }
}



@keyframes iconAppear {
    from {
        opacity: 0;
        transform: translateY(-50%) scale(0);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

/* Эффекты подсветки отключены */
#section-rules .signal-noise-item strong,
#section-protection .signal-noise-item strong {
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    animation: none !important;
}


/* Улучшенные боковые визуалы */
.risk-side-visual {
    transition: opacity 0.4s ease;
}

body:has(#section-rules.risk-in-center) .risk-side-visual-left,
body:has(#section-protection.risk-in-center) .risk-side-visual-right {
    opacity: 0.5;
}

/* Анимация для SVG линий */
.risk-chart-line {
    animation: drawLine 2s ease-out forwards;
}

.risk-chart-line:nth-child(2) {
    animation-delay: 0.5s;
}

/* Nav — зелёный */
.main-nav {
    background: rgba(0, 26, 0, 0.94) !important;
    border-bottom: 1px solid rgba(150, 220, 150, 0.12) !important;
}

/* Hero accent — DuoView: золотой точечно для важного */
.news-hero-title .hero-accent {
    color: #B8E8B0 !important;
    text-shadow: 0 0 24px rgba(212, 175, 55, 0.15);
}

/* Content glow — два мягких луча */
.content::after {
    background: 
        radial-gradient(ellipse 400px 400px at 15% 85%, rgba(159, 232, 159, 0.04), transparent),
        radial-gradient(ellipse 300px 300px at 85% 15%, rgba(212, 175, 55, 0.03), transparent) !important;
}

/* Scroll-progress: на Risk не показываем зелёную полоску слева */
.scroll-progress {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Risk trust bento + calculator + разделитель — DuoView: градации, не ярко */
/* Убрано: разделители полос */

/* Плавное проявление через прозрачность — в 2 раза быстрее */
.content .risk-scroll-reveal {
    opacity: 0 !important;
    transition: opacity 2.2s ease;
}
.content .risk-scroll-reveal.risk-scroll-revealed {
    opacity: 1 !important;
}

@media (prefers-reduced-motion: reduce) {
    .content .risk-scroll-reveal { opacity: 1 !important; transition: none !important; }
}

/* Мобильная: проявление в 2 раза быстрее */
@media (max-width: 768px) {
    .content .risk-scroll-reveal {
        opacity: 0 !important;
        transition: opacity 2.5s ease !important;
    }
    .content .risk-scroll-reveal.risk-scroll-revealed { opacity: 1 !important; }
    .content .risk-scroll-reveal.signal-noise-item { transition: opacity 2.5s ease !important; }
}

@keyframes borderPulse {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(159, 232, 159, 0.25),
            0 0 40px rgba(159, 232, 159, 0.12),
            inset 0 0 30px rgba(159, 232, 159, 0.06);
        border-color: var(--risk-accent);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(159, 232, 159, 0.4),
            0 0 60px rgba(159, 232, 159, 0.2),
            inset 0 0 40px rgba(159, 232, 159, 0.08);
        border-color: #7ae87a;
    }
}

@keyframes symbolFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-8px) scale(1.1);
        opacity: 0.6;
    }
}

.why-section {
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    border-left: 3px solid rgba(159, 232, 159, 0.5);
}

.why-title {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    color: var(--risk-accent);
    font-size: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 1 !important;
}

.why-content {
    font-family: 'Poppins', sans-serif;
    color: var(--risk-subtle);
    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
}

/* Risk trust bento — 3 квадратика в ряд (мобильная — без изменений) */
.risk-trust-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 24px 0 0;
}
.risk-trust-stat {
    padding: 24px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    border-left: 2px solid rgba(159, 232, 159, 0.5);
    transition: background 0.25s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 12px;
}
.risk-trust-stat:hover {
    background: rgba(0, 0, 0, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.risk-trust-number {
    font-family: 'Raleway', sans-serif;
    font-size: clamp(40px, 5vw, 56px);
    font-weight: 700;
    color: #9FE89F;
}
.risk-trust-label {
    font-size: 12px;
    color: var(--news-muted);
    letter-spacing: 0.08em;
    margin-top: 8px;
}

/* Десктоп: компактные блоки */
@media (min-width: 769px) {
    .risk-trust-bento {
        gap: 18px;
        margin: 24px 0 0;
    }
    .risk-trust-stat {
        padding: 28px 24px;
        min-height: 120px;
        border-radius: 16px;
    }
    .risk-trust-number {
        font-size: clamp(40px, 5vw, 52px);
    }
    .risk-trust-label {
        font-size: 13px;
        margin-top: 8px;
    }
}

/* Отступ между карточками и текстом внизу */
.risk-trust-stats .news-trust-badge {
    margin-top: 40px;
    margin-bottom: 16px;
}
.risk-trust-stats .news-trust-tagline {
    margin-top: 4px;
}

.risk-section {
    max-width: 900px;
    margin: 0 auto 72px;
}
.risk-calculator-heading {
    font-size: 14px;
    font-weight: 700;
    color: var(--news-muted);
    margin-bottom: 24px;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.1em;
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        overscroll-behavior-x: none;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100vw;
        position: relative;
    }
    .page, .content {
        overflow-x: hidden !important;
        max-width: 100vw;
        width: 100%;
    }
    .page {
        padding-top: 0;
    }
    .content {
        padding: 96px 34px 80px !important; /* Боковые отступы увеличены на 0.25 см (10px) */
    }
    .risk-section {
        padding: 0 20px;
    }
    /* Пространство после hero на мобильных - как на News */
    .content > .news-hero {
        margin-top: -1cm !important;
        margin-bottom: 112px !important; /* Как на News */
        max-width: 100% !important;
        padding: 0 !important;
    }
    /* Увеличиваем боковые отступы для всех секций на мобильных */
    .signal-noise,
    .news-trust-stats,
    .risk-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .news-hero-label {
        font-size: 11px !important;
        margin-bottom: 16px !important;
    }
    .news-hero-title {
        font-size: clamp(40px, 10vw, 56px) !important;
    }
    .news-hero-subtitle {
        font-size: 18px !important;
    }
    .news-hero-description {
        font-size: 16px !important;
    }
    /* Секции signal-noise - как на News */
    .signal-noise {
        margin-bottom: 48px !important;
    }
    .signal-noise-title {
        margin-bottom: 18px !important;
        font-size: 22px !important; /* Размер как в News на мобильных */
    }
    .signal-noise-intro {
        margin-bottom: 22px !important;
        font-size: 15px !important; /* Размер как в News на мобильных */
    }
    .signal-noise-list {
        gap: 28px !important;
    }
    /* Таблички — Risk-стиль на мобильной (News только на десктопе) */
    .content .signal-noise-list .signal-noise-item,
    .signal-noise-item {
        padding: 18px 20px !important;
        margin-bottom: 14px !important;
        background: rgba(0, 0, 0, 0.2) !important;
        border: 1px solid rgba(159, 232, 159, 0.15) !important;
        border-left: 3px solid rgba(159, 232, 159, 0.5) !important;
        border-right: 3px solid rgba(159, 232, 159, 0.5) !important;
        border-radius: 12px !important;
    }
    .signal-noise-label {
        font-size: 13px !important;
        font-weight: 600 !important;
        margin-bottom: 4px !important;
        padding-bottom: 0 !important;
    }
    .signal-noise-text {
        font-size: 14px !important; /* Как на News */
    }
    .news-trust-stats {
        margin-bottom: 56px !important;
        padding-top: 24px !important;
    }
    .risk-section-divider {
        margin: 20px auto !important;
    }
    .risk-trust-bento {
        margin-top: 12px !important;
    }
    /* п.11 Apple HIG: tap-area минимум 44px */
    .risk-calculator-wrapper button,
    .risk-calculator-wrapper input[type="number"],
    .risk-calculator-wrapper input[type="password"],
    .risk-calculator-wrapper select,
    .api-key-toggle {
        min-height: 44px;
        padding: 14px 18px;
    }
    .risk-calculator-wrapper input[type="range"]::-webkit-slider-thumb {
        width: 36px;
        height: 36px;
    }
    .risk-calculator-wrapper input[type="range"]::-moz-range-thumb {
        width: 36px;
        height: 36px;
    }
    .risk-trust-stats {
        padding: 40px 20px;
    }
    .risk-trust-bento {
        grid-template-columns: 1fr;
        gap: 0.5cm !important;
    }
    .risk-trust-number {
        font-size: 44px;
    }
    .risk-trust-label {
        font-size: 12px;
    }
    .main-nav {
        padding: 14px 20px;
        padding-top: max(14px, env(safe-area-inset-top));
    }
    .main-nav-links {
        gap: 20px;
    }
    .main-nav-links a {
        font-size: 13px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    .news-footer {
        padding-bottom: calc(1.5cm + env(safe-area-inset-bottom, 0px)) !important;
    }
}

@media (max-width: 480px) {
    html, body {
        overflow-x: hidden !important;
        overscroll-behavior: none;
    }
    .content {
        padding: 88px 20px 64px !important; /* Как News */
    }
    .risk-section {
        padding: 0 16px;
    }
    /* Пространство после hero на маленьких экранах - как на News */
    .content > .news-hero {
        margin-top: -1cm !important;
        margin-bottom: 96px !important; /* Как на News */
    }
    .news-hero-title {
        font-size: 40px !important;
    }
    .signal-noise {
        margin-bottom: 56px !important;
    }
    .news-trust-stats {
        margin-bottom: 52px !important;
        padding-top: 20px !important;
    }
    .risk-section-divider {
        margin: 18px auto !important;
    }
    .risk-trust-bento {
        margin-top: 10px !important;
    }
}
@media (max-width: 600px) {
    .main-nav-links {
        display: none;
    }
}


.risk-trust-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.risk-trust-reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.risk-trust-reveal.risk-trust-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Таблички Rules / How Experts — scroll-reveal с translateY */
.content .risk-scroll-reveal.signal-noise-item {
    opacity: 0 !important;
    transform: translateY(20px) !important;
    transition: opacity 2.2s cubic-bezier(0.22, 1, 0.36, 1), transform 2.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease, box-shadow 0.25s ease !important;
}
.content .risk-scroll-reveal.risk-scroll-revealed.signal-noise-item {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.content .risk-scroll-reveal.risk-scroll-revealed.signal-noise-item:hover {
    transform: translateY(-2px) scale(1.01) !important;
}

@media (prefers-reduced-motion: reduce) {
    .content .risk-scroll-reveal.signal-noise-item {
        transform: none !important;
        transition: opacity 0.5s ease !important;
    }
}

/* Таблички "3 strategies", "Clear", "Free" — плавно как все остальные */
.content .risk-scroll-reveal.risk-trust-stat,
.content .risk-scroll-reveal.risk-trust-reveal,
.content .risk-scroll-reveal.news-trust-badge,
.content .risk-scroll-reveal.news-trust-tagline {
    opacity: 0 !important;
    transform: translateY(14px);
    transition: opacity 3.2s cubic-bezier(0.22, 1, 0.36, 1), transform 3.2s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.content .risk-scroll-reveal.risk-scroll-revealed.risk-trust-stat,
.content .risk-scroll-reveal.risk-scroll-revealed.risk-trust-reveal,
.content .risk-scroll-reveal.risk-scroll-revealed.news-trust-badge,
.content .risk-scroll-reveal.risk-scroll-revealed.news-trust-tagline {
    opacity: 1 !important;
    transform: translateY(0);
}

/* Risk Calculator */
.risk-calculator-wrapper {
    font-family: 'Poppins', sans-serif;
    padding: var(--risk-block-padding) 40px;
    margin: 0 auto 160px;
    max-width: 900px;
    position: relative;
}

.risk-calculator-wrapper::before {
    content: '';
    display: block;
    width: 64px;
    height: 1px;
    margin: 0 auto 48px;
    background: linear-gradient(90deg, transparent, rgba(159, 232, 159, 0.25), transparent);
}

.risk-calculator-container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    min-height: 320px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(159, 232, 159, 0.12);
    border-radius: 8px;
    padding: 40px 48px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: inset 0 1px 0 rgba(159, 232, 159, 0.04), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.risk-calculator-container:hover {
    border-color: rgba(159, 232, 159, 0.2);
    box-shadow: inset 0 1px 0 rgba(159, 232, 159, 0.06), 0 4px 20px rgba(0, 0, 0, 0.25);
}


/* API Key — DuoView: минимализм, понятно */
.api-key-details {
    margin-bottom: 36px;
}

.api-key-summary {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #FFFFFF;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: color var(--risk-transition);
}
.api-key-summary:hover {
    color: #F0F8F0;
}

.api-key-summary::-webkit-details-marker {
    display: none;
}

.api-key-summary::before {
    content: '+ ';
    color: var(--risk-accent);
    font-weight: 600;
}

.api-key-details[open] .api-key-summary::before {
    content: '− ';
}

.api-key-details[open] .api-key-summary {
    margin-bottom: 16px;
}

.api-key-group {
    padding: 20px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(159, 232, 159, 0.12);
    border-radius: 8px;
}

.api-key-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #FFFFFF;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
}

.api-key-input-wrap {
    display: flex;
    gap: 12px;
    align-items: center;
}

.api-key-input-wrap input {
    flex: 1;
}

.api-key-toggle {
    padding: 10px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--risk-accent);
    background: rgba(159, 232, 159, 0.08);
    border: 1px solid rgba(159, 232, 159, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.api-key-toggle:hover {
    background: rgba(159, 232, 159, 0.12);
}

.api-key-hint {
    margin-top: 10px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    font-family: 'Poppins', sans-serif;
}

.api-key-hint a {
    color: var(--risk-accent);
    text-decoration: none;
}

.api-key-hint a:hover {
    text-decoration: underline;
}

.risk-calc-form .form-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 40px;
}

.form-group {
    flex: 0 1 260px;
    min-width: 220px;
    max-width: 280px;
    margin: 0 auto;
    transition: transform var(--risk-transition);
}
.form-group:focus-within {
    transform: translateY(-1px);
}

.form-step {
    font-family: 'Raleway', sans-serif;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--risk-accent);
    letter-spacing: 0.12em;
    margin-right: 6px;
}

.risk-calculator-wrapper label {
    display: block;
    color: #FFFFFF !important;
    font-size: 14px;
    margin-bottom: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    opacity: 1 !important;
}

.input-with-suffix {
    position: relative;
}

.input-suffix {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #FFFFFF;
}

.input-with-suffix input {
    padding-right: 40px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.slider-labels span:nth-child(2) {
    color: #FFFFFF;
    font-weight: 600;
}

.risk-calculator-wrapper input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-feature-settings: "tnum";
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(159, 232, 159, 0.2);
    border-radius: 6px;
    color: #FFFFFF !important;
    transition: border-color 0.2s ease;
    appearance: textfield;
    -moz-appearance: textfield;
}

.risk-calculator-wrapper input[type="number"]::-webkit-outer-spin-button,
.risk-calculator-wrapper input[type="number"]::-webkit-inner-spin-button {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

.risk-calculator-wrapper input[type="number"]:focus {
    outline: none;
    border-color: rgba(159, 232, 159, 0.35);
}

.risk-calculator-wrapper input[type="number"]::placeholder {
    color: rgba(240, 248, 240, 0.4);
}

.slider-container {
    display: flex;
    flex-direction: column;
}

.slider-track-wrap {
    position: relative;
    --fill: 0%;
}

.slider-track-wrap::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: var(--fill);
    height: 4px;
    background: linear-gradient(90deg, rgba(159, 232, 159, 0.3), var(--risk-accent));
    border-radius: 2px;
    pointer-events: none;
    transition: width 0.15s ease-out;
}

.risk-slider,
.risk-calculator-wrapper input[type="range"] {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    outline: none;
    border-radius: 2px;
    -webkit-appearance: none;
    appearance: none;
}

.risk-calculator-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--risk-accent);
    cursor: pointer;
    border-radius: 2px;
    transition: transform 0.2s ease;
}

.risk-calculator-wrapper input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.05);
}

.risk-calculator-wrapper input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--risk-accent);
    cursor: pointer;
    border-radius: 2px;
    border: none;
}

.slider-value {
    margin-top: 10px;
    font-size: 15px;
    color: var(--risk-accent);
    font-weight: 600;
    font-family: 'Raleway', sans-serif;
}

.risk-calculator-wrapper select {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-feature-settings: "tnum";
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(159, 232, 159, 0.2);
    border-radius: 6px;
    color: #FFFFFF !important;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.risk-calculator-wrapper select:focus {
    outline: none;
    border-color: rgba(159, 232, 159, 0.35);
}

.risk-calculator-wrapper select option {
    background: #001a00;
    color: #F0F8F0;
}

.button-wrapper {
    text-align: center;
    margin-top: 20px;
}

.magnetic-wrap {
    display: inline-block;
    padding: 8px;
}

.risk-calculator-wrapper button {
    width: 220px;
    padding: 14px 24px;
    background: transparent;
    color: #9FE89F !important;
    border: 2px solid rgba(159, 232, 159, 0.5);
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease;
    letter-spacing: 0.08em;
}

.risk-calculator-wrapper button:hover {
    background: rgba(159, 232, 159, 0.08);
    border-color: rgba(159, 232, 159, 0.7);
}

.magnetic-wrap:hover .risk-calculator-wrapper button {
    transform: translateY(-1px);
}

.risk-calculator-wrapper button:active {
    transform: translateY(0);
}

.results {
    width: 100%;
    max-width: 900px;
    margin: 56px auto 0;
    opacity: 0;
    transform: translateY(24px);
}

.results.results-revealed {
    animation: resultsReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes resultsReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-revealed .strategy {
    opacity: 0;
    transform: translateY(16px);
    animation: strategyReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.results-revealed .strategy:nth-child(1) { animation-delay: 0.15s; }
.results-revealed .strategy:nth-child(2) { animation-delay: 0.25s; }
.results-revealed .strategy:nth-child(3) { animation-delay: 0.35s; }

@keyframes strategyReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-title {
    color: #F0F8F0 !important;
    font-size: 14px;
    margin-bottom: 20px;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
}

.strategies {
    width: 100%;
    color: #D0E8D0 !important;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    opacity: 1 !important;
}

.strategies-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.strategy {
    background: rgba(0, 0, 0, 0.25);
    padding: 14px 16px 14px 18px;
    border-radius: 8px;
    border: 1px solid rgba(159, 232, 159, 0.12);
    border-left: 2px solid rgba(159, 232, 159, 0.35);
    transition: background 0.25s ease, border-color 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(159, 232, 159, 0.03);
}

.strategy:hover {
    background: rgba(0, 0, 0, 0.26);
    border-left-color: rgba(159, 232, 159, 0.5);
}

.strategy-title {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    color: var(--risk-accent);
    margin-bottom: 10px;
    font-size: 15px;
    letter-spacing: 0.03em;
}

.horizon-note {
    display: block;
    margin-bottom: 6px;
    color: var(--risk-accent);
    font-weight: 600;
}

.strategy-info {
    margin-bottom: 24px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(159, 232, 159, 0.1);
    border-radius: 6px;
    text-align: center;
    color: #FFFFFF !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.04em;
    line-height: 1.55;
}

.strategy-allocation-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(159, 232, 159, 0.3);
}

.strategy-allocation {
    flex: 1;
    color: #F0F8F0 !important;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    opacity: 1 !important;
}

.strategy-copy-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 11px;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: transparent;
    color: var(--risk-accent);
    border: 1px solid rgba(159, 232, 159, 0.4);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.strategy-copy-btn:hover {
    background: rgba(159, 232, 159, 0.08);
    border-color: rgba(159, 232, 159, 0.6);
}

.risk-tips {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(159, 232, 159, 0.1);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
}

.risk-tip {
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.85);
}

.why-section {
    margin-top: 16px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    border-left: 3px solid rgba(159, 232, 159, 0.5);
}

.why-title {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    color: var(--risk-accent);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
    opacity: 1 !important;
}

.why-content {
    font-family: 'Poppins', sans-serif;
    color: var(--risk-subtle);
    font-size: 13px;
    line-height: 1.55;
    font-weight: 400;
}

.loading {
    color: var(--risk-accent) !important;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 1 !important;
}

.spinner {
    border: 2px solid rgba(159, 232, 159, 0.25);
    border-top: 2px solid var(--risk-accent);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

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

/* api-key-group styled above in api-key-details */

.risk-calculator-wrapper input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(159, 232, 159, 0.2);
    border-radius: 6px;
    color: #FFFFFF !important;
}

.risk-calculator-wrapper input[type="password"]::placeholder {
    color: rgba(240, 248, 240, 0.4);
}


.hidden {
    display: none;
}

@media (max-width: 768px) {
    .strategies-grid {
        grid-template-columns: 1fr;
    }
    
    .risk-calc-form .form-wrapper,
    .form-wrapper {
        flex-direction: column;
        gap: 24px;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .risk-calculator-wrapper .form-group,
    .risk-section-calculator .form-group {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .risk-calculator-wrapper .form-group label,
    .risk-section-calculator .form-group label {
        text-align: center !important;
    }
    
    .risk-calculator-wrapper .input-with-suffix,
    .risk-calculator-wrapper .slider-container,
    .risk-calculator-wrapper .slider-track-wrap,
    .risk-section-calculator .form-group > div {
        width: 100% !important;
        max-width: 320px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .risk-calculator-wrapper .slider-labels {
        justify-content: space-between;
    }
    
    .risk-calculator-wrapper select {
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .risk-calculator-wrapper button {
        width: 100%;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .risk-calculator-container {
        padding: 32px 24px;
        text-align: center !important;
    }
    
    .risk-calculator-wrapper {
        padding: var(--risk-block-padding) 20px;
    }
    
    .risk-calculator-heading {
        font-size: 14px;
    }
    
    .api-key-details {
        text-align: center !important;
    }
    
    .api-key-group {
        text-align: center !important;
        margin-left: auto;
        margin-right: auto;
    }
    
    .strategy-info {
        font-size: 11px;
    }
}

/* ============================================
   CHAT WIDGET STYLES - Synchronized with main site
   Always in bottom right corner of the screen
   ============================================ */

.chat-widget {
    position: fixed !important;
    bottom: max(20px, env(safe-area-inset-bottom)) !important;
    right: max(20px, env(safe-area-inset-right)) !important;
    top: auto !important;
    left: auto !important;
    z-index: 2147483647 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    will-change: auto !important;
    contain: none !important;
}

.chat-button {
    width: 62px !important;
    height: 62px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%) !important;
    border: 2px solid #3a3a3a !important;
    cursor: pointer !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    animation: chat-float 3s ease-in-out infinite !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@keyframes chat-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.chat-button:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 6px 25px rgba(255, 255, 255, 0.2);
    border-color: #4a4a4a;
}

.chat-button:active {
    transform: scale(0.95);
}

.chat-button svg {
    width: 31px;
    height: 31px;
    fill: #FFFFFF;
}

.chat-button::before {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background: #888888;
    border-radius: 50%;
    border: 2px solid #1a1a1a;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

.chat-container {
    position: fixed !important;
    bottom: 90px !important;
    right: 20px !important;
    width: 420px !important;
    height: 600px !important;
    background: #1a1a1a !important;
    border: 1px solid #2a2a2a !important;
    border-radius: 15px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8) !important;
    display: none !important;
    flex-direction: column !important;
    overflow: hidden !important;
    animation: chat-slide-up 0.3s ease !important;
    z-index: 10001 !important;
    pointer-events: auto !important;
}

.chat-container.active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@keyframes chat-slide-up {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-header {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    color: #cccccc;
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #3a3a3a;
}

.chat-header h3 {
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background: #f59e0b;
    border-radius: 6px;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cline x1='5' y1='5' x2='19' y2='19' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center;
    mask-size: 14px 14px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cline x1='5' y1='5' x2='19' y2='19' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask-size: 14px 14px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #888888;
    border-radius: 50%;
    animation: chat-pulse 2s infinite;
}

@keyframes chat-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.close-chat {
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 26px;
    cursor: pointer;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.close-chat:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex: 1;
    padding: 22px;
    overflow-y: auto;
    background: #0a0a0a;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    box-sizing: border-box;
}

.message {
    margin-bottom: 16px;
    display: flex !important;
    gap: 9px;
    animation: chat-fade-in 0.3s ease;
    align-items: flex-start;
    width: 100% !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

@keyframes chat-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    flex-direction: row;
    justify-content: flex-start;
}

.message.user {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.message-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    background: transparent;
    border: none;
}

.message-content {
    max-width: 70% !important;
    min-width: 0;
    padding: 13px 17px;
    border-radius: 15px;
    line-height: 1.55;
    font-size: 14.5px;
    word-wrap: break-word;
    display: block !important;
    color: #cccccc;
    flex-shrink: 1;
    box-sizing: border-box;
}

.message.bot .message-content {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-bottom-left-radius: 5px;
}

.message.user .message-content {
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-bottom-right-radius: 5px;
}

.message-sources {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #3a3a3a;
    font-size: 12px;
}

.message-sources a {
    color: #888888;
    text-decoration: none;
    display: block;
    margin: 4px 0;
    transition: color 0.2s ease;
}

.message-sources a:hover {
    color: #cccccc;
    text-decoration: underline;
}

.message-sources a::before {
    content: "🔗 ";
    margin-right: 4px;
}

.chat-input-container {
    padding: 22px !important;
    background: #1a1a1a !important;
    border-top: 1px solid #3a3a3a !important;
    pointer-events: auto !important;
    z-index: 10002 !important;
    position: relative !important;
}

.chat-input-wrapper {
    display: flex !important;
    gap: 10px !important;
    pointer-events: auto !important;
    z-index: 10002 !important;
    position: relative !important;
}

.chat-input {
    flex: 1 !important;
    padding: 13px 17px !important;
    border: 2px solid #3a3a3a !important;
    border-radius: 25px !important;
    font-size: 14.5px !important;
    outline: none !important;
    background: #0a0a0a !important;
    color: #cccccc !important;
    transition: border-color 0.3s ease !important;
    pointer-events: auto !important;
    z-index: 10002 !important;
    position: relative !important;
}

.chat-input::placeholder {
    color: #666666;
}

.chat-input:focus {
    border-color: #5a5a5a;
}

.send-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 2px solid #3a3a3a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.send-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
    border-color: #4a4a4a;
}

.send-button:active {
    transform: scale(0.95);
}

.send-button svg {
    width: 21px;
    height: 21px;
    fill: #FFFFFF;
}

.typing-indicator {
    display: none;
    padding: 12px 16px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 15px;
    border-bottom-left-radius: 5px;
    width: fit-content;
}

.typing-indicator.active {
    display: block;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #666666;
    border-radius: 50%;
    animation: chat-typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes chat-typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

.quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quick-question-btn {
    padding: 9px 15px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 20px;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #888888;
    font-weight: 500;
}

.quick-question-btn:hover {
    background: #3a3a3a;
    color: #cccccc;
    border-color: #4a4a4a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
}

.quick-question-btn:active {
    transform: translateY(0);
}

/* Chat Subscription Section */
.chat-subscription-section {
    padding: 15px 20px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.chat-subscription-section.hidden {
    display: none;
}

.chat-timer-display {
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
    font-family: 'Raleway', sans-serif;
    letter-spacing: 2px;
    margin: 0;
    text-align: center;
    width: 100%;
}

/* Chat Expired Overlay */
/* Chat Expired Overlay - Black screen inside chat */
.chat-expired-overlay {
    pointer-events: none; /* Allow clicks to pass through to chat */
    position: absolute;
    inset: 0;
    background: #000000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 10;
    padding: 40px 20px 40px;
    padding-top: 127px;
}

.chat-expired-overlay.hidden {
    display: none;
}

.chat-expired-content {
    text-align: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 0 20px;
    pointer-events: auto !important; /* Allow clicks on payment buttons */
    position: relative;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin-top: 0;
}

.chat-expired-text {
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
    font-family: 'Raleway', sans-serif;
    margin-bottom: 40px;
    line-height: 1.5;
    text-align: center;
    width: 100%;
}

.chat-expired-btn {
    padding: 12px 28px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Raleway', sans-serif;
    cursor: pointer;
    background: #2a2a2a;
    color: #FFFFFF;
    border: 1px solid #3a3a3a;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 300px;
}

.chat-expired-btn:hover {
    background: #3a3a3a;
    border-color: #4a4a4a;
    transform: translateY(-2px);
}

.chat-expired-btn:active {
    transform: translateY(0);
}

.chat-expired-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.payment-method-buttons {
    display: flex;
    flex-direction: column;
    gap: 35px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
}

.payment-method-btn {
    padding: 12px 28px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    pointer-events: auto !important;
    cursor: pointer !important;
    font-family: 'Raleway', sans-serif;
    cursor: pointer;
    pointer-events: auto !important;
    position: relative;
    z-index: 10004;
    background: #2a2a2a;
    color: #FFFFFF;
    border: 1px solid #3a3a3a;
    transition: all 0.2s ease;
    width: 100%;
}

.payment-method-btn:hover:not(:disabled) {
    background: #3a3a3a;
    border-color: #4a4a4a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.payment-method-btn:active:not(:disabled) {
    transform: translateY(0);
}

.payment-method-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .chat-container {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        right: 20px;
    }
}

/* Финальное переопределение для мобильных табличек Risk — гравировка слева и справа */
@media (max-width: 768px) {
    #section-rules .signal-noise-item,
    #section-protection .signal-noise-item {
        border-left: 3px solid rgba(159, 232, 159, 0.5) !important;
        border-right: 3px solid rgba(159, 232, 159, 0.5) !important;
        border-top: 1px solid rgba(159, 232, 159, 0.15) !important;
        border-bottom: 1px solid rgba(159, 232, 159, 0.15) !important;
    }
}