/**
 * Специфичные компоненты приложения Impact.
 * Использует токены из bulma-mgpu.css и классы Bulma в разметке.
 */

/* === Брендинг в шапке === */
.impact-brand-logo {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    display: block;
}

.impact-brand-title {
    color: var(--impact-dark);
    line-height: 1.2;
}

.impact-brand-subtitle {
    color: var(--impact-muted);
    font-size: 0.8125rem;
    font-weight: 400;
}

.impact-navbar-toggle {
    align-self: center;
    flex-shrink: 0;
}

.impact-subnav-mobile-header {
    display: none;
}

/* === Лендинг: hero с фоновым изображением === */
.hero.is-primary.impact-landing-hero {
    background-image:
        linear-gradient(135deg, rgba(26, 26, 26, 0.82) 0%, rgba(42, 42, 42, 0.78) 100%),
        url('../img/impact-back.png');
    background-size: cover;
    background-position: center;
}

/* === Страница команды проекта === */
.team-page-header {
    max-width: 52rem;
    margin-bottom: 3rem;
}

.team-page-header__eyebrow {
    margin-bottom: 0.5rem;
    color: var(--impact-primary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.team-page-header .title {
    margin-bottom: 0.75rem;
}

.team-directory {
    max-width: 62rem;
}

.team-person {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: 2rem;
    padding: 2rem 0;
    border-top: 1px solid var(--impact-border);
}

.team-person:first-child {
    padding-top: 0;
    border-top: 0;
}

.team-person__avatar {
    position: relative;
    width: 8.5rem;
    height: 8.5rem;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 5px solid #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--impact-primary) 0%, var(--impact-dark) 100%);
    box-shadow: 0 0 0 1px var(--impact-border), 0 5px 18px rgba(0, 0, 0, 0.1);
    color: #fff;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.team-person__avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-person__content {
    min-width: 0;
    padding-top: 0.25rem;
}

.team-person__role {
    margin-bottom: 0.35rem;
    color: var(--impact-primary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    line-height: 1.35;
    text-transform: uppercase;
}

.team-person__name {
    margin-bottom: 0.8rem;
    color: var(--impact-dark);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.team-person__bio {
    max-width: 48rem;
    color: var(--impact-text);
    font-size: 0.9375rem;
    line-height: 1.65;
}

.team-person__identifiers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.team-person__identifiers a,
.team-person__identifiers span {
    display: inline-flex;
    align-items: center;
    min-height: 1.85rem;
    padding: 0.25rem 0.7rem;
    border: 1px solid var(--impact-border);
    border-radius: 999px;
    background: var(--impact-bg);
    color: var(--impact-muted);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.team-person__identifiers a:hover {
    border-color: var(--impact-primary);
    color: var(--impact-primary);
}

@media screen and (max-width: 768px) {
    .team-person {
        grid-template-columns: 6.5rem minmax(0, 1fr);
        gap: 1.25rem;
    }

    .team-person__avatar {
        width: 6rem;
        height: 6rem;
        font-size: 1.25rem;
    }
}

@media screen and (max-width: 480px) {
    .team-person {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .team-person__content {
        padding-top: 0;
    }
}

/* === Вторичная навигация === */
.impact-subnav {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.impact-subnav .navbar-item {
    font-weight: 500;
    font-size: 0.875rem;
    border-bottom: 3px solid transparent;
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
}

.impact-subnav .navbar-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.impact-subnav .navbar-item.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-bottom-color: var(--impact-primary);
}

/* === Переиспользуемые адаптивные компоненты === */
.impact-page-header,
.impact-section-header {
    gap: 1rem;
}

.impact-page-header .level-right,
.impact-section-header .level-right {
    flex-shrink: 0;
}

.impact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.impact-actions .button {
    margin: 0;
}

.responsive-table-container {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.responsive-table-container:focus-visible {
    outline: 2px solid var(--impact-primary);
    outline-offset: 2px;
}

.responsive-scroll-table {
    min-width: 42rem;
}

.impact-scroll-tabs {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}

.impact-scroll-tabs ul {
    width: max-content;
    min-width: 100%;
}

.impact-mobile-label {
    display: none;
}

/* === Основной контент === */
.impact-main {
    min-height: calc(100vh - 17.5rem);
}

/* Перенос длинных названий проектов */
.impact-main .level-left {
    min-width: 0;
    flex: 1 1 auto;
}

.impact-main .level-left .title,
.impact-main .level-left .subtitle,
.impact-project-name {
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.impact-main .table td:first-child a,
.impact-main .table td:first-child strong {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.impact-main .breadcrumb ul {
    flex-wrap: wrap;
}

.impact-main .breadcrumb a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* === Заголовки секций === */
.impact-section-title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--impact-dark);
    margin: 1.75rem 0 1rem;
}

.impact-section-title::before {
    content: '';
    width: 4px;
    height: 1.25rem;
    background: var(--impact-primary);
    border-radius: 2px;
    flex-shrink: 0;
}

/* === Блок индекса (оценка) === */
.impact-index-block {
    background: linear-gradient(135deg, var(--impact-dark) 0%, var(--impact-text) 100%);
    color: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin: 1.25rem 0;
    position: relative;
    overflow: hidden;
}

.impact-index-block::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--impact-primary);
}

.impact-index-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.impact-index-label {
    font-size: 0.875rem;
    opacity: 0.85;
    margin-bottom: 0.25rem;
}

.impact-index-level {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--impact-primary);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: var(--bulma-radius-small);
    display: inline-block;
}

/* === Карточки индексов (выбор) === */
.impact-index-cards {
    --direction: #56B4E9;
    --scale: #009E73;
    --readiness: #CC79A7;
    --novelty: #E69F00;
    --compliance: #0072B2;
    --track: #EEF0F3;
    --text-2: #6B7280;
    --r-pill: 999px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.impact-index-card {
    appearance: none;
    background: var(--impact-surface);
    border: 2px solid var(--impact-border);
    border-radius: 0.75rem;
    padding: 1.25rem 1rem;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    font-family: inherit;
    width: 100%;
}

.impact-index-card:hover {
    border-color: var(--impact-primary);
}

.impact-index-card.is-active {
    border-color: var(--impact-primary);
    box-shadow: 0 0 0 1px var(--impact-primary);
    background: var(--impact-primary-light);
}

.impact-index-card.is-placeholder .impact-index-card__value--stub {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--impact-muted);
}

.impact-index-card__name {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--impact-muted);
    line-height: 1.35;
    margin-bottom: 0.625rem;
}

.impact-index-card__value {
    display: block;
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1;
    color: var(--impact-dark);
    font-variant-numeric: tabular-nums;
}

.impact-index-card__composition {
    width: 100%;
    margin-top: 0.875rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--impact-border);
}

.impact-index-composition .kpi-track {
    box-sizing: border-box;
    position: relative;
    height: 8px;
    background: var(--track);
    border-radius: var(--r-pill);
    display: flex;
    overflow: hidden;
    margin: 0;
    width: 100%;
}

.impact-index-composition .kpi-seg {
    display: block;
    height: 100%;
}

.impact-index-composition .kpi-scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-2);
    margin-top: 0.25rem;
    position: relative;
    height: 1rem;
    width: 100%;
}

