/* 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: 64px;
    padding: 48px 0 24px;
    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: 36px;
}
.footer.site-footer .site-footer-grid > * { min-width: 0; }
.footer.site-footer .site-footer-logo {
    display: inline-block;
    margin-bottom: 15px;
    font-size: 30px;
    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 19px;
    color: var(--footer-muted);
    font-size: 13px;
    line-height: 1.75;
}
.footer.site-footer .site-footer-channel {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    gap: 9px;
    padding: 7px 12px;
    border: 1px solid var(--footer-line);
    border-radius: 999px;
    color: var(--footer-ink);
    font-size: 12px;
    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:hover { border-color: var(--footer-accent); background: rgba(108, 77, 255, .055); }
.footer.site-footer .site-footer-heading {
    margin: 6px 0 15px;
    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: 5px; margin: 0; padding: 0; list-style: none; }
.footer.site-footer .site-footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 3px 0;
    color: var(--footer-muted);
    font-size: 13px;
    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: 22px;
    border: 1px solid rgba(108, 77, 255, .14);
    border-radius: 20px;
    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: 34px;
    height: 34px;
    margin-bottom: 10px;
    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 9px; vertical-align: 12px; color: var(--footer-muted); }
.footer.site-footer .site-footer-telegram-title { margin: 0 0 9px; color: var(--footer-ink); font-size: 22px; font-weight: 800; letter-spacing: -.035em; line-height: 1.3; }
.footer.site-footer .site-footer-telegram-description { margin: 0 0 18px; color: var(--footer-muted); font-size: 12px; line-height: 1.7; }
.footer.site-footer .site-footer-telegram-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    gap: 12px;
    padding: 11px 15px;
    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: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin-top: 36px;
    padding-top: 20px;
    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 { display: flex; justify-content: center; flex: 1 1 400px; flex-wrap: wrap; gap: 8px 16px; }
.footer.site-footer .site-footer-legal ul { display: flex; flex-wrap: wrap; justify-content: inherit; gap: 8px 16px; 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; align-items: center; gap: 7px; }
.footer.site-footer .site-footer-dot { width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: var(--footer-accent); }
.footer.site-footer a:focus-visible { outline: 3px solid var(--footer-accent); outline-offset: 4px; border-radius: 5px; }
.footer.site-footer svg { flex-shrink: 0; }

@media (max-width: 1100px) {
    .footer.site-footer .site-footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px 42px; }
    .footer.site-footer .site-footer-brand { order: 1; }
    .footer.site-footer .site-footer-telegram { order: 2; }
    .footer.site-footer .site-footer-nav { order: 3; }
    .footer.site-footer .site-footer-tagline { max-width: 310px; }
    .footer.site-footer .site-footer-bottom { align-items: flex-start; }
    .footer.site-footer .site-footer-legal { justify-content: flex-start; }
}

@media (max-width: 640px) {
    .footer.site-footer { margin-top: 40px; padding: 30px 0 calc(86px + env(safe-area-inset-bottom, 0px)); }
    .footer.site-footer .site-footer-container { padding-right: 20px; padding-left: 20px; }
    .footer.site-footer .site-footer-grid { gap: 28px 22px; }
    .footer.site-footer .site-footer-brand,
    .footer.site-footer .site-footer-telegram { grid-column: 1 / -1; }
    .footer.site-footer .site-footer-logo { margin-bottom: 10px; font-size: 29px; }
    .footer.site-footer .site-footer-tagline { max-width: 340px; margin-bottom: 13px; }
    .footer.site-footer .site-footer-channel { min-height: 42px; }
    .footer.site-footer .site-footer-heading { margin-top: 0; margin-bottom: 8px; }
    .footer.site-footer .site-footer-links { gap: 0; }
    .footer.site-footer .site-footer-links a { min-height: 42px; }
    .footer.site-footer .site-footer-telegram { padding: 20px; border-radius: 17px; }
    .footer.site-footer .site-footer-telegram-description { max-width: 370px; }
    .footer.site-footer .site-footer-bottom { display: grid; gap: 14px; margin-top: 25px; padding-top: 18px; }
    .footer.site-footer .site-footer-legal { gap: 10px 16px; }
    .footer.site-footer .site-footer-legal ul { gap: 10px 16px; }
    .footer.site-footer .site-footer-legal a { display: inline-flex; align-items: center; min-height: 32px; }
}

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