/* Shared footer. Keep overrides scoped so article and Shorts layouts stay intact. */
.footer.site-footer {
    --footer-accent: #6c4dff;
    --footer-ink: #20212a;
    --footer-muted: #6f7385;
    --footer-line: #e9e9f1;
    margin-top: 40px;
    padding: 30px 0 16px;
    border-top: 1px solid var(--footer-line);
    background: #fbfbfe;
    color: var(--footer-ink);
    font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
.footer.site-footer h2,
.footer.site-footer p,
.footer.site-footer a { font-family: inherit; }

body.dark-theme .footer.site-footer,
body:not(.light-theme) .footer.site-footer {
    --footer-ink: #f2f1f7;
    --footer-muted: #a4a2b5;
    --footer-line: rgba(205, 196, 255, .11);
    --footer-accent: #a58bff;
    background: #12121c;
}

.footer.site-footer .site-footer-container { max-width: 1240px; }
.footer.site-footer .site-footer-grid {
    display: grid;
    grid-template-columns: minmax(210px, 1.15fr) minmax(120px, .65fr) minmax(120px, .65fr) minmax(270px, 1.2fr);
    align-items: start;
    gap: 24px;
}
.footer.site-footer .site-footer-grid > * { min-width: 0; }
.footer.site-footer .site-footer-logo {
    display: inline-block;
    margin-bottom: 9px;
    font-size: 27px;
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: -.065em;
    text-decoration: none;
    background: linear-gradient(105deg, #f347ba, #7957ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: none;
}
.footer.site-footer .site-footer-tagline {
    max-width: 250px;
    margin: 0 0 12px;
    color: var(--footer-muted);
    font-size: 12px;
    line-height: 1.6;
}
.footer.site-footer .site-footer-socials { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer.site-footer .site-footer-channel {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid var(--footer-line);
    border-radius: 999px;
    color: var(--footer-ink);
    font-size: 11px;
    font-weight: 650;
    text-decoration: none;
    transition: border-color .18s ease, background-color .18s ease;
}
.footer.site-footer .site-footer-channel svg { width: 17px; height: 17px; color: var(--footer-accent); }
.footer.site-footer .site-footer-channel--x svg { color: var(--footer-ink); }
.footer.site-footer .site-footer-channel:hover { border-color: var(--footer-accent); background: rgba(108, 77, 255, .055); }
.footer.site-footer .site-footer-apps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-width: 280px;
    margin-top: 9px;
}
.footer.site-footer .site-footer-app {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    min-width: 0;
    min-height: 42px;
    padding: 6px 8px;
    border: 1px solid var(--footer-line);
    border-radius: 11px;
    color: var(--footer-ink);
    background: rgba(108, 77, 255, .035);
    text-decoration: none;
    transition: border-color .18s ease, background-color .18s ease;
}
.footer.site-footer .site-footer-app > svg { flex: 0 0 20px; width: 20px; height: 20px; }
.footer.site-footer .site-footer-app--android > svg { color: #26936a; }
body.dark-theme .footer.site-footer .site-footer-app--android > svg { color: #71d9ab; }
.footer.site-footer .site-footer-app > span { min-width: 0; }
.footer.site-footer .site-footer-app strong,
.footer.site-footer .site-footer-app small { display: block; line-height: 1.3; overflow-wrap: anywhere; }
.footer.site-footer .site-footer-app strong { font-size: 11px; font-weight: 750; }
.footer.site-footer .site-footer-app small { margin-top: 2px; color: var(--footer-muted); font-size: 9px; }
.footer.site-footer a.site-footer-app:hover { border-color: var(--footer-accent); background: rgba(108, 77, 255, .075); }
.footer.site-footer .site-footer-mobile-menus { display: none; }
.footer.site-footer .site-footer-heading {
    margin: 3px 0 9px;
    color: var(--footer-ink);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .105em;
    line-height: 1.5;
    text-transform: uppercase;
}
.footer.site-footer .site-footer-links { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.footer.site-footer .site-footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 0;
    color: var(--footer-muted);
    font-size: 12px;
    line-height: 1.5;
    text-decoration: none;
    transition: color .18s ease;
}
.footer.site-footer .site-footer-links a:hover,
.footer.site-footer .site-footer-legal a:hover { color: var(--footer-accent); }
.footer.site-footer .site-footer-telegram {
    position: relative;
    padding: 16px;
    border: 1px solid rgba(108, 77, 255, .14);
    border-radius: 16px;
    background: linear-gradient(130deg, rgba(108, 77, 255, .07), rgba(205, 188, 255, .08));
}
.footer.site-footer .site-footer-telegram-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-bottom: 8px;
    border-radius: 11px;
    color: var(--footer-accent);
    background: rgba(108, 77, 255, .1);
}
.footer.site-footer .site-footer-telegram-icon svg { width: 20px; height: 20px; }
.footer.site-footer .site-footer-telegram .site-footer-heading { display: inline-block; margin: 0 0 0 8px; vertical-align: 9px; color: var(--footer-muted); }
.footer.site-footer .site-footer-telegram-title { margin: 0 0 12px; color: var(--footer-ink); font-size: 19px; font-weight: 800; letter-spacing: -.035em; line-height: 1.3; }
.footer.site-footer .site-footer-telegram-description { display: none; }
.footer.site-footer .site-footer-telegram-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    gap: 12px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: #6c4dff;
    color: #fff;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.5;
    text-decoration: none;
    transition: background-color .18s ease, box-shadow .18s ease;
}
.footer.site-footer .site-footer-telegram-button svg { width: 17px; height: 17px; flex-shrink: 0; }
.footer.site-footer .site-footer-telegram-button:hover { background: #5839df; box-shadow: 0 7px 18px rgba(108, 77, 255, .15); }
.footer.site-footer .site-footer-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    justify-content: space-between;
    gap: 6px 22px;
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--footer-line);
    color: var(--footer-muted);
    font-size: 11px;
    line-height: 1.6;
}
.footer.site-footer .site-footer-bottom p { margin: 0; color: inherit; font-size: inherit; }
.footer.site-footer .site-footer-legal { grid-column: 1 / -1; grid-row: 1; display: flex; justify-content: flex-start; min-width: 0; }
.footer.site-footer .site-footer-legal ul { display: flex; flex-wrap: wrap; justify-content: inherit; gap: 2px 16px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.footer.site-footer .site-footer-legal a { color: var(--footer-muted); text-decoration: none; overflow-wrap: anywhere; }
.footer.site-footer .site-footer-made { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.footer.site-footer .site-footer-made strong { color: var(--footer-ink); font-size: inherit; font-weight: 750; white-space: nowrap; }
.footer.site-footer .site-footer-cookie-settings { display: inline-flex; align-items: center; min-height: 32px; color: var(--footer-muted); text-underline-offset: 3px; }
.footer.site-footer a:focus-visible,
.footer.site-footer summary:focus-visible { outline: 3px solid var(--footer-accent); outline-offset: 4px; border-radius: 5px; }
.footer.site-footer svg { flex-shrink: 0; }

@media (max-width: 980px) {
    .footer.site-footer .site-footer-grid { grid-template-columns: minmax(0, 1.1fr) repeat(2, minmax(0, .7fr)); gap: 20px 28px; }
    .footer.site-footer .site-footer-telegram { grid-column: 1 / -1; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 13px 16px; }
    .footer.site-footer .site-footer-telegram-icon { grid-row: 1 / 3; margin: 0; }
    .footer.site-footer .site-footer-telegram .site-footer-heading { margin: 0 0 3px; }
    .footer.site-footer .site-footer-telegram-title { grid-column: 2; margin: 0; font-size: 17px; }
    .footer.site-footer .site-footer-telegram-button { grid-column: 3; grid-row: 1 / 3; }
    .footer.site-footer .site-footer-tagline { max-width: 310px; }
}

@media (max-width: 760px) {
    .footer.site-footer { margin-top: 24px; padding: 16px 0 calc(76px + env(safe-area-inset-bottom, 0px)); }
    .footer.site-footer .site-footer-container { padding-right: 20px; padding-left: 20px; }
    .footer.site-footer .site-footer-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .footer.site-footer .site-footer-brand {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        grid-column: 1 / -1;
        gap: 9px 10px;
    }
    .footer.site-footer .site-footer-logo { grid-column: 1; grid-row: 1; justify-self: start; margin: 0; font-size: 25px; }
    .footer.site-footer .site-footer-socials { grid-column: 2; grid-row: 1; flex-wrap: nowrap; gap: 6px; }
    .footer.site-footer .site-footer-channel { min-height: 44px; padding: 7px 11px; font-size: 11px; }
    .footer.site-footer .site-footer-channel--x { box-sizing: border-box; width: 44px; height: 44px; justify-content: center; padding: 0; }
    .footer.site-footer .site-footer-channel--x span { display: none; }
    .footer.site-footer .site-footer-apps { grid-column: 1 / -1; grid-row: 2; width: 100%; max-width: none; margin: 0; }
    .footer.site-footer .site-footer-app { min-height: 48px; gap: 9px; }
    .footer.site-footer .site-footer-app strong { font-size: 12px; }
    .footer.site-footer .site-footer-app small { font-size: 10px; }
    .footer.site-footer .site-footer-tagline,
    .footer.site-footer .site-footer-nav,
    .footer.site-footer .site-footer-telegram,
    .footer.site-footer .site-footer-legal { display: none; }
    .footer.site-footer .site-footer-mobile-menus {
        display: block;
        grid-column: 1 / -1;
        order: 2;
        min-width: 0;
        border-top: 1px solid var(--footer-line);
    }
    .footer.site-footer .site-footer-mobile-section { margin: 0; border-bottom: 1px solid var(--footer-line); }
    .footer.site-footer .site-footer-mobile-section > summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        min-height: 44px;
        color: var(--footer-ink);
        font-size: 12px;
        font-weight: 700;
        line-height: 1.4;
        list-style: none;
        cursor: pointer;
    }
    .footer.site-footer .site-footer-mobile-section > summary::marker { content: ''; }
    .footer.site-footer .site-footer-mobile-section > summary::-webkit-details-marker { display: none; }
    .footer.site-footer .site-footer-mobile-section > summary > svg { flex: 0 0 16px; width: 16px; height: 16px; color: var(--footer-muted); }
    .footer.site-footer .site-footer-mobile-section[open] > summary > svg { transform: rotate(180deg); }
    .footer.site-footer .site-footer-mobile-section .site-footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; padding-bottom: 10px; }
    .footer.site-footer .site-footer-mobile-section .site-footer-links a { min-height: 44px; font-size: 12px; }
    .footer.site-footer .site-footer-bottom { grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; margin-top: 10px; padding-top: 8px; font-size: 10px; }
    .footer.site-footer .site-footer-bottom > p:first-child { grid-column: 1 / -1; }
    .footer.site-footer .site-footer-cookie-settings { min-height: 44px; justify-self: start; }
    .footer.site-footer .site-footer-made { justify-self: end; justify-content: flex-end; max-width: 126px; text-align: right; }
}

@media (max-width: 360px) {
    .footer.site-footer .site-footer-channel { box-sizing: border-box; width: 44px; height: 44px; justify-content: center; padding: 0; }
    .footer.site-footer .site-footer-channel span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .footer.site-footer a { transition: none; }
}