.impact-index-composition .kpi-scale__value {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--impact-dark);
}

.impact-index-panels {
    border-top: 1px solid var(--impact-border);
    padding-top: 1.5rem;
}

.impact-index-panel {
    display: none;
}

.impact-index-panel.is-active {
    display: block;
}

.impact-index-placeholder {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--impact-bg);
    border-radius: 0.75rem;
    border: 1px dashed var(--impact-border);
}

.impact-index-placeholder__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--impact-dark);
    margin: 1rem 0 0.5rem;
}

.impact-index-placeholder__text {
    font-size: 0.9375rem;
    color: var(--impact-muted);
    max-width: 28rem;
    margin: 0 auto;
}

@media screen and (max-width: 768px) {
    .impact-index-cards {
        grid-template-columns: 1fr;
    }

    .impact-index-card__value {
        font-size: 1.75rem;
    }
}

/* === Табы блоков оценки === */
.impact-tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--impact-gray-100);
    padding: 0.375rem;
    border-radius: 0.625rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.impact-tabs .button {
    border: none;
    background: transparent;
    color: var(--impact-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    box-shadow: none;
}

.impact-tabs .button:hover {
    color: var(--impact-dark);
    background: transparent;
}

.impact-tabs .button.is-active {
    background: var(--impact-surface);
    color: var(--impact-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    font-weight: 700;
}

/* === Сравнение оценок === */
.impact-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin: 1.25rem 0;
}

@media screen and (max-width: 768px) {
    .impact-comparison {
        grid-template-columns: 1fr;
    }
}

.impact-comparison-col {
    background: var(--impact-surface);
    border-radius: 0.75rem;
    border: 1px solid var(--impact-border);
    overflow: hidden;
}

.impact-comparison-header {
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.impact-comparison-header.is-auto {
    background: var(--impact-primary-light);
    color: var(--impact-gray-900);
    border-bottom: 2px solid var(--impact-primary);
}

.impact-comparison-header.is-manual {
    background: var(--impact-gray-100);
    color: var(--impact-gray-900);
    border-bottom: 2px solid var(--impact-gray-500);
}

.impact-comparison-body {
    padding: 1.25rem;
}

/* === Элемент оценки === */
.impact-score-item {
    padding: 0.875rem;
    background: var(--impact-bg);
    border-radius: var(--bulma-radius);
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--impact-primary);
}

.impact-score-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.375rem;
}

