:root {
    --ink: #14191c;
    --muted: #6f777c;
    --line: #e6e8e8;
    --bg: #f6f7f6;
    --white: #fff;
    --red: #ef284c;
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, Arial, sans-serif;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    text-decoration: none;
    color: inherit;
}

.wrap {
    width: min(1220px, calc(100% - 44px));
    margin: auto;
}

.hidden {
    display: none !important;
}


/* =========================================================
   HEADER
   ========================================================= */

.header {
    position: sticky;
    top: 0;
    z-index: 50;

    background: #fff;
    border-bottom: 1px solid var(--line);

    backdrop-filter: blur(14px);
}

.nav {
    height: 80px;

    display: flex;
    align-items: center;
    gap: 34px;
}

.brand {
    border: 0;
    background: none;

    display: flex;
    align-items: center;
    gap: 12px;

    font-weight: 800;
    padding: 0;
}

.brand-logo {
    width: 200px;
    height: 68px;

    object-fit: contain;
    object-position: left center;

    filter: brightness(0);
    background: transparent;
}

.brand-divider {
    width: 1px;
    height: 26px;
    background: #d7d9da;
}

.brand-komek {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.navlinks {
    display: flex;
    align-items: center;
    gap: 24px;

    margin: auto;
}

.navlinks button,
.mobile-nav button {
    border: 0;
    background: none;

    color: #121617;

    font-size: 14px;
    font-weight: 600;
}

.navlinks button:hover {
    color: #000;
}

.navright {
    display: flex;
    gap: 9px;
    align-items: center;
}

.search-square {
    width: 48px;
    height: 48px;

    border: 1px solid #dfe2e3;
    background: #fff;

    border-radius: 13px;

    font-size: 26px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    background: #111517;
    color: #fff;

    padding: 9px 14px;

    border-radius: 12px;

    font-size: 12px;
    font-weight: 700;

    white-space: nowrap;
}

.burger {
    display: none;

    border: 1px solid var(--line);
    background: #fff;

    border-radius: 10px;

    width: 39px;
    height: 39px;
}

.mobile-nav {
    display: none;
}


/* HERO — контент по центру страницы */
.photo-hero {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 60px 0 55px;
}

/* Убираем деление на две колонки */
.hero-photo-grid {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Центральный блок */
.hero-photo-copy {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    text-align: center;
}

/* Заголовок */
.hero-photo-copy h1 {
    margin: 0 0 18px;

    font-size: 48px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.05em;

    color: #14191c;
}

/* Описание */
.hero-photo-copy > p {
    max-width: 680px;
    margin: 0 auto;

    font-size: 18px;
    line-height: 1.6;

    color: #6e7579;
}

/* Поиск */
.photo-search {
    width: 100%;
    max-width: 840px;
    height: 58px;

    margin: 32px auto 0;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 6px 18px;

    background: #fff;

    border: 1px solid #d9ddde;
    border-radius: 12px;
}

.photo-search > span {
    font-size: 23px;
    color: #9aa0a3;
}

.photo-search input {
    width: 100%;
    flex: 1;

    border: 0;
    outline: none;

    background: transparent;

    font-size: 14px;
    color: #14191c;
}

.photo-search input::placeholder {
    color: #8a9194;
}

/* Старую карточку справа скрываем */
.support-card {
    display: none;
}
/* =========================================================
   SUPPORT CARD
   КАРТИНКА 250 × 200
   ========================================================= */

.support-card {
    width: 100%;

    min-height: 256px;

    border: 1px solid #dfe2e3;
    border-radius: 16px;

    background: #fff;

    display: grid;

    /* Картинка занимает ровно 250px */
    grid-template-columns: 250px minmax(0, 1fr);

    gap: 24px;

    align-items: center;

    padding: 28px;
}

.support-illustration {
    width: 250px;
    height: 200px;

    position: relative;

    overflow: hidden;

    border-radius: 16px;

    background: #f5f6f6;

    flex-shrink: 0;
}


/* Если внутри support-illustration обычная картинка */

.support-illustration img {
    display: block;

    width: 250px;
    height: 200px;

    object-fit: cover;
    object-position: center;

    border-radius: 16px;
}


/* Если используется старая CSS-иллюстрация */

.octo-head {
    position: absolute;

    left: 72px;
    top: 38px;

    font-size: 48px;
}

.octo-body {
    position: absolute;

    left: 78px;
    top: 78px;

    font-size: 68px;

    transform: rotate(20deg);
}

.laptop {
    position: absolute;

    left: 115px;
    bottom: 20px;

    font-size: 62px;
}


/* SUPPORT TEXT */

.support-card h3 {
    margin: 0 0 10px;

    color: #14191c;

    font-size: 24px;
    line-height: 1.2;
    font-weight: 800;
}

.support-card p {
    margin: 0 0 22px;

    color: #777e82;

    font-size: 16px;
    line-height: 1.5;
}

.support-card a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 15px 20px;

    background: #111517;
    color: #fff;

    border-radius: 10px;

    font-size: 15px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.support-card a:hover {
    background: #292f32;

    transform: translateY(-1px);
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.photo-content {
    background: #fff;
}

.content-photo-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        320px;

    border-left: 1px solid transparent;
}

.main-column {
    padding: 26px 34px 30px 0;
}


/* =========================================================
   CATEGORY CARDS
   ========================================================= */

.photo-cards {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 16px;
}

.photo-card {
    min-height: 152px;

    border: 1px solid #dfe2e3;
    border-radius: 12px;

    padding: 20px;

    background: #fff;

    display: grid;

    grid-template-columns:
        44px
        1fr;

    column-gap: 16px;

    cursor: pointer;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.photo-card:hover {
    transform: translateY(-2px);

    border-color: #cbd0d2;

    box-shadow:
        0 10px 25px
        rgba(0, 0, 0, 0.05);
}

.photo-icon {
    width: 44px;
    height: 44px;

    border: 1px solid #d8dcdd;
    border-radius: 11px;

    display: grid;
    place-items: center;

    font-size: 22px;
}

.photo-card h3 {
    font-size: 17px;

    margin: 4px 0 7px;
}

.photo-card p {
    font-size: 12px;
    line-height: 1.65;

    color: #6f777b;

    margin: 0;
}

.photo-card > span {
    grid-column: 1 / -1;

    margin-top: 17px;

    font-size: 12px;
    font-weight: 700;
}


/* =========================================================
   UPDATES
   ========================================================= */

.updates-head {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-top: 28px;
}

.updates-head h3 {
    font-size: 15px;
}

.updates-head button {
    border: 0;
    background: none;

    color: #747b7e;

    font-size: 12px;
}

.updates-table {
    border: 1px solid #e1e3e4;
    border-radius: 12px;

    overflow: hidden;
}

.update-row {
    display: grid;

    grid-template-columns:
        28px
        1.25fr
        105px
        1.9fr
        80px;

    align-items: center;

    gap: 12px;

    padding: 13px 16px;

    border-bottom: 1px solid #eceeee;

    font-size: 11px;
}

.update-row:last-child {
    border-bottom: 0;
}

.update-row strong {
    font-size: 12px;
}

.update-row > span {
    color: #777e81;
}

.update-row em {
    font-style: normal;

    text-align: center;

    border: 1px solid #e0e2e3;
    border-radius: 7px;

    padding: 4px 6px;

    color: #777e81;
}

.update-ico {
    color: #121617 !important;
}


/* =========================================================
   RIGHT SIDEBAR
   ========================================================= */

.right-rail {
    border-left: 1px solid #e3e5e6;

    padding: 24px 0 28px 32px;
}

.rail-block {
    padding: 0 0 22px;
}

.rail-block h3 {
    font-size: 14px;

    margin: 0 0 12px;
}

.rail-block > button {
    width: 100%;

    display: flex;
    justify-content: space-between;

    gap: 14px;

    padding: 12px 0;

    border: 0;
    border-bottom: 1px solid #eff0f0;

    background: none;

    text-align: left;

    font-size: 12px;
    font-weight: 600;
}

.rail-block > button span {
    font-size: 18px;
    font-weight: 400;
}


/* =========================================================
   RELEASE STATUS
   ========================================================= */

.status-block {
    border: 1px solid #e1e3e4;

    border-radius: 13px;

    padding: 18px;
}

.status-block > div {
    display: grid;

    grid-template-columns:
        10px
        1fr;

    gap: 10px;

    margin: 16px 0;
}

.status-block strong {
    display: block;

    font-size: 12px;
}

.status-block small {
    display: block;

    color: #777f82;

    font-size: 11px;

    margin-top: 4px;
}

.dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    margin-top: 4px;
}

.blue {
    background: #4b7bb7;
}

.yellow {
    background: #f0b71b;
}

.red {
    background: #f03d35;
}

.green {
    background: #11a63b;
}


/* =========================================================
   CATEGORY PAGE
   ========================================================= */

.content-layout {
    display: grid;

    grid-template-columns:
        235px
        1fr;

    gap: 60px;

    padding: 46px 0 90px;
}

.side {
    position: sticky;

    top: 104px;

    height: max-content;
}

.side-back {
    border: 0;
    background: none;

    padding: 0 0 24px;

    color: #6f777b;

    font-size: 13px;
}

.side-label {
    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.13em;

    color: #969c9f;

    margin-bottom: 10px;
}

.side #sideLinks,
.side #articleSideLinks {
    display: grid;

    gap: 3px;
}

.side #sideLinks button,
.side #articleSideLinks button {
    border: 0;

    background: none;

    text-align: left;

    padding: 9px 11px;

    border-radius: 9px;

    color: #5c6468;

    font-size: 13px;
}

