/* Выпадающие подпункты меню: шапка (по наведению), мобильное меню (раскрывающийся блок), подвал (всплывающий список). */
.menu-caret { display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .6; transition: transform .22s ease, opacity .2s; flex: none; }
a.has-sub:hover .menu-caret, a.has-sub.is-sub-open .menu-caret, .ftr__sub:hover .menu-caret, .ftr__sub.is-open .menu-caret { opacity: 1; }
a.has-sub.is-sub-open .menu-caret, .ftr__sub:hover .menu-caret, .ftr__sub:focus-within .menu-caret, .ftr__sub.is-open .menu-caret { transform: rotate(225deg) translateY(-2px); }

/* панель под пунктом шапки */
.msub { position: fixed; z-index: 1000; width: min(392px, calc(100vw - 16px)); padding: 10px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(8, 14, 28, .12), 0 28px 60px -12px rgba(8, 14, 28, .45); opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: var(--ax, 40px) 0; transition: opacity .2s ease, transform .26s cubic-bezier(.2, .9, .3, 1.2), visibility 0s linear .26s; }
.msub.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.msub::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.msub::after { content: ""; position: absolute; top: -6px; left: calc(var(--ax, 40px) - 6px); width: 12px; height: 12px; background: var(--surface); border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); border-radius: 3px 0 0 0; }
.msub__head { padding: 8px 12px 10px; font: 800 11px/1.2 var(--font-display, inherit); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.msub a, .ftr__col .ftr__subpop a, .drawer__sub a { display: grid; grid-template-columns: 42px 1fr; gap: 1px 12px; align-items: center; padding: 10px 12px; border-radius: 15px; color: var(--ink) !important; text-decoration: none !important; font-size: 14px; transition: background .18s, transform .22s; }
.msub a:hover, .msub a:focus-visible, .ftr__col .ftr__subpop a:hover, .ftr__col .ftr__subpop a:focus-visible, .drawer__sub a:hover { background: var(--sunk); transform: translateX(3px); outline: none; }
.msub a > span, .ftr__col .ftr__subpop a > span, .drawer__sub a > span { grid-row: 1 / 3; width: 42px; height: 42px; display: grid; place-items: center; font-size: 22px; line-height: 1; border-radius: 13px; background: color-mix(in srgb, var(--signal, #008bf9) 12%, var(--sunk)); }
.msub a b, .ftr__col .ftr__subpop a b, .drawer__sub a b { font: 800 14.5px/1.25 var(--font-display, inherit); }
.msub a small, .ftr__col .ftr__subpop a small, .drawer__sub a small { font: 500 12.5px/1.35 var(--font-display, inherit); color: var(--muted); }
.msub a.is-cur { background: color-mix(in srgb, var(--signal, #008bf9) 12%, var(--surface)); }

/* подвал: список всплывает над пунктом при наведении/фокусе/касании */
.ftr__sub { position: relative; }
.ftr__col .ftr__subhead { display: inline-flex; align-items: center; }
.ftr__col .ftr__subpop { position: absolute; z-index: 30; left: -12px; bottom: calc(100% + 10px); width: min(360px, calc(100vw - 32px)); padding: 10px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(8, 14, 28, .12), 0 28px 60px -12px rgba(8, 14, 28, .45); opacity: 0; visibility: hidden; transform: translateY(8px) scale(.98); transform-origin: 30px 100%; transition: opacity .2s ease, transform .26s cubic-bezier(.2, .9, .3, 1.2), visibility 0s linear .26s; }
.ftr__col .ftr__subpop::after { content: ""; position: absolute; left: 0; right: 0; bottom: -14px; height: 14px; }
.ftr__sub:hover .ftr__subpop, .ftr__sub:focus-within .ftr__subpop, .ftr__sub.is-open .ftr__subpop { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

/* мобильное меню: раскрывающийся блок */
.drawer__group { border-radius: 14px; }
.drawer__group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px; padding: 8px 0; font: inherit; font-weight: 800; color: inherit; }
.drawer__group > summary > span:not(.neon):not(.menu-neon) { font-weight: 800; }
.drawer__group > summary::-webkit-details-marker { display: none; }
.drawer__group > summary > span:not(.neon) { flex: 1; min-width: 0; }
.drawer__group[open] > summary .menu-caret { transform: rotate(225deg) translateY(-2px); opacity: 1; }
.drawer__sub { display: grid; gap: 2px; padding: 4px 0 8px 14px; border-left: 2px solid color-mix(in srgb, var(--signal, #008bf9) 40%, transparent); margin-left: 12px; }
@media (prefers-reduced-motion: reduce) { .msub, .ftr__col .ftr__subpop, .menu-caret { transition: none !important; } }