.impact-score-item-title {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--impact-dark);
}

.impact-score-item-value {
    font-weight: 700;
    font-size: 1rem;
    color: var(--impact-primary);
}

.impact-score-item-desc {
    font-size: 0.8125rem;
    color: var(--impact-muted);
    line-height: 1.5;
}

/* === Заключение эксперта === */
.impact-conclusion {
    background: var(--impact-surface);
    border-radius: 0.75rem;
    border: 1px solid var(--impact-border);
    padding: 1.5rem;
    margin-top: 1.25rem;
}

.impact-conclusion-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--impact-dark);
    margin-bottom: 1rem;
}

.impact-conclusion-section {
    margin-bottom: 1rem;
}

.impact-conclusion-section h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--impact-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.impact-conclusion-section p,
.impact-conclusion-section ul {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--impact-text);
}

.impact-conclusion-section ul {
    padding-left: 1.25rem;
}

/* === Мета проекта === */
.impact-project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--impact-muted);
}

.impact-project-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.impact-project-meta-item strong {
    color: var(--impact-dark);
    font-weight: 700;
}

/* === Прогресс-бар === */
.impact-progress {
    height: 0.75rem;
    background: var(--impact-gray-300);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.impact-progress-bar {
    height: 100%;
    background: var(--impact-primary);
    border-radius: 999px;
    transition: width 0.3s;
}

/* === Карточки статистики (dashboard) === */
.impact-stat-card {
    background: var(--impact-surface);
    border-radius: 0.875rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    height: 100%;
}

.impact-stat-card__accent {
    height: 5px;
}

.impact-stat-card__body {
    padding: 1.25rem;
    text-align: center;
}

.impact-stat-card__label {
    font-size: 0.9375rem;
    color: var(--impact-gray-700);
}

.impact-stat-card__value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0.75rem 0;
    line-height: 1;
}

.impact-stat-card__hint {
    font-size: 0.8125rem;
    color: var(--impact-gray-500);
}

.impact-stat-card.is-accent-dark .impact-stat-card__accent {
    background-color: var(--impact-gray-900);
}

.impact-stat-card.is-accent-dark .impact-stat-card__value {
    color: var(--impact-gray-900);
}

.impact-stat-card.is-accent-warning .impact-stat-card__accent {
    background-color: var(--impact-warning);
}

