.qc {
    --sep: rgba(255, 255, 255, 0.08);
    --blue-bright: #00C2FF;
    --blue-dim: rgba(0, 194, 255, 0.12);
    --green: #00D68F;
    --green-dim: rgba(0, 214, 143, 0.1);
    --white: #F2F7FF;
    --muted: rgba(180, 205, 235, 0.62);
    --faint: rgba(160, 190, 225, 0.45);

    --f-display: 'Bebas Neue', sans-serif;
    --f-body: 'IBM Plex Sans', sans-serif;

    font-family: var(--f-body);
    width: 100%;
    margin-top: 28px;
    position: relative;
    background: radial-gradient(ellipse 90% 70% at 100% 120%, rgba(0, 115, 187, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at -5% -10%, rgba(0, 194, 255, 0.08) 0%, transparent 50%),
    linear-gradient(165deg, #07111F 0%, #0C1C30 55%, #091626 100%);
}

.qc::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.qc-stripe {
    height: 3px;
    background: linear-gradient(90deg, #0073BB 0%, #00C2FF 40%, rgba(0, 194, 255, 0.2) 75%, transparent 100%);
    position: relative;
}

.qc-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(200px, 1fr) 3fr;
    gap: 40px;
    align-items: center;
    padding: 32px 40px;
}

/* ── header ── */
.qc-header {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .6s ease, transform .6s ease;
}

.qc-header.vis {
    opacity: 1;
    transform: none;
}

.qc-title {
    font-family: var(--f-display);
    font-size: 40px;
    color: var(--white);
    line-height: 0.95;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.qc-title-accent {
    color: var(--blue-bright);
}

.qc-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--blue-bright);
}

/* ── footnote as tooltip ── */
.qc-info {
    position: relative;
    display: inline-flex;
}

.qc-info-btn {
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid rgba(0, 194, 255, 0.4);
    border-radius: 50%;
    background: transparent;
    color: var(--blue-bright);
    font: 600 11px/16px var(--f-body);
    letter-spacing: 0;
    cursor: help;
}

.qc-info-tip {
    position: absolute;
    z-index: 5;
    left: -8px;
    top: calc(100% + 10px);
    width: 280px;
    padding: 12px 14px;
    background: #0C1C30;
    border: 1px solid var(--sep);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.qc-info:hover .qc-info-tip,
.qc-info:focus-within .qc-info-tip {
    opacity: 1;
    visibility: visible;
}

/* ── cards ── */
/* subgrid держит цифру, подпись и рекламации всех карточек в общих рядах:
   перенос подписи в одной карточке опускает строку рекламаций сразу во всех */
.qc-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto auto;
    min-width: 0;
}

.qc-card {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    align-content: start;
    min-width: 0;
    padding: 4px 28px;
    border-left: 1px solid var(--sep);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .5s ease, transform .5s cubic-bezier(.22, 1, .36, 1);
}

.qc-card.vis {
    opacity: 1;
    transform: none;
}

.qc-num {
    font-family: var(--f-display);
    font-size: clamp(30px, 2.8vw, 40px);
    color: var(--white);
    line-height: 1;
    letter-spacing: 1px;
    white-space: nowrap;
}

.qc-num-unit {
    font-family: var(--f-body);
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
    letter-spacing: 1px;
    margin-left: 4px;
    vertical-align: 6px;
}

.qc-num-label {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    line-height: 1.45;
    text-transform: uppercase;
    color: var(--muted);
}

/* две строки всегда: цифра со словом, под ними пояснение или бейдж */
.qc-quality {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--sep);
    font-size: 12px;
    line-height: 1.3;
    color: var(--faint);
}

.qc-q-row {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
}

.qc-q-number {
    font-family: var(--f-display);
    font-size: 26px;
    line-height: 26px;
    color: var(--white);
}

.qc-q-number.is-zero {
    color: var(--green);
}

.qc-q-number.is-low {
    color: #7DD4AA;
}

.qc-q-number.is-blue {
    color: var(--blue-bright);
}

.qc-q-word {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
}

.qc-q-note {
    line-height: 18px;
    white-space: nowrap;
}

.qc-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
    box-sizing: border-box;
    height: 18px;
    padding: 1px 8px 0;
    border-radius: 1px;
}

.qc-badge img {
    width: 10px;
    height: 10px;
    align-self: center;
}

.qc-badge.green {
    color: var(--green);
    background: var(--green-dim);
    border: 1px solid rgba(0, 214, 143, 0.25);
}

.qc-badge.blue {
    color: var(--blue-bright);
    background: var(--blue-dim);
    border: 1px solid rgba(0, 194, 255, 0.22);
}

/* ── responsive ── */
@media (max-width: 1080px) {
    .qc-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        padding: 28px 32px;
    }

    .qc-header {
        position: relative;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px 20px;
    }

    /* Шапка здесь во всю ширину, и подсказка от значка «i» уезжала за правый
       край экрана: она привязана к шапке и прижата к её правому краю. */
    .qc-info {
        position: static;
    }

    .qc-info-tip {
        left: auto;
        right: 0;
        width: min(320px, 100%);
    }

    .qc-title br {
        display: none;
    }

    .qc-sub {
        margin-top: 0;
    }

    .qc-card:first-child {
        padding-left: 0;
        border-left: none;
    }
}

@media (max-width: 700px) {
    .qc-inner {
        padding: 24px 16px;
        gap: 16px;
    }

    .qc-title {
        font-size: 32px;
    }

    .qc-cards {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
    }

    /* строка карточки: цифра с подписью слева, рекламации справа */
    .qc-card,
    .qc-card:first-child {
        grid-row: auto;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        column-gap: 12px;
        align-items: center;
        padding: 14px 0;
        border-left: none;
        border-top: 1px solid var(--sep);
    }

    .qc-num {
        font-size: 30px;
    }

    .qc-num-label {
        grid-column: 1;
        font-size: 10px;
        letter-spacing: 1px;
    }

    .qc-quality {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-items: flex-end;
        margin: 0;
        padding: 0;
        border: none;
    }
}
