/* ========================================================================
   KnigaNet home gateway
   ======================================================================== */
.kn-home-gateway {
    display: grid;
    grid-template-columns: minmax(0, 2.35fr) minmax(260px, .95fr);
    gap: 12px;
    margin: 12px 0 22px;
}

.kn-home-gateway__lead,
.kn-home-gateway__panel,
.kn-home-gateway__tiles a {
    border: 1px solid color-mix(in srgb, var(--kn-line) 82%, #ffffff);
    border-radius: 24px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

.kn-home-gateway__lead {
    position: relative;
    min-height: 310px;
    overflow: hidden;
    padding: 30px;
    background:
        radial-gradient(circle at 86% 62%, rgba(255, 255, 255, .16), transparent 32%),
        linear-gradient(135deg, #4b566e 0%, #64738f 52%, #53657e 100%);
    color: #ffffff;
}

.kn-home-gateway__lead::before {
    content: "";
    position: absolute;
    right: -95px;
    bottom: -120px;
    width: 360px;
    height: 360px;
    border: 2px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
}

.kn-home-gateway__lead::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .16;
    background-image:
        linear-gradient(rgba(255, 255, 255, .35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .35) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
}

.kn-home-gateway__copy {
    position: relative;
    z-index: 1;
    max-width: 620px;
}

.kn-home-gateway__badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin-bottom: 18px;
    padding: 0 17px;
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
}

.kn-home-gateway h1 {
    max-width: 580px;
    margin: 0 0 14px !important;
    color: #ffffff !important;
    font-size: clamp(36px, 4.3vw, 58px) !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
    letter-spacing: -.02em !important;
}

.kn-home-gateway p {
    max-width: 580px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, .78);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.55;
}

.kn-home-gateway__actions,
.kn-home-gateway__notes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.kn-home-gateway__actions {
    margin-bottom: 18px;
}

.kn-home-gateway__actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 850;
    line-height: 1;
    text-decoration: none !important;
}

.kn-home-gateway__actions a:first-child {
    border-color: #ffffff;
    background: #ffffff;
    color: #172033;
}

.kn-home-gateway__actions svg {
    margin-right: 8px;
}

.kn-home-gateway__notes {
    color: rgba(255, 255, 255, .78);
    font-size: 14px;
    font-weight: 750;
}

.kn-home-gateway__notes span::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .5);
}

.kn-home-gateway__panel {
    position: relative;
    min-height: 310px;
    overflow: hidden;
    padding: 20px;
    background:
        radial-gradient(circle at 20% 20%, rgba(var(--kn-accent-rgb), .12), transparent 32%),
        radial-gradient(circle at 88% 84%, rgba(83, 101, 126, .14), transparent 34%),
        rgba(255, 255, 255, .78);
}

.kn-home-gateway__panel::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .25;
    background-image:
        linear-gradient(color-mix(in srgb, var(--kn-line) 70%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--kn-line) 70%, transparent) 1px, transparent 1px);
    background-size: 38px 38px;
}

.kn-home-gateway__mini,
.kn-home-gateway__today {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 20px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}

.kn-home-gateway__mini {
    max-width: 260px;
    margin: 28px auto 0;
    padding: 18px;
}

.kn-home-gateway__mini > span,
.kn-home-gateway__today span {
    display: block;
    margin-bottom: 8px;
    color: color-mix(in srgb, var(--kn-accent) 72%, #172033);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    line-height: 1;
    text-transform: uppercase;
}

.kn-home-gateway__mini strong {
    display: block;
    margin-bottom: 12px;
    color: var(--kn-ink);
    font-size: 19px;
    font-weight: 900;
    line-height: 1.2;
}

.kn-home-gateway__mini div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.kn-home-gateway__mini a {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .8);
    color: var(--kn-ink);
    font-size: 13px;
    font-weight: 850;
    line-height: 34px;
    text-align: center;
    text-decoration: none !important;
}

.kn-home-gateway__mini i {
    display: block;
    height: 8px;
    margin-top: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(var(--kn-accent-rgb), .34), rgba(83, 101, 126, .16));
}

.kn-home-gateway__mini i:nth-of-type(2) {
    width: 78%;
}

.kn-home-gateway__mini i:nth-of-type(3) {
    width: 55%;
}

.kn-home-gateway__today {
    width: 190px;
    margin: 12px 0 0 auto;
    padding: 16px;
}

.kn-home-gateway__today strong {
    display: block;
    color: var(--kn-ink);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.35;
}

.kn-home-gateway__tiles {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.kn-home-gateway__tiles a {
    display: flex;
    min-height: 118px;
    padding: 18px;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(255, 255, 255, .86);
    color: var(--kn-ink);
    text-decoration: none !important;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.kn-home-gateway__tiles a:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--kn-accent) 42%, var(--kn-line));
    box-shadow: 0 20px 44px rgba(15, 23, 42, .1);
}

.kn-home-gateway__tiles svg {
    width: 22px;
    height: 22px;
    color: color-mix(in srgb, var(--kn-accent) 70%, #385b92);
}

.kn-home-gateway__tiles strong {
    display: block;
    margin-top: 16px;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.12;
}

.kn-home-gateway__tiles span {
    display: block;
    margin-top: 6px;
    color: var(--kn-muted);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.35;
}

@media (max-width: 900px) {
    .kn-home-gateway {
        grid-template-columns: 1fr;
    }

    .kn-home-gateway__lead,
    .kn-home-gateway__panel {
        min-height: 0;
    }

    .kn-home-gateway__lead {
        padding: 28px 24px;
    }

    .kn-home-gateway__panel {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(180px, .7fr);
        gap: 12px;
    }

    .kn-home-gateway__mini {
        max-width: none;
        margin: 0;
    }

    .kn-home-gateway__today {
        width: auto;
        margin: 0;
    }

    .kn-home-gateway__tiles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .kn-home-gateway {
        gap: 10px;
        margin: 10px 0 18px;
    }

    .kn-home-gateway__lead,
    .kn-home-gateway__panel,
    .kn-home-gateway__tiles a {
        border-radius: 20px;
    }

    .kn-home-gateway__lead {
        padding: 24px 18px;
    }

    .kn-home-gateway h1 {
        font-size: 30px !important;
        line-height: 1.12 !important;
    }

    .kn-home-gateway p {
        font-size: 15px;
        line-height: 1.5;
    }

    .kn-home-gateway__actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .kn-home-gateway__actions a {
        width: 100%;
        min-height: 42px;
    }

    .kn-home-gateway__notes {
        display: grid;
        grid-template-columns: 1fr;
        gap: 7px;
        font-size: 13px;
    }

    .kn-home-gateway__panel {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .kn-home-gateway__mini {
        padding: 16px;
    }

    .kn-home-gateway__mini div {
        grid-template-columns: 1fr 1fr;
    }

    .kn-home-gateway__tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .kn-home-gateway__tiles a {
        min-height: 104px;
        padding: 15px;
    }

    .kn-home-gateway__tiles strong {
        margin-top: 12px;
        font-size: 16px;
    }

    .kn-home-gateway__tiles span {
        font-size: 12px;
    }
}

@media (max-width: 420px) {
    .kn-home-gateway__tiles,
    .kn-home-gateway__mini div {
        grid-template-columns: 1fr;
    }
}