.side button.active,
.side #sideLinks button:hover,
.side #articleSideLinks button:hover {
    background: #eaeceb;

    color: #151a1d;
}

.crumb {
    font-size: 12px;

    color: #9aa0a3;

    margin-bottom: 21px;
}

.cat-title-row {
    display: flex;

    justify-content: space-between;

    gap: 30px;

    border-bottom: 1px solid var(--line);

    padding-bottom: 34px;
}

.cat-title-row h1,
.article-top h1,
.files-page h1 {
    font-size: 48px;

    letter-spacing: -0.055em;

    margin: 0 0 14px;
}

.cat-title-row p,
.article-top p,
.files-lead {
    color: var(--muted);

    line-height: 1.7;

    max-width: 700px;
}

.cat-index {
    font-size: 52px;
    font-weight: 800;

    color: #d8dbdc;
}


/* =========================================================
   ARTICLE CARDS
   ========================================================= */

.article-cards {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 13px;

    margin-top: 28px;
}

.article-card {
    background: #fff;

    border: 1px solid var(--line);

    border-radius: 15px;

    padding: 20px;

    cursor: pointer;
}

.article-card:hover {
    border-color: #bdc2c3;
}

.article-card small {
    font-size: 10px;

    color: #969c9f;

    text-transform: uppercase;

    letter-spacing: 0.1em;
}