.impact-stat-card.is-accent-warning .impact-stat-card__value {
    color: var(--impact-warning);
}

.impact-stat-card.is-accent-success .impact-stat-card__accent {
    background-color: var(--impact-success);
}

.impact-stat-card.is-accent-success .impact-stat-card__value {
    color: var(--impact-success);
}

.impact-stat-card.is-accent-info .impact-stat-card__accent {
    background-color: var(--impact-info);
}

.impact-stat-card.is-accent-info .impact-stat-card__value {
    color: var(--impact-info);
}

.impact-stat-card.is-accent-method .impact-stat-card__accent {
    background-color: var(--impact-method);
}

.impact-stat-card.is-accent-method .impact-stat-card__value {
    color: var(--impact-method);
}

.impact-stat-card.is-accent-analytics .impact-stat-card__accent {
    background-color: var(--impact-analytics);
}

.impact-stat-card.is-accent-analytics .impact-stat-card__value {
    color: var(--impact-analytics);
}

/* === Теги уровней (дополнение к Bulma .tag) === */
.tag.is-level-low {
    background: var(--impact-primary-light);
    color: var(--impact-primary);
}

.tag.is-level-medium {
    background: #FFF4E0;
    color: var(--impact-warning);
}

.tag.is-level-high {
    background: var(--impact-primary-light);
    color: var(--impact-primary);
}

.tag.is-level-very-high {
    background: #E8F5E9;
    color: var(--impact-success);
}

/* === Визуализация индекса (страница оценки) === */
.impact-index-chart {
    /* Семантические цвета (маппинг старых color_key на новую палитру Okabe-Ito) */
    --direction: #56B4E9;
    --scale: #009E73;
    --readiness: #CC79A7;
    --novelty: #E69F00;
    --compliance: #0072B2;

    /* UI переменные */
    --bg: #F5F6F8;
    --surface: #fff;
    --text: #1F2937;
    --text-2: #6B7280;
    --text-3: #9CA3AF;
    --border: #E5E7EB;
    --hairline: #EEF0F3;
    --track: #EEF0F3;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --r-md: 12px;
    --r-lg: 16px;
    --r-pill: 999px;

    color: var(--text);
    font: 400 14px/20px var(--font);
    -webkit-font-smoothing: antialiased;
    margin: 2rem 0;
}

.impact-index-chart--compact {
    margin: 0 0 1.5rem;
}

.impact-index-chart--compact .bars {
    margin-top: 0.75rem;
}

/* Header */
.impact-index-chart__header {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.impact-index-chart__title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--text);
}

.impact-index-chart__score {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text);
}

/* Scale */
.impact-index-chart__scale {
    position: relative;
}

.label-up {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 0.5rem;
}

.kpi-track {
    box-sizing: border-box;
    position: relative;
    height: 12px;
    background: var(--track);
    border-radius: var(--r-pill);
    display: flex;
    overflow: hidden;
    margin: 8px 0 6px;
}

.kpi-seg {
    display: block;
    height: 100%;
}

.kpi-scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-2);
    margin-top: 0.25rem;
    position: relative; /* Контекст позиционирования для абсолютного элемента */
    height: 1.25rem; /* Фиксированная высота, чтобы избежать сдвига при позиционировании */
}

/* Новый класс для подписи значения */
.kpi-scale__value {
    position: absolute;
    top: 0;
    transform: translateX(-50%); /* Центрируем подпись по её центру относительно точки left */
    /* left задается инлайн-стилем из шаблона: style="left: {{ score_percent }}%;" */
}

.tnum {
    font-variant-numeric: tabular-nums;
}

/* Bars */
.bars {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.bar-row {
    display: grid;
    grid-template-columns: minmax(160px, 240px) 1fr;
    align-items: center;
    gap: 1.5rem;
}

.bar-row .l {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    text-align: right;
}

.bar-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
	width: 100%; /* Важно: чтобы flex-контейнер не выходил за пределы родителя */
}

