/* Стили страницы «fund». Вынесены из templates/main/fund_template.html без изменений:
   каскад тот же — <link> стоит там же, где стоял <style>. */
/* Общие стили */
    body {
        margin-top: 100px;
    }

    @media (max-width: 991px) {
        body {
            margin-top: 70px;
        }
    }
    /* Таблица с приростом */
    .returns-table-container {
        overflow-x: auto;
    }
    /* Курсор-«рука» только когда таблица шире карточки (класс ставит drag-scroll.js). */
    /* Таблица доходностей — оформление 1:1 из site2 (.nc-returns) */
    .nc-returns { width: 100%; border-collapse: collapse; margin-top: 22px; font-family: 'Montserrat', sans-serif; }
    .nc-returns th, .nc-returns td { padding: 14px 12px; text-align: right; font-size: 13.5px; border-top: 1px solid #eaedf4; }
    .nc-returns th { color: #83879a; font-weight: 500; font-size: 12.5px; }
    .nc-returns th:first-child, .nc-returns td:first-child { text-align: left; }
    .nc-returns thead th { border-top: none; }
    .nc-returns td:first-child { font-weight: 700; color: #14161d; }
    .nc-returns .rv { font-weight: 700; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
    .nc-returns .rv.up { color: #2f6d25; }
    .nc-returns .rv.down { color: #a83232; }
    @media (max-width: 560px) {
        .nc-returns th:nth-child(2), .nc-returns td:nth-child(2),
        .nc-returns th:nth-child(3), .nc-returns td:nth-child(3) { display: none; }
    }
    .returns-table {
        width: 100%;
        border-collapse: collapse;
        margin: 20px 0;
        font-size: 14px;
    }
    .returns-table th, .returns-table td {
        padding: 8px 12px;
        text-align: center;
        border-bottom: 1px solid #e0e0e0;
    }
    .returns-table th {
        font-weight: normal;
    }
    .returns-table .row-label {
        text-align: left;
    }
    .positive-return:after {
        content: " ↑";
        color: #28a745;
        font-size: 20px;
    }
    .negative-return:after {
        content: " ↓";
        color: #dc3545;
        font-size: 20px;
    }

    /* Калькулятор доходности */
    .calculator-container {
        font-size: 14px;
        background: white;
        border-radius: 10px;
        padding: 25px;
        box-shadow: 0 0 25px rgba(102, 102, 102, 0.1);
        margin-bottom: 30px;
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }
    .calculator-controls {
        flex: 1;
        min-width: 150px;
        margin-top: 20px;
    }
    .result-container {
        flex: 1;
        min-width: 150px;
        margin-top: 0;
        padding: 20px;
        background: rgba(0,15,159,.05);
        border-radius: 8px;
        border-left: 4px solid #000f9f;
    }
    @media (max-width: 768px) {
        .calculator-container {
            flex-direction: column;
        }
        .result-container {
            order: 1;
        }
        .calculator-controls {
            order: 0;
        }
    }
    input[type="range"] {
        width: 100%;
        height: 8px;
        -webkit-appearance: none;
        background: #e2e7f2;
        border-radius: 4px;
        outline: none;
    }
    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 20px;
        height: 20px;
        background: #000f9f;
        border-radius: 50%;
        cursor: pointer;
    }
    .input-calculator {
        border: 0;
        font-size: 14px;
        display: none;
    }
    .range-labels {
        display: flex;
        justify-content: space-between;
        font-size: 0.8em;
        color: #666;
        margin-bottom: 20px;
    }
    #investment-amount {
        -webkit-appearance: none;
        width: 100%;
        height: 4px;
        background: linear-gradient(to right, #000f9f 0%, #000f9f var(--fill-percent), #e2e7f2 var(--fill-percent), #e2e7f2 100%);
        border-radius: 4px;
        outline: none;
        margin-top: 30px;
    }
    #investment-date {
        -webkit-appearance: none;
        width: 100%;
        height: 4px;
        background: linear-gradient(to right, #000f9f 0%, #000f9f var(--fill-percent), #e2e7f2 var(--fill-percent), #e2e7f2 100%);
        border-radius: 4px;
        outline: none;
        margin: 0px 0;
    }
    #investment-amount::-webkit-slider-thumb,
    #investment-date::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 19px;
        height: 19px;
        background: #000f9f;
        border-radius: 50%;
        cursor: pointer;
        border: 2px solid white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }
    #result-total {
        color: #000f9f;
        font-weight: bold;
        font-size: 28px;
        line-height: 1.15;
        margin-top: 20px;
    }
    @media (max-width: 768px) {
        #result-total {
            font-size: 23px;
        }
    }
    .result-value {
        font-weight: 600;
        font-size: 22px;
        color: #000f9f;
    }
    @media (max-width: 768px) {
        .result-value {
            font-size: 18px;
        }
    }
    .result-disclaimer {
        margin-top: 15px;
        color: #6c757d;
        font-size: 12px;
        line-height: 17px;
    }
    @media (min-width: 1694px) and (max-width: 1920px){
        .result-disclaimer {
            margin-top: 45px;
        }
    }
    

    /* Блок «Отчёты и документы фонда» (CTA, дизайн site2) */
    .fd-docs-cta { display: flex; align-items: center; gap: 20px; margin: 40px 0; padding: 24px 28px; background: #fff; border: 1px solid #eaedf4; border-left: 4px solid #000f9f; border-radius: 18px; box-shadow: 0 2px 10px rgba(20,28,60,.05); text-decoration: none; color: inherit; transition: border-color .2s, box-shadow .2s, transform .2s; }
    .fd-docs-cta:hover { box-shadow: 0 12px 34px rgba(18,26,60,.12); transform: translateY(-2px); }
    .fd-docs-ic { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: #eef1f7; color: #000f9f; }
    .fd-docs-ic svg { width: 24px; height: 24px; }
    .fd-docs-txt { flex: 1; min-width: 0; }
    .fd-docs-txt h3 { font-family: 'Montserrat', sans-serif; margin: 0; font-size: 20px; font-weight: 700; color: #14161d; letter-spacing: -.01em; }
    .fd-docs-txt p { font-family: 'Montserrat', sans-serif; margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: #474b58; max-width: 62ch; }
    .fd-docs-btn { flex: none; display: inline-flex; align-items: center; gap: 10px; font-family: 'Montserrat', sans-serif; font-size: 15px; font-weight: 600; color: #14161d; background: #fff; border: 1px solid #dfe3ec; border-radius: 999px; padding: 13px 24px; white-space: nowrap; transition: border-color .2s, color .2s; }
    .fd-docs-cta:hover .fd-docs-btn { border-color: #000f9f; color: #000f9f; }
    .fd-docs-btn svg { width: 16px; height: 16px; }
    @media (max-width: 700px) { .fd-docs-cta { flex-wrap: wrap; } .fd-docs-btn { width: 100%; justify-content: center; } }

    /* Условия инвестрирования */
    .investment-features {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 1200px;
        margin: 0 auto;
        margin-top: 90px;
    }
    .feature-block {
        flex: 1 1 180px;
        min-width: 0;
        border-bottom: 1px solid #e0e0f0;
        padding: 20px 15px;
        text-align: center;
        background: white;
    }
    .feature-highlight {
        color: #000f9f;
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 8px;
    }
    .feature-text {
        color: #333;
        font-size: 14px;
        line-height: 1.4;
    }
    @media (min-width: 1325px) {
        .feature-highlight {
            min-height: 50px;
        }
    }
    @media (max-width: 768px) {
        .feature-block {
            flex: 1 1 150px;
            padding: 15px 10px;
        }
    }
    @media (max-width: 480px) {
        .feature-block {
            flex: 1 1 100%;
        }
    }

    /* Баннер для фонда */
    .fon-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        height: 350px;
    }
    .fon {
        position: absolute;
        left: 0;
        width: 100%;
        height: 350px;
        object-fit: cover;
        z-index: -1;
    }
    .title {
        font-size: 18px;
        font-weight: 500;
        line-height: 30px;
        color: #ffffff;
        flex: 1 1 70%;
        text-align: left;
        max-width: 450px;
    }
    .explanation {
        font-size: 14px;
        font-weight: 400;
        margin-top: 20px;
    }
    .logotip {
        width: 300px;
        height: auto;
        order: 2;
        transition: 0.5s;
    }
    .logotip:hover {
        transform: scale(1.05);
        transition: 0.5s;
    }
    .fond-name {
        color: #ffffff;
        font-weight: 600;
        font-size: 28px;
    }
    @media (min-width: 768px) and (max-width: 1200px) {
        .logotip {
            max-width: 250px;
        }
        .fon-container {
            height: 400px;
        }
        .fon {
            height: 400px;
        }
        .fond-name {
            font-size: 24px;
        }
    }
    @media (min-width: 768px) and (max-width: 900px) {
        .logotip {
            max-width: 200px;
        }
    }
    @media (max-width: 767px) {
        .investment-features {
            margin-top: 200px;
        }
        .fon-container {
            flex-direction: column;
            align-items: center;
            height: 250px;
        }
        .fon {
            height: 400px;
        }
        .title {
            order: 2;
            text-align: center;
            max-height: 100px;
        }
        .logotip {
            order: 1;
            max-width: 130px;
            margin-top: 15px;
        }
        .fond-name {
            font-size: 22px;
        }
    }
    @media (max-width: 510px) {
        .investment-features {
            margin-top: 250px;
        }
        .fon {
            height: 450px;
        }
    }
    @media (max-width: 377px) {
        .investment-features {
            margin-top: 270px;
        }
        .fon {
            height: 470px;
        }
    }
    @media (max-width: 322px) {
        .investment-features {
            margin-top: 300px;
        }
        .fon {
            height: 500px;
        }
    }

    /* Кнопка "Купить паи" */
    .btn-buy-shares {
        background: linear-gradient(135deg, #ffffff 0%, #fcfcfc 100%);
        color: #000f9f;
        border: none;
        padding: 15px 30px;
        font-size: 18px;
        font-weight: 600;
        border-radius: 50px;
        box-shadow: 0 4px 15px rgba(185, 185, 185, 0.2);
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
        letter-spacing: 1px;
        margin-top: 25px;
    }
    .btn-buy-shares:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 15px rgba(185, 185, 185, 0.4);
        background: linear-gradient(135deg, #fcfcfc 0%, #ffffff 100%);
    }
    .btn-buy-shares:active {
        transform: translateY(1px);
    }
    .btn-buy-shares::after {
        content: "";
        position: absolute;
        top: -50%;
        left: -60%;
        width: 50px;
        height: 200%;
        background: rgb(29, 64, 180);
        opacity: 0.1;
        transform: rotate(30deg);
        transition: all 0.5s ease;
    }
    .btn-buy-shares:hover::after {
        left: 110%;
    }

    /* Управляющий фондом */
    .manager-card {
        margin: 40px auto;
        position: relative;
        padding: 30px;
        border-radius: 16px;
        box-shadow: 0 0 30px rgba(0,0,0,0.08);
        overflow: hidden;
    }
    .manager-card::before {
        content: "";
        position: absolute;
        top: -50px;
        right: -50px;
        width: 200px;
        height: 200px;
        border-radius: 50%;
    }
    .manager-content {
        display: flex;
        align-items: center;
        position: relative;
        z-index: 2;
    }
    .manager-photo-container {
        position: relative;
        width: 200px;
        height: 200px;
        margin-right: 40px;
        flex-shrink: 0;
    }
    .photo-circle {
        width: 200px;
        height: 200px;
        border-radius: 50%;
        overflow: hidden;
        position: absolute;
        z-index: 3;
    }
    .manager-photo {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }
    .photo-frame {
        position: absolute;
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
        border: 2px solid #000f9f;
        border-radius: 50%;
        z-index: 2;
        opacity: 0.7;
    }
    .photo-background {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #1d40b4;
        border-radius: 50%;
        z-index: 1;
        transform: rotate(15deg);
        opacity: 0.1;
    }
    .manager-info {
        flex: 1;
    }
    .manager-name {
        font-size: 24px;
        color: #2c3e50;
        margin: 0 0 25px 0;
        font-weight: 600;
    }
    .manager-title {
        font-size: 16px;
        color: #7f8c8d;
        margin-bottom: 25px;
        position: relative;
        display: inline-block;
    }
    .manager-title::after {
        content: "";
        position: absolute;
        bottom: -8px;
        left: 0;
        width: 40px;
        height: 2px;
        background: #000f9f;
    }
    .manager-quote {
        background: #f8f9fa;
        padding: 20px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        position: relative;
        font-style: italic;
        color: #4a5568;
        line-height: 1.6;
        font-size: 14px;
    }
    .manager-quote::before {
        content: "";
        position: absolute;
        top: -10px;
        left: 30px;
        width: 20px;
        height: 20px;
        background: #f8f9fa;
        transform: rotate(45deg);
        z-index: 1;
    }
    .quote-icon {
        width: 24px;
        height: 24px;
        fill: #1d40b4;
        opacity: 0.3;
        position: absolute;
        top: 10px;
        right: 15px;
    }
    @media (max-width: 768px) {
        .manager-content {
            flex-direction: column;
            text-align: center;
        }
        .manager-photo-container {
            margin-right: 0;
            margin-bottom: 30px;
            width: 180px;
            height: 180px;
        }
        .photo-circle {
            width: 180px;
            height: 180px;
        }
        .manager-title::after {
            left: 50%;
            transform: translateX(-50%);
        }
        .manager-quote::before {
            left: 50%;
            margin-left: -10px;
        }
    }

    /* Шаги как стать пайщиком */
    .steps-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 30px;
    }
    /* Один шаг: карточка короткая, поэтому вплотную к форме — добавляем отступ снизу */
    .steps-container:has(> .all-link:only-child) { margin-bottom: 40px; }
    /* Обёртка-ссылка тянется на всю высоту ряда grid, карточка её заполняет —
       так карточки в ряду равны по высоте, а плашка времени прижимается к низу. */
    .steps-container > .all-link { display: flex; flex-direction: column; }
    .step-card {
        background: white;
        border-radius: 16px;
        padding: 30px 25px;
        box-shadow: 0 0 30px rgba(0,0,0,0.08);
        position: relative;
        overflow: hidden;
        transition: transform 0.3s ease;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    .step-card:hover {
        transform: translateY(-5px);
    }
    .step-number {
        font-size: 250px;
        font-weight: 800;
        color: #1d40b4;
        opacity: 0.05;
        position: absolute;
        bottom: -40px;
        right: -25px;
        line-height: 1;
    }
    .step-content {
        position: relative;
        z-index: 2;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    .step-title {
        font-size: 16px;
        color: #4a5568;
        margin: 0 0 15px 0;
    }
    .step-desc {
        color: #4a5568;
        margin: 0 0 15px 0;
        line-height: 1.5;
        font-size: 14px;
    }
    .step-time {
        display: inline-block;
        background-color: #1d40b410;
        color: #000f9f;
        padding: 5px 12px;
        border-radius: 20px;
        font-size: 14px;
        font-weight: 500;
        margin-top: auto;        /* прижать к низу карточки */
        align-self: flex-start;  /* оставить размер «по содержимому», не растягивать */
    }
    .step-icon {
        font-size: 40px;
        text-align: right;
        margin-top: 20px;
    }
    .step-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: #000f9f;
    }
    @media (max-width: 1199px) {
        /* Колонки не фиксируем: базовое auto-fit minmax(250px, 1fr) само
           раскладывает шаги по 2-4 в ряд, а на телефоне сводит в один столбец.
           Раньше здесь стояло 1fr — и до 1200px шаги стояли по одному в ряд. */
        .step-card {
            padding: 25px 20px;
        }
        .step-number {
            font-size: 160px;
            bottom: -20px;
            right: 0px;
        }
    }
    @media (min-width: 1200px) {
        .step-card {
            height: 100%;
        }
    }
    .qualified-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(8px); 
        z-index: 10000;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .qualified-modal-content {
        background: white;
        border-radius: 16px;
        padding: 30px;
        max-width: 500px;
        margin: 20px;
        text-align: center;
    }

    .qualified-modal-content h2 {
        color: #000f9f;
        margin-bottom: 20px;
    }

    .qualified-accept-btn {
        background: #000f9f;
        color: white;
        border: none;
        padding: 12px 30px;
        border-radius: 8px;
        font-size: 16px;
        cursor: pointer;
        margin-top: 20px;
    }

    .qualified-accept-btn:hover {
        background: #1d40b4;
    }

    /* ============================================================
       Hero фонда — дизайн site2: тёмный градиент, круг с иконкой,
       чипы, кнопки. По умолчанию градиент; если загружен баннер —
       он ложится на фон (со scrim для читаемости текста).
       ============================================================ */
    .rk-fund-hero { position: relative; overflow: hidden; width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); background: radial-gradient(90% 120% at 100% 0%, rgba(70,110,255,.4), transparent 55%), linear-gradient(160deg, #070a2b, #0d1893); }
    .rk-fund-hero.has-bg { background: var(--fund-bg) center/cover no-repeat; }
    .rk-fund-hero::after { content: ""; position: absolute; right: 8%; top: 50%; width: 620px; height: 620px; border-radius: 50%; transform: translateY(-50%); background: radial-gradient(circle at 42% 40%, rgba(120,150,255,.28), rgba(120,150,255,0) 62%); pointer-events: none; }
    .rk-fund-hero.has-bg::after { display: none; }
    /* Снизу у баннера большой отступ — под плашку «условия инвестирования», которая
       на него наезжает. Если условий нет, отступ снизу такой же, как сверху. */
    .fh-wrap { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: center; padding: 56px 56px 104px; }
    .rk-fund-hero.no-features .fh-wrap { padding-bottom: 60px; }
    .fh-eyebrow { font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #fff; display: inline-flex; align-items: center; gap: 11px; }
    .fh-eyebrow::before { content: ""; width: 30px; height: 1.5px; background: #fff; display: inline-block; }
    .fh-title { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: clamp(30px, 4vw, 48px); line-height: 1.05; letter-spacing: -.01em; color: #fff; margin: 16px 0 0; }
    .fh-desc { font-family: 'Montserrat', sans-serif; font-size: 16px; line-height: 1.6; color: #b3bce6; margin: 18px 0 0; max-width: 52ch; }
    .fh-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }
    .fh-chip { display: inline-flex; align-items: center; font-family: 'Montserrat', sans-serif; font-size: 12.5px; font-weight: 600; padding: 7px 11px; border-radius: 999px; background: rgba(255,255,255,.10); border: none; color: #dbe1f5; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
    .fh-chip.chip-green { background: rgba(92,193,105,.16); color: #8fe3a0; }
    .fh-chip.chip-qual { background: rgba(120,145,255,.18); color: #9fb1ff; }
    .fh-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
    .fh-btn { display: inline-flex; align-items: center; justify-content: center; font-family: 'Montserrat', sans-serif; font-size: 15px; font-weight: 600; padding: 14px 28px; border-radius: 999px; text-decoration: none; transition: .2s ease; }
    .fh-btn-white { background: #fff; color: #14161d; }
    .fh-btn-white:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0,0,0,.28); }
    .fh-btn-glass { background: rgba(255,255,255,.10); color: #fff; border: 1px solid rgba(255,255,255,.30); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
    .fh-btn-glass:hover { background: rgba(255,255,255,.18); transform: translateY(-1px); }
    .fh-emblem { justify-self: end; width: 300px; height: 300px; background: transparent; display: flex; align-items: center; justify-content: center; }
    .fh-emblem img { width: 100%; height: 100%; object-fit: contain; }

    /* Панель условий — светлая, с наездом на баннер, тонкие разделители */
    .investment-features { position: relative; z-index: 2; left: 50%; transform: translateX(-50%); width: min(1200px, calc(100vw - 40px)); margin: -74px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; background: rgba(255,255,255,.62); -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4); border: 1px solid rgba(255,255,255,.5); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(9,13,48,.18); }
    .investment-features .feature-block { flex: none; width: auto; min-width: 0; margin: 0; background: transparent; border: 0; border-left: 1px solid rgba(20,28,60,.08); padding: 26px 20px 28px; text-align: center; }
    .investment-features .feature-block:first-child { border-left: 0; }
    .investment-features .feature-highlight { font-family: 'Montserrat', sans-serif; font-size: 19px; font-weight: 800; letter-spacing: -.01em; color: #000b73; width: auto; }
    .investment-features .feature-text { font-family: 'Montserrat', sans-serif; font-size: 13px; line-height: 1.5; color: #83879a; margin-top: 8px; width: auto; }

    @media (max-width: 900px) {
        .fh-wrap { grid-template-columns: 1fr; gap: 28px; padding: 40px 28px 48px; }
        .rk-fund-hero.no-features .fh-wrap { padding-bottom: 44px; }
        .fh-emblem { justify-self: start; width: 200px; height: 200px; }
        .rk-fund-hero::after { display: none; }
        .investment-features { grid-template-columns: repeat(2, 1fr); margin-top: -30px; }
    }
    @media (max-width: 520px) {
        .investment-features { grid-template-columns: 1fr; }
    }

    /* ===== NavChart — рукописный SVG-график (перенос из site2) ===== */
    .nav-chart { background: rgba(255,255,255,.62); -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%); border: 1px solid rgba(255,255,255,.6); border-radius: 18px; padding: 26px 28px 22px; margin: 72px 0 0; box-shadow: 0 2px 10px rgba(20,28,60,.05); }
    .nav-chart h3 { font-family: 'Montserrat', sans-serif; font-size: 20px; font-weight: 700; color: #14161d; margin: 0 0 18px; }
    .nc-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
    .nc-tabs { display: inline-flex; background: rgba(0,15,159,.05); border: 1px solid rgba(0,15,159,.14); padding: 4px; border-radius: 10px; gap: 3px; }
    .nc-tabs button { font-family: 'Montserrat', sans-serif; font-size: 13.5px; font-weight: 600; padding: 9px 16px; border-radius: 7px; color: #474b58; background: transparent; border: 0; cursor: pointer; transition: .16s; white-space: nowrap; }
    .nc-tabs button.on { background: #fff; color: #14161d; box-shadow: 0 2px 10px rgba(20,28,60,.06); }
    .nc-bench { display: inline-flex; align-items: center; gap: 9px; font-family: 'Montserrat', sans-serif; font-size: 13.5px; font-weight: 500; color: #474b58; cursor: pointer; user-select: none; }
    .nc-bench .cbx { width: 18px; height: 18px; border: 1.5px solid #dfe3ec; border-radius: 5px; display: flex; align-items: center; justify-content: center; transition: .15s; color: #fff; font-size: 11px; }
    .nc-bench.on .cbx { background: #000f9f; border-color: #000f9f; }
    .nc-bench .q { width: 15px; height: 15px; border-radius: 50%; border: 1px solid #dfe3ec; font-size: 10px; color: #83879a; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s, border-color .15s; }
    .nc-bench .q:hover { background: #000f9f; border-color: #000f9f; color: #fff; }
    /* Всплывающая подсказка вопросика (создаётся в body, position:fixed) */
    .bench-tip {
        position: fixed; z-index: 9999; max-width: 320px;
        padding: 12px 14px; border-radius: 10px;
        background: #fff; color: #333;
        font-family: 'Montserrat', sans-serif; font-size: 12.5px; line-height: 1.5;
        box-shadow: 0 10px 30px rgba(16,27,77,.18);
        opacity: 0; transform: translateY(4px);
        transition: opacity .12s ease, transform .12s ease;
        pointer-events: none;
    }
    .bench-tip.show { opacity: 1; transform: translateY(0); }
    .bench-tip::after {
        content: ''; position: absolute; left: var(--arrow-x, 50%);
        width: 10px; height: 10px; background: #fff;
        transform: translateX(-50%) rotate(45deg);
    }
    .bench-tip.below::after { top: -5px; }
    .bench-tip.above::after { bottom: -5px; }
    .nc-change { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -.02em; margin-left: auto; }
    /* Прирост пая и бенчмарка при включённой галочке — одной строкой */
    .nc-change-cmp { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; letter-spacing: normal; }
    .nc-change-cmp .ncc-i { font-family: 'Montserrat', sans-serif; font-weight: 500; font-size: 13px; color: #83879a; }
    .nc-change-cmp .ncc-i b { font-weight: 800; font-size: 20px; margin-left: 4px; }
    .nc-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
    .nc-periods { display: inline-flex; gap: 2px; flex-wrap: wrap; }
    .nc-periods button { font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 600; padding: 8px 13px; border-radius: 7px; color: #474b58; background: transparent; border: 0; cursor: pointer; transition: .15s; }
    .nc-periods button:hover { background: #eef1f7; }
    .nc-periods button.on { background: #000f9f; color: #fff; }
    .nc-range { font-family: 'Montserrat', sans-serif; font-size: 13px; color: #474b58; display: inline-flex; align-items: center; gap: 8px; }
    .nc-range b { color: #14161d; font-weight: 700; }
    .nc-range .nc-date { cursor: pointer; border-bottom: 1px dashed #b7bdcf; padding-bottom: 1px; transition: color .15s, border-color .15s; }
    .nc-range .nc-date:hover { color: #000f9f; border-color: #000f9f; }
    /* Календарь flatpickr в фирменном синем */
    /* Отключаем анимацию открытия: её transform (translateY) сбивает позицию,
       из-за чего календарь «съезжал» относительно кнопки-даты. */
    .flatpickr-calendar.animate { animation: none !important; }
    /* Календарь висит на <html> (appendTo), а не в body, поэтому шрифт Montserrat
       не наследуется — задаём его явно, иначе шрифт «слетает» на системный. */
    .flatpickr-calendar { transform: none !important; font-family: 'Montserrat', sans-serif; }
    /* ==== Календарь оформлен 1:1 как в админке (см. admin_main.css) ==== */
    .flatpickr-day.selected, .flatpickr-day.selected:hover,
    .flatpickr-day.startRange, .flatpickr-day.endRange { background: #000f9f; border-color: #000f9f; }
    .flatpickr-day.today { border-color: #000f9f; }
    .flatpickr-day.today:hover { background: #000f9f; border-color: #000f9f; color: #fff; }
    .flatpickr-day:hover { background: rgba(0, 15, 159, 0.1); border-color: rgba(0, 15, 159, 0.1); }
    .flatpickr-months .flatpickr-month,
    .flatpickr-current-month .flatpickr-monthDropdown-months,
    .flatpickr-weekdays, span.flatpickr-weekday { color: #000f9f; fill: #000f9f; }
    .flatpickr-months .flatpickr-prev-month:hover svg,
    .flatpickr-months .flatpickr-next-month:hover svg { fill: #000f9f; }
    /* Шапка: месяц и год по центру; родной выпадающий месяц прячем — вместо него свой список */
    .flatpickr-current-month { display: flex; justify-content: center; align-items: center; gap: 12px; }
    .flatpickr-current-month .flatpickr-monthDropdown-months { display: none !important; }
    /* Триггеры месяца и года — текст + каретка, без рамки/фона */
    .rc-dd-trigger { display: inline-flex; align-items: center; gap: 5px; font-size: 1rem; font-weight: 600; color: #000f9f; cursor: pointer; padding: 2px; user-select: none; background: none; border: none; outline: none; }
    .rc-dd-caret { flex: none; width: 10px; height: 6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%23000f9f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1,1 5,5 9,1'/%3E%3C/svg%3E") no-repeat center; }
    /* Списки месяца/года — дети calendarContainer, рисуются поверх сетки, открываются вниз */
    .rc-dd-list { display: none; position: absolute; transform: translateX(-50%); z-index: 1000; max-height: 220px; overflow-y: auto; background: #fff; border-radius: 8px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18); padding: 4px 0; min-width: 88px; }
    .rc-dd-list.open { display: block; }
    .rc-dd-item { padding: 6px 16px; cursor: pointer; font-size: 0.95rem; text-align: center; white-space: nowrap; color: #252525; }
    .rc-dd-item:hover { background: rgba(0, 15, 159, 0.08); }
    .rc-dd-item.selected { background: #000f9f; color: #fff; }
    .nc-plot { position: relative; width: 100%; touch-action: none; }
    .nc-plot svg { display: block; width: 100%; overflow: visible; }
    .nc-plot .grid-line { stroke: #eaedf4; stroke-width: 1; }
    .nc-plot .y-label, .nc-plot .x-label { fill: #83879a; font-size: 11px; font-family: 'Montserrat', sans-serif; }
    .nc-plot .price-line { fill: none; stroke: #000f9f; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
    .nc-plot .bench-line { fill: none; stroke: #83879a; stroke-width: 1.4; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; opacity: .8; }
    .nc-plot .cross-v { stroke: #000f9f; stroke-width: 1; stroke-dasharray: 3 3; opacity: .6; }
    .nc-plot .cross-dot { fill: #fff; stroke: #000f9f; stroke-width: 2.5; }
    .nc-tip { position: absolute; pointer-events: none; z-index: 5; background: #fff; border: 1px solid #dfe3ec; border-radius: 10px; box-shadow: 0 12px 34px rgba(18,26,60,.10); padding: 12px 14px; min-width: 210px; font-family: 'Montserrat', sans-serif; }
    .nc-tip .tt-date { font-weight: 800; font-size: 14px; color: #14161d; white-space: nowrap; margin-bottom: 8px; }
    .nc-tip .tt-sec { font-weight: 600; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: #9aa0b0; margin: 10px 0 4px; }
    .nc-tip .tt-sec:first-of-type { margin-top: 0; }
    .nc-tip .tt-subcap { font-size: 11px; color: #9aa0b0; margin: -2px 0 4px; }
    .nc-tip .tt-row { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 2px 0; white-space: nowrap; }
    .nc-tip .tt-l { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; font-size: 12.5px; color: #474b58; }
    .nc-tip .tt-v { font-weight: 700; font-size: 13px; color: #14161d; }
    .nc-tip .tt-solid { width: 14px; height: 0; border-top: 2px solid #000f9f; display: inline-block; }
    .nc-tip .tt-dash { width: 14px; height: 0; border-top: 2px dashed #83879a; display: inline-block; }
    /* Меню выгрузки графика */
    .nc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
    .nc-export { position: relative; flex: none; }
    .nc-exp-btn { width: 36px; height: 32px; border: 1px solid #dfe3ec; background: #fff; border-radius: 8px; color: #474b58; font-size: 16px; cursor: pointer; line-height: 1; display: flex; align-items: center; justify-content: center; transition: .15s; }
    .nc-exp-btn:hover { border-color: #000f9f; color: #000f9f; }
    .nc-exp-menu { position: absolute; top: 38px; right: 0; z-index: 20; background: #fff; border: 1px solid #e3e7f0; border-radius: 10px; box-shadow: 0 12px 34px rgba(18,26,60,.14); padding: 6px; min-width: 240px; }
    .nc-exp-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; font-family: 'Montserrat', sans-serif; font-size: 13.5px; color: #14161d; border-radius: 7px; cursor: pointer; }
    .nc-exp-menu button:hover { background: #eef1fb; color: #000f9f; }
    .nc-exp-sep { height: 1px; background: #eef0f5; margin: 6px 4px; }
    .nc-modal { position: fixed; inset: 0; background: rgba(10,14,40,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
    .nc-modal-box { background: #fff; border-radius: 14px; max-width: 720px; width: 100%; max-height: 85vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 26px 64px rgba(9,13,48,.28); }
    .nc-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #eef0f5; }
    .nc-modal-head h4 { margin: 0; font-family: 'Montserrat', sans-serif; font-size: 16px; font-weight: 700; color: #14161d; }
    .nc-modal-close { background: none; border: 0; font-size: 24px; cursor: pointer; color: #83879a; line-height: 1; }
    .nc-modal-body { overflow: auto; padding: 0 20px 20px; }
    .nc-data-table { width: 100%; border-collapse: collapse; font-family: 'Montserrat', sans-serif; font-size: 13px; }
    .nc-data-table th { position: sticky; top: 0; background: #fff; text-align: left; padding: 10px 8px; border-bottom: 2px solid #eef0f5; color: #83879a; font-weight: 600; }
    .nc-data-table td { padding: 8px; border-bottom: 1px solid #f2f4f8; color: #14161d; }
    /* Полноэкранный режим: сплошной белый фон (иначе просвечивает чёрный фон fullscreen) */
    .nav-chart:fullscreen, #navChart:fullscreen { background: #fff !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; padding: 30px; overflow: auto; display: flex; flex-direction: column; justify-content: center; }
    .nav-chart:-webkit-full-screen, #navChart:-webkit-full-screen { background: #fff !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; padding: 30px; overflow: auto; }
    .nc-brush { position: relative; margin-top: 14px; width: 100%; touch-action: none; user-select: none; }
    .nc-brush svg { display: block; width: 100%; }
    .nc-brush .mini-line { fill: none; stroke: #8ea0ff; stroke-width: 1; vector-effect: non-scaling-stroke; }
    .nc-brush .mini-fill { fill: rgba(0,15,159,.05); }
    .nc-brush .mask-side { fill: rgba(255,255,255,.62); }
    .nc-brush .win-fill { fill: rgba(0,15,159,.07); }
    .nc-brush .win-edge { stroke: #000f9f; stroke-width: 1; }
    .nc-brush .x-tick { fill: #83879a; font-size: 10px; }
    .nc-brush .handle { fill: #000f9f; cursor: ew-resize; }
    .nc-brush .win-body { cursor: grab; fill: transparent; }
    .nc-disc { font-family: 'Montserrat', sans-serif; font-size: 12px; line-height: 1.5; color: #83879a; margin: 16px 0 0; }
    @media (max-width: 768px) { .nav-chart { padding: 20px 16px; } }

    /* Блок «Инвестиционная стратегия» + «Управляющий фондом» (site2 fd-section) */
    .fd-section { margin-top: 40px; }
    .fd-section h3 { font-family: 'Montserrat', sans-serif; font-size: 22px; font-weight: 700; color: #14161d; margin: 0 0 16px; }
    .fd-strategy-mgr { display: grid; grid-template-columns: 1.5fr 1fr; gap: 36px; align-items: start; }
    .fd-strategy-mgr .fd-strat-text { font-family: 'Montserrat', sans-serif; color: #474b58; line-height: 1.7; font-size: 15px; margin: 0; }
    .fd-bench { margin-top: 22px; padding: 18px 22px; background: rgba(0,15,159,.05); border-radius: 12px; border: 1px solid rgba(0,15,159,.14); }
    .fd-bench-label { font-family: 'Montserrat', sans-serif; font-size: 12.5px; color: #474b58; margin-bottom: 4px; }
    .fd-bench-name { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 15px; color: #14161d; }
    .mgr-fd { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid #eaedf4; border-radius: 18px; padding: 22px; box-shadow: 0 2px 10px rgba(20,28,60,.06); cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
    .mgr-fd:hover { border-color: #000f9f; box-shadow: 0 12px 34px rgba(18,26,60,.12); transform: translateY(-2px); }
    .mgr-fd-top { display: flex; align-items: center; gap: 16px; }
    .mgr-fd-avatar { position: relative; width: 104px; height: 104px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #dde4fb, #c3cef2); box-shadow: 0 0 0 3px #fff, 0 0 0 5px #000f9f; overflow: hidden; }
    .mgr-fd-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: 50%; }
    .mgr-fd-init { font-family: 'Montserrat', sans-serif; font-weight: 800; color: #5b6bd0; font-size: 28px; }
    .mgr-fd-info { min-width: 0; }
    .mgr-fd-name { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 17px; color: #14161d; line-height: 1.3; }
    .mgr-fd-role { position: relative; display: inline-block; margin-top: 6px; padding-bottom: 7px; font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 600; color: #000f9f; }
    .mgr-fd-role::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: #000f9f; border-radius: 2px; }
    .fd-storage { margin-top: 14px; background: #fff; border: 1px solid #eaedf4; border-radius: 18px; padding: 22px; box-shadow: 0 2px 10px rgba(20,28,60,.06); }
    .fd-storage-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
    .fd-storage-head svg { width: 18px; height: 18px; color: #000f9f; flex: none; }
    .fd-storage-head b { font-family: 'Montserrat', sans-serif; font-size: 15px; color: #14161d; }
    .fd-storage p { font-family: 'Montserrat', sans-serif; font-size: 13px; color: #474b58; margin: 0; line-height: 1.55; }
    @media (max-width: 900px) { .fd-strategy-mgr { grid-template-columns: 1fr; gap: 24px; } }

    /* Структура фонда — кастомные диаграммы (site2): кольцо (pie) или гистограмма (column) */
    .fd-struct h3 { font-family: 'Montserrat', sans-serif; font-size: 22px; font-weight: 700; color: #14161d; margin: 0 0 6px; }
    .fd-struct > h3 { margin-bottom: 24px; }   /* подзаголовок убран — отступ держит сам заголовок */
    .sc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
    /* Одна диаграмма/гистограмма — карточка на всю ширину, но сам график не растягиваем «в километр» */
    .sc-grid-one { grid-template-columns: 1fr; }
    .sc-grid-one .sc-donut-wrap { width: -moz-fit-content; width: fit-content; max-width: 100%; margin: 0 auto; gap: 46px; }
    .sc-grid-one .sc-donut { width: 300px; height: 300px; transition-duration: .95s; }
    .sc-grid-one .sc-legend { flex: 0 1 auto; }
    .sc-grid-one .sc-row { font-size: 15px; }
    .sc-grid-one .sc-pct { margin-left: 18px; }
    /* Одиночная гистограмма — крупнее: шире область, толще и выше столбцы */
    .sc-grid-one .sc-hist { max-width: min(1000px, calc(var(--nbars, 6) * 124px + 60px)); margin: 0 auto; }
    .sc-grid-one .sc-hist-plot { height: 340px; }
    .sc-grid-one .sc-bar { max-width: 64px; transition-duration: 1.35s; }
    .sc-grid-one .sc-bar-val { font-size: 13.5px; }
    .sc-grid-one .sc-hist-names span { font-size: 12px; }
    .sc-card { background: #fff; border: 1px solid #eaedf4; border-radius: 18px; padding: 26px 28px; box-shadow: 0 2px 10px rgba(20,28,60,.05); }
    .sc-h { font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: 700; color: #14161d; margin: 0 0 18px; }
    /* Кольцо */
    .sc-donut-wrap { display: flex; align-items: center; gap: 26px; }
    .sc-donut { flex: none; width: 210px; height: 210px; opacity: 0; transform: translateY(12px); transition: opacity .75s ease, transform .75s cubic-bezier(.22,.61,.36,1); }
    .sc-donut.in { opacity: 1; transform: none; }
    .sc-seg { cursor: pointer; transition: stroke-width .32s cubic-bezier(.22,.61,.36,1), opacity .32s ease; }
    .sc-donut.on .sc-seg { opacity: .3; }
    .sc-donut.on .sc-seg.act { opacity: 1; stroke-width: 28; }
    /* Центр: подпись по умолчанию → % + название при наведении */
    .sc-c-pct { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 21px; fill: #14161d; opacity: 0; transition: opacity .3s ease; }
    .sc-c-name { font-family: 'Montserrat', sans-serif; font-size: 10px; fill: #83879a; opacity: 0; transition: opacity .3s ease; }
    .sc-donut.on .sc-c-pct, .sc-donut.on .sc-c-name { opacity: 1; }
    .sc-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
    .sc-row { display: flex; align-items: flex-start; gap: 10px; font-family: 'Montserrat', sans-serif; font-size: 14px; color: #474b58; cursor: pointer; padding: 6px 10px; margin: 0 -10px; border-radius: 8px; transition: background .28s ease, color .28s ease, opacity .28s ease; }
    .sc-legend.on .sc-row:not(.act) { opacity: .5; }
    .sc-row.act { background: rgba(0,15,159,.06); color: #14161d; }
    .sc-row.act .sc-pct { color: #000f9f; }
    .sc-dot { flex: none; width: 9px; height: 9px; border-radius: 3px; margin-top: 5px; }  /* строка может быть в 2 строки — держим точку у первой */
    /* Длинное название переносим на следующую строку, а не режем многоточием */
    .sc-name { flex: 1; min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
    .sc-pct { flex: none; margin-left: 12px; font-weight: 700; color: #14161d; line-height: 1.35; }
    /* Гистограмма — с осью «Доля (%)» и сеткой (как было) */
    .sc-hist { position: relative; padding-left: 22px; }
    .sc-ytitle { position: absolute; left: -4px; top: 44%; transform: rotate(-90deg); transform-origin: left center; font-family: 'Montserrat', sans-serif; font-size: 11px; color: #a3a9bd; white-space: nowrap; }
    .sc-hist-plot { position: relative; height: 290px; margin-left: 26px; }
    .sc-gl { position: absolute; left: 0; right: 0; height: 1px; background: #eef1f7; }
    .sc-gl i { position: absolute; left: -30px; bottom: -7px; width: 26px; text-align: right; font-style: normal; font-family: 'Montserrat', sans-serif; font-size: 10.5px; color: #a3a9bd; }
    .sc-hist-cols { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 14px; }
    .sc-bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; cursor: pointer; transition: opacity .18s; }
    .sc-hist-cols.dimmed .sc-bar-col:not(.act) { opacity: .32; }
    .sc-bar-val { font-family: 'Montserrat', sans-serif; font-size: 12.5px; font-weight: 700; color: #14161d; margin-bottom: 6px; }
    .sc-bar { width: 72%; max-width: 48px; border-radius: 6px 6px 0 0; transform: scaleY(0); transform-origin: bottom; transition: transform 1.05s cubic-bezier(.22,.61,.36,1); will-change: transform; }
    .sc-bar.grow { transform: scaleY(1); }
    .sc-hist-names { display: flex; gap: 14px; margin-left: 26px; padding-top: 9px; border-top: 1px solid #e5e9f2; }
    /* Названия столбцов показываем целиком: переносим по словам, а не режем многоточием */
    .sc-hist-names span { flex: 1; min-width: 0; text-align: center; font-family: 'Montserrat', sans-serif; font-size: 11px; line-height: 1.3; color: #83879a; white-space: normal; overflow-wrap: anywhere; hyphens: auto; }
    @media (max-width: 900px) { .sc-grid { grid-template-columns: 1fr; } }
    @media (max-width: 560px) { .sc-donut-wrap { flex-direction: column; align-items: flex-start; gap: 18px; } .sc-hist-plot { height: 190px; } }

    /* Единые боковые поля 20px на узких: main брал 90% из main.css, поля
       «плавали» и не совпадали с остальными страницами. Десктоп не трогаем. */
    @media (max-width: 1240px) {
        main { width: 100%; max-width: 1200px; padding-inline: 20px; box-sizing: border-box; }
    }

    /* Баннер фонда на планшете и телефоне (там, где он в одну колонку):
       всё по центру — название, под ним логотип, затем чипы и кнопки
       одной строкой. */
    @media (max-width: 900px) {
        .fh-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0; padding: 34px 20px 44px; }
        .fh-copy { display: contents; }
        .fh-eyebrow { order: 1; justify-content: center; }
        .fh-title { order: 2; margin-top: 14px; }
        .fh-desc { order: 3; max-width: none; margin-top: 14px; }
        .fh-emblem { order: 4; justify-self: center; width: 150px; height: 150px; margin-top: 22px; }
        .fh-chips { order: 5; margin-top: 22px; }
        .fh-cta { order: 6; margin-top: 20px; }

        /* Одна строка: если чипы шире экрана — прокручиваются вбок, но пока
           влезают, остаются по центру (за это отвечают auto-поля псевдоэлементов). */
        .fh-chips { display: flex; flex-wrap: nowrap; gap: 8px; width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
        .fh-chips::-webkit-scrollbar { display: none; }
        .fh-chips::before, .fh-chips::after { content: ""; margin: auto; }
        .fh-chip { flex: none; white-space: nowrap; }

        .fh-cta { display: flex; flex-wrap: nowrap; justify-content: center; gap: 8px; width: 100%; }
        .fh-btn { flex: 0 1 auto; min-width: 0; padding: 13px 14px; font-size: 13.5px; white-space: nowrap; }
    }

    /* Совсем узкие экраны: чипы уже не помещаются в одну строку даже с
       прокруткой — пусть переносятся и стоят по центру, чтобы были видны
       целиком. */
    @media (max-width: 620px) {
        .fh-chips { flex-wrap: wrap; overflow-x: visible; justify-content: center; }
        .fh-chips::before, .fh-chips::after { content: none; }
        .fh-chip { font-size: 12px; padding: 6px 10px; }
    }

    /* Вкладки графика: две подписи с nowrap не сжимались и с ~460px вылезали
       за карточку. Делим ширину поровну и разрешаем перенос текста. */
    @media (max-width: 460px) {
        .nc-tabs { display: flex; width: 100%; }
        .nc-tabs button { flex: 1 1 0; min-width: 0; white-space: normal; font-size: 12.5px; padding: 8px 10px; line-height: 1.25; }
    }

    /* Плашка «Документы фонда»: кнопка не помещалась в строку с текстом
       и вылезала за правый край — переносим её на свою строку. */
    @media (max-width: 700px) {
        .fd-docs-cta { flex-wrap: wrap; gap: 14px; padding: 20px; }
    }

/* ============================================================
   Единый вертикальный ритм страницы фонда — 100px между блоками.
   Раньше отступы были разные: 72px у графика, 40px у секций и у плашки
   документов, 90px у заголовков, из-за чего блоки шли рвано.
   Приём тот же, что на остальных страницах: сверху у блока 100px, снизу 50px.
   Соседние блоки схлопывают margin до 100px, а перед полноширинными секциями
   (форма консультации, ссылка на статус квала, «Ещё идеи») их 50px паддинга
   складываются с нашими 50px — снова 100px. Внутри блока
   «заголовок → содержимое» остаются прежние 30px.
   ============================================================ */
.nav-chart { margin: 100px 0 50px; }
.fd-section { margin: 100px 0 50px; }
.fd-docs-cta { margin: 100px 0 50px; }
.header3 { margin: 100px 0 30px; }
.steps-container,
.steps-container:has(> .all-link:only-child) { margin-bottom: 50px; }