.article-card h3 {
    font-size: 16px;

    margin: 14px 0 8px;
}

.article-card p {
    font-size: 13px;

    color: #737b7f;

    line-height: 1.6;

    margin: 0;
}


/* =========================================================
   ARTICLE PAGE
   ========================================================= */

.article-layout {
    display: grid;

    grid-template-columns:
        205px
        minmax(0, 1fr)
        235px;

    gap: 46px;

    padding: 44px 0 90px;
}

.article-top {
    border-bottom: 1px solid var(--line);

    padding-bottom: 32px;
}

.article-tag {
    display: inline-block;

    background: #171c1f;

    color: #fff;

    border-radius: 999px;

    padding: 7px 10px;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 0.1em;
}

.article-body h2 {
    font-size: 24px;

    letter-spacing: -0.025em;

    margin: 38px 0 12px;
}

.article-body p,
.article-body li {
    color: #525a5e;

    line-height: 1.8;

    font-size: 14px;
}

.article-body ul,
.article-body ol {
    padding-left: 22px;
}


/* =========================================================
   CALLOUT
   ========================================================= */

.callout {
    background: #fff;

    border: 1px solid var(--line);
    border-left: 4px solid #171c1f;

    border-radius: 12px;

    padding: 16px 18px;

    margin: 20px 0;

    font-size: 13px;
    line-height: 1.7;
}

.warning {
    border-left-color: #ef284c;

    background: #fff9fa;
}


/* =========================================================
   STEPS
   ========================================================= */

.steps {
    display: grid;

    gap: 10px;

    margin: 18px 0;
}

