.ml-hdr {
  --ml-text: #f0f6fc;
  --ml-muted: #a3b9cb;
  --ml-dim: #8199ad;
  --ml-blue: #559ee2;
  --ml-blue-2: #7cb5ed;
  --ml-green: #00a859;
  --ml-green-2: #34ee9d;
  --ml-grad: linear-gradient(100deg, #7cb5ed 0%, #559ee2 34%, #34ee9d 100%);
  --ml-glass:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(85, 158, 226, 0.05) 42%, rgba(0, 98, 51, 0.04) 100%), rgba(8, 18, 24, 0.5);
  --ml-glass-solid: #0a161c;
  --ml-border: rgba(255, 255, 255, 0.13);
  --ml-border-blue: rgba(85, 158, 226, 0.34);
  --ml-shadow: 0 18px 44px -14px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  --ml-soft: rgba(255, 255, 255, 0.05);
  --ml-on-primary: #04121b;
  --ml-nav-bg: rgba(6, 14, 18, 0.66);
  --ml-tile: rgba(85, 158, 226, 0.14);
  --ml-max: 1240px;
  --ml-pad: max(20px, env(safe-area-inset-left));
  --ml-ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-outfit, "Outfit"), system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  color: var(--ml-text);
}

:root[data-theme="light"] .ml-hdr {
  --ml-text: #0d1a24;
  --ml-muted: #3f566a;
  --ml-dim: #556d81;
  --ml-blue: #2f7bc2;
  --ml-blue-2: #1d62a8;
  --ml-green: #007a48;
  --ml-green-2: #00733f;
  --ml-grad: linear-gradient(100deg, #1d62a8 0%, #2a76bd 40%, #00733f 100%);
  --ml-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.62) 100%), rgba(255, 255, 255, 0.5);
  --ml-glass-solid: #ffffff;
  --ml-border: rgba(20, 60, 90, 0.14);
  --ml-border-blue: rgba(47, 123, 194, 0.4);
  --ml-shadow: 0 16px 40px -18px rgba(20, 60, 90, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --ml-soft: rgba(20, 60, 90, 0.05);
  --ml-on-primary: #ffffff;
  --ml-nav-bg: rgba(244, 249, 254, 0.72);
  --ml-tile: rgba(47, 123, 194, 0.12);
}

.ml-hdr,
.ml-hdr *,
.ml-hdr *::before,
.ml-hdr *::after {
  box-sizing: border-box;
}

:where(.ml-hdr) a {
  color: inherit;
  text-decoration: none;
}

.ml-hdr :focus-visible {
  outline: 2px solid var(--ml-blue-2);
  outline-offset: 3px;
}

.ml-hdr [hidden] {
  display: none !important;
}

.ml-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ml-ease), box-shadow 0.25s ease, border-color 0.2s ease, background-color 0.2s ease, filter 0.2s ease;
}

.ml-btn:active {
  transform: scale(0.97);
}

.ml-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ml-btn-primary {
  background: var(--ml-grad);
  color: var(--ml-on-primary);
  box-shadow: 0 14px 32px -12px rgba(85, 158, 226, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.ml-btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow: 0 20px 40px -12px rgba(85, 158, 226, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.ml-btn-glass {
  background: var(--ml-glass);
  border-color: var(--ml-border);
  color: var(--ml-text);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--ml-shadow);
}

.ml-btn-glass:hover {
  transform: translateY(-2px);
  border-color: var(--ml-border-blue);
}

.ml-btn-outline {
  border-color: var(--ml-border-blue);
  background: transparent;
  color: var(--ml-text);
}

.ml-btn-outline:hover {
  transform: translateY(-2px);
  background: var(--ml-tile);
}

.ml-btn-ghost {
  color: var(--ml-muted);
}

.ml-btn-ghost:hover {
  background: var(--ml-soft);
  color: var(--ml-text);
}

.ml-btn-sm {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.875rem;
}

.ml-btn-lg {
  min-height: 58px;
  padding: 0 34px;
  font-size: 1rem;
}

.ml-btn-block {
  width: 100%;
}

.ml-icon-btn {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--ml-border);
  border-radius: 50%;
  background: var(--ml-soft);
  color: var(--ml-text);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.25s var(--ml-ease);
}

.ml-icon-btn:hover {
  border-color: var(--ml-border-blue);
  background: var(--ml-tile);
}

.ml-icon-btn:active {
  transform: scale(0.92);
}

.ml-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: calc(12px + env(safe-area-inset-top)) var(--ml-pad) 0;
  pointer-events: none;
}