.bar-track {
    position: relative;
    height: 10px;
    background: var(--track);
    border-radius: var(--r-pill);
    overflow: hidden;
    flex-shrink: 0; /* Запрещаем сжимать трек, чтобы он держал инлайн-ширину */
	max-width: calc(100% - 110px); /* Оставляем 110px с запасом для подписи */
}

.bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: var(--r-pill);
    transition: width 0.3s ease;
}

.bar-row .v {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
	flex-shrink: 0; /* Запрещаем подписи сжиматься */
}

.bar-row .v .m {
    color: var(--text-3);
    font-weight: 400;
}

/* Адаптив */
@media screen and (max-width: 768px) {
    .impact-index-chart__header {
        gap: 1rem;
    }

    .impact-index-chart__title {
        font-size: 1.25rem;
    }

    .impact-index-chart__score {
        font-size: 3.5rem;
    }

    .bar-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .bar-row .l {
        text-align: left;
    }
    
    .bar-wrap {
        flex-wrap: wrap;
    }
    
    .bar-track {
        width: 100% !important; /* На мобильных растягиваем все треки на всю ширину */
    }
}

/* === Форма проекта: вкладки === */
.impact-form-tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--impact-gray-100);
    padding: 0.375rem;
    border-radius: 0.625rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.impact-form-tabs .button {
    border: none;
    background: transparent;
    color: var(--impact-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    box-shadow: none;
}

.impact-form-tabs .button:hover {
    color: var(--impact-dark);
    background: rgba(255, 255, 255, 0.6);
}

.impact-form-tabs .button.is-active {
    background: var(--impact-surface);
    color: var(--impact-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    font-weight: 700;
}

.impact-form-panel:not(.is-active) {
    display: none !important;
}

.impact-form-panel.is-active {
    display: block;
}

.impact-duration-display {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--impact-primary);
    padding-top: 0.375rem;
}

.impact-dynamic-row {
    background: var(--impact-bg);
    border-radius: var(--bulma-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--impact-primary);
}

/* Форма описания проекта: вертикальные отступы между полями и подсказками */
#project-form .impact-form-panel .box {
    margin-bottom: 1.75rem;
}

#project-form .impact-form-panel .box:last-of-type {
    margin-bottom: 0;
}

#project-form .field {
    margin-bottom: 1.375rem;
}

#project-form .columns .field {
    margin-bottom: 1.375rem;
}

#project-form .field .help:not(.is-danger) {
    margin-top: 0.5rem;
    margin-bottom: 0;
    line-height: 1.5;
}

#project-form .impact-section-title {
    margin-bottom: 1.125rem;
}

#project-form .subtitle.is-6 {
    margin-bottom: 0.75rem;
}

#project-form .level.is-mobile {
    margin-bottom: 0.875rem;
}

#project-form .box > .help.mb-3 {
    margin-bottom: 1.125rem !important;
}

#project-form .impact-dynamic-row {
    margin-bottom: 1.125rem;
    padding: 1rem 1.25rem;
}

#project-form .tag-checkbox-panel {
    margin-top: 0.25rem;
}

#project-form hr {
    margin: 1.75rem 0;
}

#project-form .file-name.impact-file-placeholder {
    color: #b5b5b5;
    font-style: italic;
}

#project-form input::placeholder,
#project-form textarea::placeholder {
    color: #b5b5b5;
    opacity: 1;
}

.select.is-multiple select {
    min-height: 8rem;
}

/* кастомная форма множественного выбора */

.tag-checkbox-panel {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  padding: 0.5rem;
}

.tag-checkbox-panel label.tag {
  cursor: pointer;
  user-select: none;
  height: auto;
  white-space: normal;
}

.tag-checkbox-panel input[type="checkbox"] {
  margin-right: 0.4em;
}

/* Необязательно: подсветка выбранного тега */
.tag-checkbox-panel label.tag:has(input:checked) {
  background-color: hsl(229, 53%, 53%);
  color: #fff;
}