.step {
    display: grid;

    grid-template-columns:
        32px
        1fr;

    gap: 12px;

    padding: 15px;

    border: 1px solid var(--line);

    background: #fff;

    border-radius: 12px;
}

.step b {
    width: 28px;
    height: 28px;

    background: #171c1f;

    color: #fff;

    border-radius: 50%;

    display: grid;
    place-items: center;

    font-size: 11px;
}

.step strong {
    font-size: 14px;
}

.step p {
    margin: 5px 0 0;
}


/* =========================================================
   DATA GRID
   ========================================================= */

.data-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 10px;

    margin: 17px 0;
}

.data-item {
    padding: 14px;

    background: #fff;

    border: 1px solid var(--line);

    border-radius: 12px;

    font-size: 13px;
}


/* =========================================================
   SOURCE DOWNLOAD
   ========================================================= */

.source-download {
    display: flex;

    justify-content: space-between;
    align-items: center;

    background: #171c1f;

    color: #fff;

    border-radius: 14px;

    padding: 18px;

    margin: 26px 0;
}

.source-download small {
    display: block;

    color: #969ea2;

    margin-top: 5px;
}

.source-download a {
    font-weight: 700;

    font-size: 13px;
}


/* =========================================================
   HELP BOX
   ========================================================= */

.help-box {
    margin-top: 50px;

    border-top: 1px solid var(--line);

    padding-top: 28px;

    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;
}

.help-box p {
    color: #7a8285;

    font-size: 13px;
}

.help-box a {
    font-weight: 700;
}


/* =========================================================
   TABLE OF CONTENTS
   ========================================================= */

.toc {
    position: sticky;

    top: 104px;

    height: max-content;
}

.tocbox {
    background: #fff;

    border: 1px solid var(--line);

    border-radius: 13px;

    padding: 16px;

    margin-bottom: 11px;
}

.tocbox strong {
    font-size: 12px;
}

.tocbox #toc {
    display: grid;

    margin-top: 9px;
}

.tocbox #toc a {
    font-size: 11px;

    color: #747c80;

    padding: 7px 0;
}

.sourcebox small {
    display: block;

    color: #9da3a6;

    font-size: 9px;

    letter-spacing: 0.12em;

    margin-bottom: 10px;
}

.sourcebox strong {
    display: block;

    line-height: 1.5;
}

.sourcebox a {
    display: block;

    margin-top: 13px;

    font-size: 12px;
    font-weight: 700;
}


/* =========================================================
   FILES
   ========================================================= */

.files-page {
    padding: 65px 0 90px;
}

.files-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 13px;

    margin-top: 32px;
}

.filecard {
    background: #fff;

    border: 1px solid var(--line);

    border-radius: 15px;

    padding: 20px;

    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;
}

.filecard strong {
    font-size: 15px;
}

.filecard p {
    font-size: 12px;

    color: #838a8e;

    margin: 6px 0 0;
}

.filecard a {
    background: #171c1f;

    color: #fff;

    padding: 10px 12px;

    border-radius: 9px;

    font-size: 12px;
    font-weight: 700;
}


/* =========================================================
   SEARCH MODAL
   ========================================================= */

.search-modal {
    position: fixed;

    inset: 0;

    background: rgba(14, 18, 20, 0.48);

    backdrop-filter: blur(7px);

    z-index: 100;

    display: flex;

    justify-content: center;
    align-items: flex-start;

    padding-top: 110px;
}

.search-window {
    width: min(
        720px,
        calc(100% - 28px)
    );

    background: #fff;

    border-radius: 18px;

    box-shadow:
        0 30px 80px
        rgba(0, 0, 0, 0.22);

    overflow: hidden;
}

.search-head {
    display: flex;

    align-items: center;

    border-bottom: 1px solid var(--line);

    padding-left: 18px;
}

.search-head span {
    font-size: 24px;

    color: #8c9396;
}

.search-head input {
    flex: 1;

    border: 0;
    outline: 0;

    padding: 20px 12px;

    font-size: 16px;
}

.search-head button {
    border: 0;

    background: none;

    padding: 20px;
}

.result {
    padding: 15px 18px;

    cursor: pointer;

    border-bottom: 1px solid #f1f2f2;
}

.result:hover {
    background: #f7f8f7;
}