.ml-nav-wrap.ml-nav-fixed {
  position: fixed;
  right: 0;
  left: 0;
  z-index: var(--z-header, 60);
}

.ml-nav-wrap.ml-nav-fixed:has(.ml-sheet:not([hidden])) {
  z-index: calc(var(--z-toast, 3000) + 1);
}

.ml-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: var(--ml-max);
  height: 66px;
  margin: 0 auto;
  padding: 0 12px 0 20px;
  border: 1px solid var(--ml-border);
  border-radius: 999px;
  background: var(--ml-nav-bg);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  box-shadow: var(--ml-shadow);
  pointer-events: auto;
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.ml-nav-wrap.is-scrolled .ml-nav {
  box-shadow: 0 22px 50px -16px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.ml-nav-left,
.ml-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ml-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-family: var(--font-outfit, "Outfit"), system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.ml-logo-mark {
  width: 46px;
  height: auto;
  aspect-ratio: 500 / 308;
  transition: transform 0.45s var(--ml-ease);
}

.ml-logo:hover .ml-logo-mark {
  transform: rotate(-5deg) scale(1.06);
}

.ml-logo-text em {
  margin-left: 0.22em;
  font-style: normal;
  background: var(--ml-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.ml-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--ml-border);
  border-radius: 999px;
  background: var(--ml-soft);
}

.ml-nav-links a {
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ml-muted);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.ml-nav-links a:hover {
  color: var(--ml-text);
}

.ml-nav-links a.is-active {
  border-color: var(--ml-border-blue);
  background: var(--ml-tile);
  color: var(--ml-text);
}

.ml-menu {
  position: relative;
  display: inline-flex;
}

.ml-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 14px 9px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ml-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.ml-menu-btn:hover,
.ml-menu.is-open .ml-menu-btn {
  color: var(--ml-text);
}

.ml-menu-btn.is-active {
  border-color: var(--ml-border-blue);
  background: var(--ml-tile);
  color: var(--ml-text);
}

.ml-menu-btn svg {
  transition: transform 0.2s ease;
}

.ml-menu.is-open .ml-menu-btn svg {
  transform: rotate(180deg);
}

.ml-menu-panel {
  position: absolute;
  top: calc(100% + 18px);
  left: 0;
  z-index: 80;
  display: none;
  width: 288px;
  padding: 8px;
  border: 1px solid var(--ml-border);
  border-radius: 22px;
  background: var(--ml-glass-solid);
  box-shadow: 0 30px 70px -16px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  animation: ml-pop 0.22s var(--ml-ease);
}

.ml-menu-panel::before {
  content: "";
  position: absolute;
  top: -20px;
  right: 0;
  left: 0;
  height: 20px;
}

.ml-menu.is-open .ml-menu-panel {
  display: block;
}

.ml-menu-cats {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ml-menu-cat {
  position: static;
}

.ml-menu-catlink,
.ml-menu-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px 0 14px;
  border-radius: 14px;
  color: var(--ml-text);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.ml-menu-catlink svg,
.ml-menu-all svg {
  color: var(--ml-dim);
}

.ml-menu-catlink:hover,
.ml-menu-cat:hover > .ml-menu-catlink,
.ml-menu-cat:focus-within > .ml-menu-catlink,
.ml-menu-all:hover {
  background: var(--ml-soft);
}

.ml-menu-all {
  margin-top: 6px;
  border-top: 1px solid var(--ml-border);
  border-radius: 0 0 14px 14px;
  color: var(--ml-green-2);
  font-weight: 600;
}

:root[data-theme="light"] .ml-menu-all {
  color: var(--ml-green);
}

.ml-menu-fly {
  position: absolute;
  top: 0;
  left: 100%;
  display: none;
  width: 320px;
  padding-left: 10px;
}

.ml-menu-cat:hover > .ml-menu-fly,
.ml-menu-cat:focus-within > .ml-menu-fly {
  display: block;
}

.ml-menu-fly-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: min(72vh, 540px);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--ml-border);
  border-radius: 22px;
  background: var(--ml-glass-solid);
  box-shadow: 0 30px 70px -16px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  animation: ml-pop 0.18s var(--ml-ease);
  scrollbar-width: thin;
}