/* Необязательно: подсветка фокуса */
.tag-checkbox-panel label.tag:has(input:focus-visible) {
  outline: 2px solid hsl(229, 53%, 53%);
  outline-offset: 2px;
}

/* === Вход: форма логина/пароля по кнопке === */
.login-password-toggle {
    color: var(--impact-muted);
    text-decoration: underline;
    text-underline-offset: 0.2em;
    font-weight: 500;
}

.login-password-toggle:hover {
    color: var(--impact-dark);
    background: transparent;
}

.login-password-form {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--impact-border);
}

/* === Политика обработки персональных данных === */
.policy-document {
    max-width: 52rem;
    margin: 0 auto;
}

.policy-document__hero {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--impact-border);
}

.policy-document__hero .title {
    color: var(--impact-dark);
    margin-bottom: 0.75rem;
}

.policy-document__hero .subtitle {
    color: var(--impact-muted);
    font-weight: 400;
    line-height: 1.5;
}

.policy-section {
    margin-bottom: 2.75rem;
}

.policy-section__title {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--impact-dark);
    margin-bottom: 1.25rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid rgba(37, 99, 235, 0.15);
}

.policy-section__number {
    flex-shrink: 0;
    color: var(--impact-primary);
    font-variant-numeric: tabular-nums;
}

.policy-subsection {
    margin-bottom: 1.5rem;
}

.policy-subsection__title {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #2f3a4a;
    margin-bottom: 0.85rem;
}

.policy-subsection__number {
    flex-shrink: 0;
    color: var(--impact-primary);
    font-variant-numeric: tabular-nums;
}

.policy-content p {
    color: #3f4a59;
    line-height: 1.75;
    margin-bottom: 1rem;
    text-align: justify;
}

.policy-content ul,
.policy-content ol {
    margin: 0 0 1rem 1.25rem;
    color: #3f4a59;
}

.policy-content li {
    line-height: 1.7;
    margin-bottom: 0.45rem;
}

.policy-content ul {
    list-style: disc;
}

.policy-content ol {
    list-style: decimal;
}

@media screen and (max-width: 1023px) {
    .impact-subnav-mobile-header {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: space-between;
    }

    .impact-subnav-mobile-header .navbar-item,
    .impact-subnav-mobile-header .navbar-burger {
        color: #fff;
    }

    .impact-subnav .navbar-menu {
        background: var(--impact-dark);
    }

    .impact-subnav .navbar-start {
        width: 100%;
    }

    .impact-subnav .navbar-item {
        border-bottom-width: 0;
        border-left: 3px solid transparent;
    }

    .impact-subnav .navbar-item.is-active {
        border-left-color: var(--impact-primary);
    }
}