.result strong {
    font-size: 14px;
}

.result p {
    font-size: 12px;

    color: #858c90;

    margin: 5px 0 0;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
    background: #0f1315;

    color: #fff;

    padding: 50px 0;
}

.footer-photo {
    display: grid;

    grid-template-columns:
        1.2fr
        1.3fr
        1fr
        1fr
        auto;

    align-items: center;

    gap: 28px;
}

.footer-brand-row img {
    width: 180px;
    height: 60px;

    object-fit: contain;

    filter:
        brightness(0)
        invert(1);
}

.footer-copy,
.footer-photo > a {
    color: #b0b6b8;

    font-size: 12px;
}

.socials {
    display: flex;

    gap: 10px;
}

.socials a {
    width: 38px;
    height: 38px;

    border-radius: 10px;

    background: #171d20;

    display: grid;
    place-items: center;

    color: #fff;

    font-size: 12px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .navlinks {
        display: none;
    }

    .burger {
        display: block;
    }

    .mobile-nav.open {
        display: grid;

        position: absolute;

        top: 80px;
        left: 0;
        right: 0;

        padding: 12px;

        background: #fff;

        border-bottom: 1px solid var(--line);
    }

    .mobile-nav button {
        text-align: left;

        padding: 13px;
    }

    .hero-photo-grid {
        grid-template-columns: 1fr;

        gap: 35px;
    }

    .support-card {
        grid-template-columns:
            250px
            minmax(0, 1fr);

        max-width: 700px;
    }

    .support-illustration {
        width: 220px;
        height: 200px;
    }

    .support-illustration img {
        width: 220px;
        height: 200px;
    }

    .content-photo-grid {
        grid-template-columns: 1fr;
    }

    .right-rail {
        border-left: 0;

        border-top: 1px solid #e3e5e6;

        padding-left: 0;
    }

    .photo-cards {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .article-layout {
        grid-template-columns:
            190px
            1fr;
    }

    .toc {
        display: none;
    }

    .footer-photo {
        grid-template-columns:
            1fr
            1fr;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 720px) {

    .wrap {
        width: min(
            100% - 24px,
            1220px
        );
    }

    .nav {
        height: 70px;
    }

    .brand-logo {
        width: 145px;
        height: 55px;
    }

    .brand-komek {
        font-size: 15px;
    }

    .contact-btn {
        display: none;
    }

    .photo-hero {
        padding: 36px 0;
    }

    .hero-photo-copy h1 {
        font-size: 38px;
    }

    .hero-photo-copy > p {
        font-size: 15px;
    }


    /* SUPPORT MOBILE */

    .support-card {
        grid-template-columns: 1fr;

        gap: 20px;

        padding: 20px;

        max-width: 100%;
    }

    .support-illustration {
        display: block;

        width: 100%;
        height: 200px;
    }

    .support-illustration img {
        width: 100%;
        height: 200px;

        object-fit: cover;
        object-position: center;
    }

    .support-card h3 {
        font-size: 21px;
    }

    .support-card p {
        font-size: 14px;

        margin-bottom: 18px;
    }

    .support-card a {
        width: 100%;

        padding: 15px;
    }


    /* CARDS */

    .main-column {
        padding-right: 0;
    }

    .photo-cards {
        grid-template-columns: 1fr;
    }


    /* UPDATES */

    .update-row {
        grid-template-columns:
            24px
            1fr
            80px;
    }

    .update-row > span:nth-of-type(2),
    .update-row em {
        display: none;
    }


    /* CATEGORY / ARTICLE */

    .content-layout,
    .article-layout {
        grid-template-columns: 1fr;

        gap: 20px;
    }

    .side {
        position: static;
    }

    .article-side {
        display: none;
    }

    .article-cards,
    .data-grid,
    .files-grid {
        grid-template-columns: 1fr;
    }

    .cat-title-row h1,
    .article-top h1,
    .files-page h1 {
        font-size: 37px;
    }

    .cat-index {
        display: none;
    }


    /* RIGHT RAIL */

    .right-rail {
        padding-top: 24px;
    }


    /* HELP */

    .help-box {
        align-items: flex-start;

        flex-direction: column;
    }


    /* FOOTER */

    .footer-photo {
        grid-template-columns: 1fr;
    }
}