.ml-menu-flyhead {
  display: block;
  margin-bottom: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--ml-tile);
  color: var(--ml-text);
  font-size: 0.875rem;
  font-weight: 700;
}

.ml-menu-tool {
  display: block;
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--ml-muted);
  font-size: 0.875rem;
  line-height: 1.35;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.ml-menu-tool:hover,
.ml-menu-flyhead:hover {
  background: var(--ml-soft);
  color: var(--ml-text);
}

.ml-acc > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 18px;
  font-family: var(--font-outfit, "Outfit"), sans-serif;
  font-size: 1.25rem;
  font-weight: 400;
  list-style: none;
  cursor: pointer;
}

.ml-acc > summary::-webkit-details-marker {
  display: none;
}

.ml-acc > summary:hover {
  background: var(--ml-soft);
}

.ml-acc > summary svg {
  color: var(--ml-dim);
  transition: transform 0.2s ease;
}

.ml-acc[open] > summary svg {
  transform: rotate(180deg);
}

.ml-acc-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px 0 8px 12px;
}

.ml-sheet-links .ml-acc-link {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  color: var(--ml-muted);
  font-family: var(--font-outfit, "Outfit"), system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.9375rem;
}

.ml-sheet-links .ml-acc-link.is-head {
  color: var(--ml-text);
  font-weight: 600;
}

.ml-acc-sub > summary {
  min-height: 46px;
  font-family: var(--font-outfit, "Outfit"), system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 500;
}

.ml-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--ml-border);
  border-radius: 999px;
  color: var(--ml-muted);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.ml-lang:hover {
  border-color: var(--ml-border-blue);
  background: var(--ml-tile);
  color: var(--ml-text);
}

.ml-burger {
  display: none;
}

.ml-account {
  position: relative;
}

.ml-account-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 10px 0 5px;
  border: 1px solid var(--ml-border);
  border-radius: 999px;
  background: var(--ml-soft);
  color: var(--ml-text);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ml-account-btn:hover,
.ml-account-btn[aria-expanded="true"] {
  border-color: var(--ml-border-blue);
  background: var(--ml-tile);
}

.ml-account-chevron {
  color: var(--ml-dim);
  transition: transform 0.2s ease;
}

.ml-account-btn[aria-expanded="true"] .ml-account-chevron {
  transform: rotate(180deg);
}

.ml-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ml-grad);
  color: var(--ml-on-primary);
  font-family: var(--font-outfit, "Outfit"), sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
}

.ml-avatar-lg {
  width: 46px;
  height: 46px;
  font-size: 1.125rem;
}

.ml-popup {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(330px, calc(100vw - 28px));
  padding: 16px;
  border: 1px solid var(--ml-border);
  border-radius: 24px;
  background: var(--ml-glass-solid);
  box-shadow: 0 30px 70px -16px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  animation: ml-pop 0.22s var(--ml-ease);
}