@media screen and (max-width: 768px) {
    .section.impact-main {
        padding: 1.5rem 1rem;
    }

    .level.is-mobile.impact-quick-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 0.75rem;
    }

    .impact-quick-actions .level-left,
    .impact-quick-actions .level-right,
    .impact-quick-actions .buttons {
        width: 100%;
    }

    .impact-quick-actions .level-right {
        justify-content: flex-start;
    }

    .flash-messages,
    body > .section:has(.breadcrumb) {
        padding-inline: 1rem;
    }

    .impact-page-header,
    .impact-section-header,
    .impact-main > .container > .level {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .impact-page-header .level-left,
    .impact-page-header .level-right,
    .impact-section-header .level-left,
    .impact-section-header .level-right,
    .impact-main > .container > .level > .level-left,
    .impact-main > .container > .level > .level-right {
        width: 100%;
    }

    .impact-page-header .button,
    .impact-main > .container > .level > .level-right .button {
        width: 100%;
        white-space: normal;
        min-height: 2.75rem;
    }

    .impact-actions,
    .field.is-grouped {
        align-items: stretch;
    }

    .impact-actions .button,
    .field.is-grouped > .control {
        flex: 1 1 100%;
    }

    .field.is-grouped > .control .button {
        width: 100%;
        min-height: 2.75rem;
        height: auto;
        white-space: normal;
    }

    .buttons .button {
        min-height: 2.75rem;
        height: auto;
        white-space: normal;
    }

    .responsive-card-table,
    .responsive-card-table tbody,
    .responsive-card-table tr,
    .responsive-card-table td {
        display: block;
        width: 100%;
    }

    .responsive-card-table {
        background: transparent;
    }

    .responsive-card-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .responsive-card-table tbody {
        display: grid;
        gap: 1rem;
    }

    .responsive-card-table tr {
        padding: 0.75rem 1rem;
        border: 1px solid var(--impact-border);
        border-radius: 0.75rem;
        background: var(--impact-surface);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    }

    .responsive-card-table td {
        display: grid;
        grid-template-columns: minmax(7.5rem, 40%) minmax(0, 1fr);
        gap: 0.75rem;
        align-items: start;
        padding: 0.55rem 0 !important;
        border: 0 !important;
        overflow-wrap: anywhere;
    }

    .responsive-card-table td::before {
        content: attr(data-label);
        color: var(--impact-muted);
        font-size: 0.75rem;
        font-weight: 700;
        line-height: 1.35;
    }

    .responsive-card-table td[data-label=""]::before {
        display: none;
    }

    .responsive-card-table td[data-label=""] {
        grid-template-columns: 1fr;
    }

    .responsive-card-table .buttons {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .responsive-card-table .button {
        width: 100%;
        min-height: 2.75rem;
    }

    .responsive-scroll-table {
        min-width: 38rem;
    }

    .responsive-key-value-table,
    .responsive-key-value-table tbody,
    .responsive-key-value-table tr,
    .responsive-key-value-table th,
    .responsive-key-value-table td {
        display: block;
        width: 100% !important;
    }

    .responsive-key-value-table tr {
        padding: 0.65rem 0;
        border-bottom: 1px solid var(--impact-border);
    }

    .responsive-key-value-table tr:last-child {
        border-bottom: 0;
    }

    .responsive-key-value-table th,
    .responsive-key-value-table td {
        padding: 0.25rem 0 !important;
        border: 0 !important;
        overflow-wrap: anywhere;
    }

    .responsive-key-value-table th {
        color: var(--impact-muted);
        font-size: 0.75rem;
    }

    .impact-index-block {
        align-items: flex-start;
        flex-direction: column;
    }

    .impact-index-chart {
        overflow: hidden;
    }

    .impact-index-chart .kpi-scale__value {
        max-width: 4rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .impact-form-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
    }

    .impact-form-tabs .button {
        flex: 0 0 auto;
        min-height: 2.75rem;
    }

    .footer {
        padding: 2rem 1rem;
    }

    .footer .level {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }

    .impact-landing-hero .hero-body {
        padding: 2.5rem 1rem;
    }

    .impact-landing-hero .buttons .button {
        width: 100%;
    }

    .impact-preview-value,
    .content,
    .notification {
        overflow-wrap: anywhere;
    }
}

@media screen and (max-width: 480px) {
    .navbar-brand {
        width: 100%;
    }

    .navbar-brand > .navbar-item {
        flex: 1 1 auto;
        overflow: hidden;
    }

    .navbar-brand .navbar-item {
        min-width: 0;
        padding-left: 0.75rem;
        padding-right: 0.25rem;
    }

    .impact-brand-logo {
        width: 2.5rem;
        height: 2.5rem;
        margin-right: 0.5rem !important;
    }

    .impact-brand-copy {
        min-width: 0;
    }

    .impact-brand-title {
        font-size: 0.8125rem;
        overflow-wrap: anywhere;
    }

    .impact-brand-subtitle {
        display: none !important;
    }

    .title.is-1 {
        font-size: 2rem;
    }

    .subtitle.is-3 {
        font-size: 1.35rem;
    }

    .box {
        padding: 1rem;
    }

    .impact-main .button.is-large {
        width: 100%;
        max-width: 100%;
        min-height: 2.75rem;
        height: auto;
        padding-inline: 0.75rem;
        white-space: normal;
    }

    .responsive-card-table td {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}