.ml-popup-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ml-border);
}

.ml-popup-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ml-popup-id strong {
  font-size: 0.9375rem;
}

.ml-popup-id span {
  overflow: hidden;
  color: var(--ml-muted);
  font-size: 0.8125rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ml-popup-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ml-popup-label {
  color: var(--ml-dim);
  font-size: 0.8125rem;
  font-weight: 600;
}

.ml-popup-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--ml-text);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.ml-popup-link:hover {
  background: var(--ml-soft);
}

.ml-popup-danger {
  color: #ff8f8f;
}

:root[data-theme="light"] .ml-popup-danger {
  color: #b42323;
}

.ml-seg {
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--ml-border);
  border-radius: 999px;
  background: var(--ml-soft);
}

.ml-seg > * {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ml-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.ml-seg > .is-on {
  background: var(--ml-tile);
  color: var(--ml-text);
  box-shadow: inset 0 0 0 1px var(--ml-border-blue);
}

.ml-sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  background: rgba(3, 8, 11, 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  animation: ml-fade 0.2s ease;
}

.ml-sheet-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 100%;
  overflow-y: auto;
  padding: 16px;
  border: 1px solid var(--ml-border);
  border-radius: 30px;
  background: var(--ml-glass-solid);
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.75);
  animation: ml-pop 0.28s var(--ml-ease);
}

.ml-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ml-sheet-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ml-sheet-links a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 18px;
  font-family: var(--font-outfit, "Outfit"), sans-serif;
  font-size: 1.25rem;
  font-weight: 400;
}

.ml-sheet-links a:hover {
  background: var(--ml-soft);
}

.ml-sheet-actions,
.ml-sheet-prefs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}@keyframes ml-pop {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ml-pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@keyframes ml-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.ml-nav-links a[aria-current="page"] {
  border-color: var(--ml-border-blue);
  background: var(--ml-tile);
  color: var(--ml-text);
}

.ml-nav-signup {
  white-space: nowrap;
}

.ml-avatar-skeleton {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ml-soft);
  animation: ml-pulse 1.2s ease-in-out infinite;
}

.ml-icon-sun,
.ml-icon-moon {
  display: none;
}

:root:not([data-theme="light"]) .ml-icon-sun,
:root[data-theme="light"] .ml-icon-moon {
  display: block;
}

.ml-seg > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

@media (max-width: 1180px) {
  .ml-nav-links {
    display: none;
  }

  .ml-burger {
    display: inline-grid;
  }
}

@media (max-width: 760px) {
  .ml-nav {
    height: 60px;
    padding: 0 8px 0 14px;
  }

  .ml-nav-theme {
    display: none;
  }
}

@media (max-width: 640px) {
  .ml-nav-login,
  .ml-lang {
    display: none;
  }
}

@media (max-width: 380px) {
  .ml-logo-text {
    display: none;
  }
}

@media (hover: none) and (pointer: coarse) {
  .ml-btn-sm {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ml-hdr *,
  .ml-hdr *::before,
  .ml-hdr *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .ml-nav,
  .ml-btn-glass,
  .ml-sheet {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .ml-hdr {
    --ml-glass: var(--ml-glass-solid);
    --ml-nav-bg: var(--ml-glass-solid);
  }

  .ml-sheet {
    background: rgba(3, 8, 11, 0.92);
  }
}

@media (prefers-contrast: more) {
  .ml-hdr {
    --ml-border: rgba(255, 255, 255, 0.42);
    --ml-border-blue: rgba(124, 181, 237, 0.85);
    --ml-muted: #d3e0ea;
    --ml-dim: #b9cad8;
  }

  :root[data-theme="light"] .ml-hdr {
    --ml-border: rgba(13, 26, 36, 0.55);
    --ml-border-blue: rgba(29, 98, 168, 0.9);
    --ml-muted: #22384a;
    --ml-dim: #34495b;
  }
}
