/* assets/css/aixram.mobile.css */
/* Only overrides inside media to avoid breaking desktop */

@media (max-width: 980px) {
  /* prevent horizontal scroll globally */
  html, body { overflow-x: hidden; }

  /* topbar: compact layout */
  .z-topbar__row {
    gap: 10px;
    min-height: 64px;
  }

  /* topmenu: wrap clean */
  .z-topmenu {
    gap: 10px 12px;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  /* hero spacing */
  .z-hero { padding: 22px; }

  /* landing hero becomes single column */
  .z-hero--landing {
    grid-template-columns: 1fr !important;
    min-height: 0;
  }

  .z-hero--landing[data-live-hero="aixram"] {
    background:
      radial-gradient(140% 150% at 0% 0%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 252, 247, 0.95) 24%, rgba(243, 245, 244, 0.9) 54%, rgba(220, 225, 229, 0.88) 100%) !important,
      linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(248, 249, 247, 0.44) 28%, rgba(235, 238, 240, 0.7) 66%, rgba(220, 225, 229, 0.9) 100%) !important;
    border-color: rgba(220, 225, 229, 0.9) !important;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06), 0 6px 18px rgba(15, 23, 42, 0.04) !important;
  }

  .z-hero--landing[data-live-hero="aixram"]::before,
  .z-hero--landing[data-live-hero="aixram"]::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 0;
  }

  .z-hero--landing[data-live-hero="aixram"] > .z-hero__live {
    display: none !important;
  }

  .z-hero--landing[data-live-hero="aixram"]::before {
    top: -18%;
    left: -10%;
    width: 64%;
    height: 54%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 76%);
    filter: blur(10px);
    animation: mobileHeroGlowFloat 14s ease-in-out infinite alternate;
  }

  .z-hero--landing[data-live-hero="aixram"]::after {
    right: -14%;
    bottom: -16%;
    width: 58%;
    height: 50%;
    background: radial-gradient(circle, rgba(235, 238, 240, 0.52) 0%, rgba(235, 238, 240, 0) 78%);
    filter: blur(12px);
    animation: mobileHeroGlowFloat 18s ease-in-out infinite alternate-reverse;
  }

  .z-hero--landing[data-live-hero="aixram"] .z-hero__title {
    color: #0B0D0B !important;
  }

  .z-hero--landing[data-live-hero="aixram"] .z-hero__desc,
  .z-hero--landing[data-live-hero="aixram"] .z-hero__resourceMeta {
    color: #666D78 !important;
  }

  .z-hero--landing[data-live-hero="aixram"] .z-search--hero {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(252, 252, 250, 0.84) 100%) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07) !important;
  }

  .z-hero--landing[data-live-hero="aixram"] .z-search__select {
    background-color: rgba(248, 250, 252, 0.92) !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
    color: #374151 !important;
  }

  .z-hero__art {
    min-height: 200px;
  }

  /* discover becomes single column */
  .z-discover {
    grid-template-columns: 1fr;
  }

  /* universities: avoid sticky rail overflow on small screens */
  .z-uni-rail {
    position: static;
    top: auto;
  }
}

@keyframes mobileHeroGlowFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.88;
  }
  50% {
    transform: translate3d(2%, -3%, 0) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translate3d(-2%, 2%, 0) scale(1.02);
    opacity: 0.9;
  }
}

@media (max-width: 640px) {
  /* tighter page paddings */
  .z-shell,
  .z-layout {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .z-layout {
    margin: 12px 0 18px;
  }

  /* topbar: keep it minimal */
  [data-shared-header]:empty { min-height: var(--z-header-placeholder-height-mobile); }
  .z-topbar__row { padding: 8px 0; }

  /* brand text: prevent overflow */
  .z-brand__sub { display: none; }
  .z-brand__name { font-size: 14px; }

  /* buttons: no overflow */
  .z-btn { height: 36px; }
  .z-topbar__right { width: 100%; flex-wrap: wrap; justify-content: flex-start; }

  /* hero: smaller typography */
  .z-hero {
    padding: 16px !important;
    border-radius: 18px;
  }

  .z-hero__title {
    font-size: clamp(28px, 9vw, 36px) !important;
    line-height: 1.08;
  }

  .z-hero__desc {
    font-size: 16px !important;
    margin: 10px 0 14px;
  }

  /* search: stack to avoid cramped row */
  .z-search--hero {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 10px !important;
  }

  .z-search__icon { display: none; }
  .z-search__input {
    width: 100% !important;
    height: 44px;
  }

  .z-search__select,
  .z-search__submit {
    width: 100% !important;
    height: 42px !important;
  }

  /* grids to single column */
  .z-cats,
  .z-citylist,
  .z-cards {
    grid-template-columns: 1fr !important;
  }

  /* cards and panels: tighter padding */
  .z-grid,
  .z-guide,
  .z-discover__main,
  .z-sidepanel {
    padding: 14px !important;
    border-radius: 18px;
  }

  /* footer stack */
  .z-footer__inner,
  .z-footer__right {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Universities page: neutralize absolute media that breaks mobile */
  .z-uni-shell {
    grid-template-columns: 1fr !important;
  }

  .z-uni-hero {
    padding: 16px !important;
  }

  .z-uni-hero__media {
    position: relative !important;
    width: 100% !important;
    height: 220px !important;
    border-radius: 16px !important;
    margin-top: 12px !important;
    right: auto !important;
    top: auto !important;
  }

  .z-uni-hero__title {
    font-size: clamp(30px, 9vw, 40px) !important;
    line-height: 1.05;
  }

  .z-uni-hero__desc {
    font-size: 16px !important;
    line-height: 1.35;
  }

  .z-uni-search .z-search__input {
    font-size: 16px !important;
  }

  .z-uni-search .z-search__select,
  .z-uni-search .z-search__submit {
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    font-size: 14px !important;
  }

  .z-uni-quick__btn {
    height: 36px !important;
    font-size: 14px !important;
  }

  /* Roadmap horizontal scroll allowed, but keep it clean */
  .z-uni-steps {
    gap: 10px;
    padding-bottom: 6px;
  }

  .z-chat {
    left: max(10px, env(safe-area-inset-left, 0px) + 10px);
    right: max(10px, env(safe-area-inset-right, 0px) + 10px);
    bottom: max(12px, env(safe-area-inset-bottom, 0px) + 8px);
    width: auto;
    max-width: none;
    height: clamp(520px, calc(100dvh - 112px), 720px);
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 20px);
    border-radius: 20px;
  }

  .z-chat__header {
    align-items: stretch;
    padding: 12px 12px 10px;
    gap: 10px;
  }

  .z-chat__title {
    font-size: 14px;
  }

  .z-chat__sub {
    margin-left: 17px;
    font-size: 10px;
  }

  .z-chat__actions {
    justify-content: space-between;
    gap: 8px;
  }

  .z-chat__link {
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }

  .z-chat__body {
    padding-bottom: 10px;
    background: linear-gradient(180deg, #edf3f8 0%, #f8fbfd 100%);
  }

  .z-chat__frame {
    min-height: 100%;
  }
}

@media (max-width: 640px) {
  .z-chat__header {
    flex-direction: column;
  }

  .z-chat__actions {
    width: 100%;
  }

  .z-iconbtn {
    flex: 0 0 auto;
  }
}

@media (max-width: 980px) {
  .z-topbar[data-header-modern] .z-topbar__row {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    gap: 10px;
    min-height: var(--z-header-row-min-height-tablet);
    padding: 8px 0;
    align-items: center;
  }

  .z-topbar[data-header-modern] .z-brand--link {
    grid-column: 1;
    min-width: 0;
  }

  .z-topbar[data-header-modern] .z-header-context:not([hidden]) {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    width: 100%;
    min-width: 0;
    padding-top: 2px;
  }

  .z-topbar[data-header-modern] .z-topbar__right,
  .z-topbar[data-header-modern] .z-topbar__controls {
    grid-column: 3;
    width: auto !important;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap !important;
    gap: 10px;
  }

  .z-topbar[data-header-modern] .z-header-dropdown[data-dropdown="sections"] {
    display: none !important;
  }

  .z-topbar[data-header-modern] .z-header-account--desktop {
    display: inline-flex !important;
    align-items: center;
    order: 1;
  }

  .z-topbar[data-header-modern] .z-header-account--desktop [data-auth="guest"][hidden],
  .z-topbar[data-header-modern] .z-header-account--desktop [data-auth="out"][hidden],
  .z-topbar[data-header-modern] .z-header-account--desktop [data-auth="in"][hidden],
  .z-topbar[data-header-modern] .z-header-account--desktop [data-auth="user"][hidden] {
    display: none !important;
  }

  .z-topbar[data-header-modern] .z-header-account--desktop [data-auth="guest"]:not([hidden]),
  .z-topbar[data-header-modern] .z-header-account--desktop [data-auth="out"]:not([hidden]),
  .z-topbar[data-header-modern] .z-header-account--desktop [data-auth="in"]:not([hidden]),
  .z-topbar[data-header-modern] .z-header-account--desktop [data-auth="user"]:not([hidden]) {
    display: inline-flex !important;
    align-items: center;
  }

  .z-topbar[data-header-modern] .z-burger,
  .z-topbar[data-header-modern] .z-lang,
  .z-topbar[data-header-modern] .z-header-userchip {
    height: 38px;
    min-height: 38px;
  }

  .z-topbar[data-header-modern] .z-burger {
    display: inline-grid;
    width: 38px;
    min-width: 38px;
    border-radius: 12px;
    order: 3;
  }

  .z-topbar[data-header-modern] .z-lang {
    min-width: 44px;
    border-radius: 12px;
  }

  .z-topbar[data-header-modern] .z-header-dropdown--lang {
    order: 2;
  }

  .z-topbar[data-header-modern] .z-header-userchip {
    max-width: 160px;
    border-radius: 12px;
  }

  .z-topbar[data-header-modern] .z-header-mobile-backdrop {
    z-index: 88;
    background: rgba(17, 24, 39, 0.38);
  }

  .z-topbar[data-header-modern] .z-header-mobile-backdrop.is-open {
    backdrop-filter: blur(2px);
  }

  .z-topbar[data-header-modern] .z-header-drawer {
    top: var(--z-header-drawer-top);
    left: 12px;
    right: 12px;
    z-index: 89;
    border-radius: 16px;
    border: 1px solid rgba(17, 24, 39, 0.1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(247, 248, 250, 0.97) 100%);
    box-shadow:
      0 12px 28px rgba(17, 24, 39, 0.12),
      0 28px 56px rgba(17, 24, 39, 0.18);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - var(--z-header-drawer-viewport-gap));
    overflow: hidden;
  }

  .z-topbar[data-header-modern] .z-header-drawer__head {
    min-height: 36px;
    padding: 0 2px;
    justify-content: space-between;
  }

  .z-topbar[data-header-modern] .z-header-drawer__title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  .z-topbar[data-header-modern] .z-header-drawer__controls {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
  }

  .z-topbar[data-header-modern] .z-header-drawer__langswitch {
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 3px;
    border-radius: 12px;
    border: 1px solid rgba(17, 24, 39, 0.1);
    background: rgba(248, 250, 252, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  }

  .z-topbar[data-header-modern] .z-header-drawer__langswitch .z-header-lang__item {
    width: auto;
    min-width: 34px;
    min-height: 28px;
    padding: 0 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #64748b;
    transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
  }

  .z-topbar[data-header-modern] .z-header-drawer__langswitch .z-header-lang__item:hover,
  .z-topbar[data-header-modern] .z-header-drawer__langswitch .z-header-lang__item:focus-visible {
    transform: none;
    background: rgba(255, 255, 255, 0.85);
    color: #0f172a;
  }

  .z-topbar[data-header-modern] .z-header-drawer__langswitch .z-header-lang__item.is-active,
  .z-topbar[data-header-modern] .z-header-drawer__langswitch .z-header-lang__item[data-active-language="true"] {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.08);
  }

  .z-topbar[data-header-modern] .z-header-drawer__close {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .z-topbar[data-header-modern] .z-mnav {
    min-height: 0;
    display: grid;
    gap: 10px;
    overflow: auto;
    padding-right: 2px;
  }

  .z-topbar[data-header-modern] .z-mnav-list {
    display: grid;
    gap: 2px;
    padding: 0;
  }

  .z-topbar[data-header-modern] .z-mnav-group {
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 249, 251, 0.96) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
    overflow: hidden;
  }

  .z-topbar[data-header-modern] .z-mnav-group__toggle {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    background: transparent;
    color: #111827;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    transition: background-color 160ms ease, border-color 160ms ease;
  }

  .z-topbar[data-header-modern] .z-mnav-group__toggle:hover {
    background: rgba(244, 247, 252, 0.72);
  }

  .z-topbar[data-header-modern] .z-mnav-group__chev {
    transition: transform 0.16s ease;
  }

  .z-topbar[data-header-modern] .z-mnav-group__toggle[aria-expanded="false"] .z-mnav-group__chev {
    transform: rotate(-90deg);
  }

  .z-topbar[data-header-modern] .z-mnav-group__toggle[aria-expanded="false"] {
    border-bottom-color: transparent;
  }

  .z-topbar[data-header-modern] .z-mnav-group__body {
    display: grid;
    gap: 2px;
    padding: 6px;
  }

  .z-topbar[data-header-modern] .z-mnav-link {
    min-height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    text-decoration: none;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    border: 1px solid transparent;
    transition:
      transform 160ms ease,
      background-color 160ms ease,
      border-color 160ms ease,
      color 160ms ease,
      box-shadow 160ms ease;
  }

  .z-topbar[data-header-modern] .z-mnav-link:hover,
  .z-topbar[data-header-modern] .z-mnav-link.is-active,
  .z-topbar[data-header-modern] .z-mnav-link[aria-current="page"] {
    transform: translateX(1px);
    background: linear-gradient(180deg, rgba(244, 247, 252, 0.98) 0%, rgba(238, 243, 249, 0.96) 100%);
    border-color: rgba(17, 24, 39, 0.08);
    color: #0f172a;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  }

  .z-topbar[data-header-modern] [data-auth-login].z-mnav-link {
    background: transparent;
    border-color: #111827;
    color: #111827;
  }

  .z-topbar[data-header-modern] [data-auth-login].z-mnav-link:hover {
    background: linear-gradient(180deg, rgba(245, 200, 75, 0.92) 0%, rgba(243, 197, 70, 0.82) 100%);
    border-color: rgba(237, 191, 63, 0.94);
    color: #3b2a00;
  }

  .z-topbar[data-header-modern] .z-mnav-link--danger {
    color: #b42318;
  }

  .z-topbar[data-header-modern] .z-mnav-link--danger:hover,
  .z-topbar[data-header-modern] .z-mnav-link--danger.is-active {
    background: linear-gradient(180deg, #fff5f5 0%, #fff0f0 100%);
    border-color: rgba(180, 35, 24, 0.18);
  }
}

@media (max-width: 640px) {
  .z-topbar[data-header-modern] .z-topbar__row {
    min-height: var(--z-header-row-min-height-mobile) !important;
    padding: 8px 0 !important;
    gap: 8px;
  }

  .z-topbar[data-header-modern] .z-brand {
    min-width: 0;
    max-width: 42vw;
    gap: 8px;
  }

  .z-topbar[data-header-modern] .z-brand__sub {
    display: none;
  }

  .z-topbar[data-header-modern] .z-brand__name {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 132px;
  }

  .z-topbar[data-header-modern] .z-topbar__right,
  .z-topbar[data-header-modern] .z-topbar__controls {
    flex-wrap: nowrap !important;
    gap: 8px;
  }

  .z-topbar[data-header-modern] .z-burger,
  .z-topbar[data-header-modern] .z-lang,
  .z-topbar[data-header-modern] .z-header-userchip {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 11px;
    justify-content: center;
  }

  .z-topbar[data-header-modern] .z-lang {
    width: auto;
    min-width: 42px;
    padding: 0 10px;
  }

  .z-topbar[data-header-modern] .z-burger {
    width: 40px;
    min-width: 40px;
    border-radius: 14px;
    border: 1px solid rgba(17, 24, 39, 0.12);
    background: #fff;
    display: inline-grid;
    place-items: center;
    padding: 0;
  }

  .z-topbar[data-header-modern] .z-burger__bar {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.78);
  }

  .z-topbar[data-header-modern] .z-burger__bar + .z-burger__bar {
    margin-top: 4px;
  }

  .z-topbar[data-header-modern] .z-burger:not(:has(.z-burger__bar)) {
    position: relative;
  }

  .z-topbar[data-header-modern] .z-burger:not(:has(.z-burger__bar))::before,
  .z-topbar[data-header-modern] .z-burger:not(:has(.z-burger__bar))::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.78);
    transform: translateX(-50%);
  }

  .z-topbar[data-header-modern] .z-burger:not(:has(.z-burger__bar))::before {
    top: 14px;
  }

  .z-topbar[data-header-modern] .z-burger:not(:has(.z-burger__bar))::after {
    bottom: 14px;
  }

  .z-topbar[data-header-modern] .z-header-userchip {
    padding: 2px;
  }

  .z-topbar[data-header-modern] .z-header-userchip__name {
    display: none;
  }

  .z-topbar[data-header-modern] .z-header-dropdown__menu--user {
    right: 0;
    left: auto;
    top: calc(100% + 12px);
    min-width: 248px;
    width: min(320px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    padding: 10px 0;
    border-radius: 18px;
    border: 1px solid rgba(17, 24, 39, 0.1);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.995) 0%, rgba(247, 248, 250, 0.985) 58%, rgba(243, 246, 249, 0.98) 100%);
    box-shadow:
      0 14px 30px rgba(17, 24, 39, 0.14),
      0 28px 56px rgba(17, 24, 39, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(12px);
    overflow: hidden;
  }

  .z-topbar[data-header-modern] .z-header-dropdown__menu--user .z-topmenu--dropdown {
    gap: 0;
  }

  .z-topbar[data-header-modern] .z-header-dropdown__menu--user .z-topmenu__link {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 15px 16px;
    border: 0;
    border-radius: 0;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    background: transparent;
    box-shadow: none;
  }

  .z-topbar[data-header-modern] .z-header-dropdown__menu--user .z-topmenu__link + .z-topmenu__link {
    border-top: 1px solid rgba(17, 24, 39, 0.07);
  }

  .z-topbar[data-header-modern] .z-header-dropdown__menu--user .z-topmenu__link:hover,
  .z-topbar[data-header-modern] .z-header-dropdown__menu--user .z-topmenu__link.is-active,
  .z-topbar[data-header-modern] .z-header-dropdown__menu--user .z-topmenu__link[aria-current="page"] {
    transform: none;
    border-color: transparent;
    background: rgba(244, 247, 252, 0.92);
    box-shadow: none;
  }

  .z-topbar[data-header-modern] .z-header-dropdown__menu--user .z-header-dropdown__divider {
    margin: 8px 0 4px;
  }

  .z-topbar[data-header-modern] .z-header-dropdown__menu--user .z-topmenu__link--danger {
    color: #a61b1b;
    background: transparent;
  }

  .z-topbar[data-header-modern] .z-header-dropdown__menu--user .z-topmenu__link--danger:hover,
  .z-topbar[data-header-modern] .z-header-dropdown__menu--user .z-topmenu__link--danger:focus-visible {
    border-color: transparent;
    background: rgba(254, 242, 242, 0.96);
    box-shadow: none;
  }

  .z-topbar[data-header-modern] .z-header-account--desktop [data-auth="guest"]:not([hidden]),
  .z-topbar[data-header-modern] .z-header-account--desktop [data-auth="out"]:not([hidden]) {
    height: 36px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 12px;
    white-space: nowrap;
  }

  .z-topbar[data-header-modern] .z-header-drawer {
    top: var(--z-header-drawer-top-mobile);
    left: 10px;
    right: 10px;
    padding: 12px;
    max-height: calc(100vh - var(--z-header-drawer-viewport-gap));
  }

  .z-topbar[data-header-modern] .z-mnav-link {
    min-height: 44px;
  }

  .z-hero--landing .z-hero__art,
  .z-hero--landing .z-hero-media {
    height: 210px !important;
    min-height: 210px !important;
    max-height: 210px !important;
    border-radius: 16px;
  }

  .z-hero--landing[data-live-hero="aixram"] .z-hero-media,
  .z-hero--landing[data-live-hero="aixram"] .z-hero__art {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(250, 249, 246, 0.9) 52%, rgba(240, 242, 242, 0.84) 100%) !important;
    border-color: rgba(220, 225, 229, 0.86) !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08) !important;
  }

  .z-hero--landing .z-hero-media__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .z-hero--landing .z-search__inputWrap,
  .z-search--hero .z-search__inputWrap {
    width: 100%;
    min-width: 0;
  }

  .z-hero--landing .z-search__select,
  .z-hero--landing .z-search__submit {
    min-width: 0 !important;
  }

  body[data-section="account"],
  body[data-section="account"][data-page="account-dashboard"] {
    --account-pad: 12px !important;
  }

  body[data-section="account"] .z-account-layout {
    margin: 12px 0 18px;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body[data-section="account"] .z-account-wide {
    width: calc(100% - 24px) !important;
    gap: 12px;
  }

  body[data-section="account"] .z-account-hero,
  body[data-section="account"][data-page="account-dashboard"] .z-dashboard-cabinet-header {
    padding: 16px !important;
    border-radius: 18px !important;
    gap: 10px;
  }

  body[data-section="account"] .z-account-content,
  body[data-section="account"] .z-account-card {
    border-radius: 18px !important;
  }

  body[data-section="account"] .z-account-hero__title {
    font-size: clamp(30px, 9vw, 40px) !important;
    line-height: 1.05;
  }

  body[data-section="account"] .z-account-hero__desc {
    margin-top: 8px;
    font-size: 16px;
    line-height: 1.35;
  }
}

@media (max-width: 980px) {
  /* Ensure landing hero is single column and allow reordering */
  .z-hero--landing {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 14px !important;
    align-items: stretch !important;
  }

  /* Put art/photo first on mobile */
  .z-hero__art,
  .z-hero--landing .z-hero-media {
    order: -1 !important;
  }

  /* Auto-fit categories (prevents awkward row breaks on tablet widths) */
  .z-cats {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  }

  /* Auto-fit generic cards */
  .z-cards {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  }

  /* Ensure cards stretch evenly */
  .z-cat,
  .z-card {
    height: 100%;
  }
}

@media (max-width: 640px) {
  /* Make art/photo look like a real banner */
  .z-hero__art {
    min-height: 180px !important;
    border-radius: 16px !important;
  }

  /* Tighten hero spacing and keep symmetry */
  .z-hero {
    padding: 16px !important;
  }

  .z-hero__title {
    margin-top: 2px !important;
  }

  /* Search stays stacked and clean */
  .z-search--hero {
    gap: 10px !important;
  }

  /* Convert city grid to carousel */
  .z-discover .z-citylist {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain !important;
    touch-action: pan-y pinch-zoom !important;
    padding: 2px 4px 10px !important;
    scroll-snap-type: x proximity !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
    cursor: grab;
  }

  .z-discover .z-citylist.is-dragging {
    cursor: grabbing;
    user-select: none;
    scroll-snap-type: none !important;
  }

  /* Make discover blocks less bulky on phone */
  .z-discover {
    gap: 10px;
  }

  .z-discover__main,
  .z-grid,
  .z-sidepanel {
    padding: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .z-sidepanel {
    justify-self: stretch !important;
    align-self: stretch;
    margin: 0 !important;
  }

  .z-sidepanel__title {
    font-size: clamp(22px, 6vw, 26px) !important;
    line-height: 1.12;
  }

  /* Hide scrollbar (WebKit) */
  .z-discover .z-citylist::-webkit-scrollbar {
    height: 0;
  }

  /* Each city card becomes a snap item */
  .z-city,
  .z-discover .z-citylist .z-city {
    flex: 0 0 clamp(220px, 72vw, 280px) !important;
    max-width: clamp(220px, 72vw, 280px) !important;
    scroll-snap-align: start !important;
    border-radius: 18px !important;
  }

  /* Stable image crop */
  .z-city__img,
  .z-discover .z-citylist .z-city .z-city__img {
    height: 160px !important;
    background-position: center !important;
  }

  /* Typography compact */
  .z-city__meta {
    padding: 12px 12px !important;
  }

  .z-city__meta h3 {
    font-size: 16px !important;
  }

  .z-city__meta p {
    font-size: 13px !important;
  }

  /* Force clean single column on phone */
  .z-cats,
  .z-cards {
    grid-template-columns: 1fr !important;
  }

  /* Make section cards feel app-like */
  .z-cat,
  .z-card {
    border-radius: 18px !important;
  }
}

/* assets/css/aixram.mobile.css */
/* Add at the END of the file (important). */

@media (max-width: 980px) {
  /* Ensure discover stack is clean */
  .z-discover {
    grid-template-columns: 1fr !important;
  }

  /* Sidepanel should behave like a full-width card */
  .z-sidepanel {
    width: 100%;
  }
}

@media (max-width: 640px) {
  /* ===== Полезное: compact + app-like ===== */
  .z-sidepanel {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  .z-sidepanel__title {
    font-size: 22px !important;
    margin: 0 0 10px !important;
    line-height: 1.1;
  }

  .z-sidepanel__list {
    gap: 10px !important;
  }

  /* Turn list links into tappable "rows" */
  .z-sidepanel__list a {
    min-height: 44px;
    height: auto !important;
    padding: 12px 14px !important;
    border-radius: 14px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    line-height: 1.2;
    font-size: 15px !important;
    background: #fff !important;
  }

  /* Optional: add chevron affordance without HTML changes */
  .z-sidepanel__list a::after {
    content: "›";
    opacity: 0.5;
    font-size: 18px;
    margin-left: 12px;
  }
}

@media (max-width: 980px) {
  /* Hide "Полезное" banner on mobile/tablet */
  .z-discover > .z-sidepanel {
    display: none !important;
  }

  .z-discover {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 980px) {
  /* Auth screens: tighter mobile/tablet layout without affecting desktop */
  body[data-section="account-auth"] .z-auth {
    width: 100%;
    min-height: auto !important;
  }

  body[data-section="account-auth"] .z-auth__wrap {
    min-height: calc(100svh - 96px);
    padding: 16px 0 18px;
    align-items: center;
  }

  body[data-section="account-auth"] .z-authcard {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.09);
  }
}

@media (max-width: 640px) {
  body[data-section="account-auth"] .z-auth {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
    min-height: auto !important;
  }

  body[data-section="account-auth"] .z-shell {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body[data-section="account-auth"] .z-auth__wrap {
    min-height: calc(100svh - 92px);
    padding: 12px 0 16px;
    align-items: center;
  }

  body[data-section="account-auth"] .z-authcard {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 16px !important;
    border-radius: 22px;
    gap: 12px;
  }

  body[data-section="account-auth"] .z-auth-title {
    font-size: clamp(30px, 8.6vw, 34px) !important;
    line-height: 1.08 !important;
    margin: 0 0 8px !important;
  }

  body[data-section="account-auth"] .z-auth-sub {
    font-size: 15px !important;
    line-height: 1.4 !important;
    margin: 0 0 14px !important;
    color: var(--muted);
  }

  body[data-section="account-auth"] .z-auth-label {
    font-size: 14px !important;
    font-weight: 700;
  }

  body[data-section="account-auth"] .z-auth-form {
    display: grid;
    gap: 12px;
  }

  body[data-section="account-auth"] .z-auth-input,
  body[data-section="account-auth"] input[type="text"],
  body[data-section="account-auth"] input[type="email"],
  body[data-section="account-auth"] input[type="password"],
  body[data-section="account-auth"] input[type="search"],
  body[data-section="account-auth"] select {
    width: 100%;
    height: 46px !important;
    min-height: 46px !important;
    border-radius: 14px !important;
    padding: 0 14px !important;
    font-size: 16px !important;
    line-height: 1.25;
    box-sizing: border-box;
  }

  body[data-section="account-auth"] .z-auth-actions {
    display: grid;
    gap: 10px;
    margin-top: 2px;
  }

  body[data-section="account-auth"] .z-auth-actions .z-btn,
  body[data-section="account-auth"] .z-auth-form > .z-btn,
  body[data-section="account-auth"] .z-auth-btn {
    width: 100%;
    height: 48px !important;
    min-height: 48px !important;
    border-radius: 14px !important;
  }

  body[data-section="account-auth"] .z-auth-input:focus-visible,
  body[data-section="account-auth"] select:focus-visible,
  body[data-section="account-auth"] button:focus-visible,
  body[data-section="account-auth"] .z-btn:focus-visible,
  body[data-section="account-auth"] a:focus-visible {
    outline: 2px solid rgba(43, 99, 217, 0.45);
    outline-offset: 2px;
  }

  body[data-section="account-auth"] .z-auth-link,
  body[data-section="account-auth"] .z-auth-switch a {
    font-size: 14px;
  }

  body[data-section="account-auth"] .z-auth-switch {
    margin-top: 2px;
    display: grid;
    gap: 8px;
    line-height: 1.35;
  }

  body[data-section="account-auth"] .z-auth-verify {
    border-radius: 14px;
    padding: 12px;
  }

  body[data-section="account-auth"] .z-auth-verify__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body[data-section="account-auth"] .z-auth-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body[data-section="account-auth"] .z-checkbox,
  body[data-section="account-auth"] .checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }

  body[data-section="account-auth"] .z-checkbox input,
  body[data-section="account-auth"] .checkbox-row input {
    margin-top: 3px;
  }
}

@media (max-width: 640px) {
  /* Auth pages: stop forcing 100vh layouts and vertical centering */
  body[data-section="account-auth"],
  body[data-section="account-auth"] .z-layout,
  body[data-section="account-auth"] .z-account-layout,
  body[data-section="account-auth"] .z-main,
  body[data-section="account-auth"] .z-auth,
  body[data-section="account-auth"] .z-auth__wrap {
    min-height: 0 !important;
    height: auto !important;
  }

  /* If auth pages use grid/flex centering, neutralize it */
  body[data-section="account-auth"] .z-account-layout,
  body[data-section="account-auth"] .z-main,
  body[data-section="account-auth"] .z-auth__wrap {
    display: block !important;
    align-items: initial !important;
    justify-items: initial !important;
  }

  /* Tighten page vertical spacing */
  body[data-section="account-auth"] .z-layout,
  body[data-section="account-auth"] .z-auth {
    margin: 12px 0 16px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body[data-section="account-auth"] .z-shell {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Auth card should sit naturally with compact margins */
  body[data-section="account-auth"] .z-auth-card,
  body[data-section="account-auth"] .z-card,
  body[data-section="account-auth"] .auth-card,
  body[data-section="account-auth"] .z-authcard {
    margin: 12px auto 14px !important;
    width: 100% !important;
    max-width: 520px !important;
  }

  /* Footer should not be pushed to bottom with huge gap */
  body[data-section="account-auth"] .z-footer {
    margin-top: 12px !important;
  }
}

@media (max-width: 640px) {
  /* Auth pages golden middle: balanced breathing room without hard centering */
  body[data-section="account-auth"] .z-auth,
  body[data-section="account-auth"] .z-main,
  body[data-section="account-auth"] .z-layout,
  body[data-section="account-auth"] .z-account-layout {
    min-height: calc(100svh - 76px) !important;
  }

  body[data-section="account-auth"] .z-auth {
    display: flex !important;
    flex-direction: column !important;
    padding-top: 14px !important;
    padding-bottom: 22px !important;
    margin: 0 !important;
  }

  body[data-section="account-auth"] .z-auth__wrap {
    display: block !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  /* Card position: upper-middle with clear breathing room */
  body[data-section="account-auth"] .z-authcard,
  body[data-section="account-auth"] .z-auth-card,
  body[data-section="account-auth"] .z-card,
  body[data-section="account-auth"] .auth-card {
    margin: 18px auto 18px !important;
  }

  /* Footer separation */
  body[data-section="account-auth"] .z-footer {
    margin-top: 18px !important;
  }

  body[data-section="account-auth"] .z-auth > :last-child {
    margin-bottom: 8px;
  }
}

@media (max-width: 640px) {
  /* Auth pages final balance: reduce tall empty zone, keep footer separated */
  body[data-section="account-auth"] .z-main,
  body[data-section="account-auth"] .z-layout,
  body[data-section="account-auth"] .z-account-layout {
    min-height: 0 !important;
    height: auto !important;
  }

  body[data-section="account-auth"] .z-auth {
    min-height: clamp(520px, calc(100svh - 280px), 640px) !important;
    height: auto !important;
    padding-top: 10px !important;
    padding-bottom: 16px !important;
    margin: 0 !important;
  }

  body[data-section="account-auth"] .z-auth__wrap {
    min-height: 0 !important;
    padding: 0 !important;
  }

  body[data-section="account-auth"] .z-authcard,
  body[data-section="account-auth"] .z-auth-card,
  body[data-section="account-auth"] .z-card,
  body[data-section="account-auth"] .auth-card {
    margin: 14px auto 12px !important;
  }

  body[data-section="account-auth"] .z-footer {
    margin-top: 16px !important;
  }
}

@media (max-width: 640px) {
  /* Auth pages polish: remove leftover flex-grow gap between card and footer */
  body[data-section="account-auth"] {
    min-height: 0 !important;
    height: auto !important;
  }

  body[data-section="account-auth"] .z-auth {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    height: auto !important;
    padding-top: 8px !important;
    padding-bottom: 10px !important;
  }

  body[data-section="account-auth"] .z-auth__wrap {
    min-height: 0 !important;
    padding: 0 !important;
  }

  body[data-section="account-auth"] .z-authcard,
  body[data-section="account-auth"] .z-auth-card,
  body[data-section="account-auth"] .z-card,
  body[data-section="account-auth"] .auth-card {
    margin: 12px auto 10px !important;
  }

  body[data-section="account-auth"] .z-footer {
    margin-top: 14px !important;
  }
}

@media (max-width: 640px) {
  /* Auth pages final nudge: move footer lower with controlled space */
  body[data-section="account-auth"] .z-auth {
    flex: 0 0 auto !important;
    min-height: clamp(560px, calc(100svh - 230px), 700px) !important;
    padding-top: 10px !important;
    padding-bottom: 14px !important;
  }

  body[data-section="account-auth"] .z-authcard,
  body[data-section="account-auth"] .z-auth-card,
  body[data-section="account-auth"] .z-card,
  body[data-section="account-auth"] .auth-card {
    margin: 14px auto 12px !important;
  }

  body[data-section="account-auth"] .z-footer {
    margin-top: 18px !important;
  }
}

@media (max-width: 640px) {
  /* Auth card centered in content area. Header and footer are untouched. */
  body[data-section="account-auth"] .z-auth {
    flex: 1 0 auto !important;
    display: block !important;
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  body[data-section="account-auth"] .z-auth__wrap {
    display: grid !important;
    align-items: center !important;
    min-height: calc(100svh - 72px - 150px) !important;
    padding: 10px 0 !important;
  }

  body[data-section="account-auth"] .z-authcard,
  body[data-section="account-auth"] .z-auth-card,
  body[data-section="account-auth"] .z-card,
  body[data-section="account-auth"] .auth-card {
    margin: 0 auto !important;
  }
}

@media (max-width: 640px) {
  /* Legacy auth pages use the shared account-auth contract on mobile. */
  body[data-section="account-auth"][data-page="account-auth-legacy"] {
    display: block !important;
    min-height: 100svh !important;
    padding: 16px 12px 24px !important;
  }

  body[data-section="account-auth"][data-page="account-auth-legacy"] .card {
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    border-radius: 20px !important;
    overflow: hidden;
  }

  body[data-section="account-auth"][data-page="account-auth-legacy"] .left {
    padding: 28px 22px !important;
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }

  body[data-section="account-auth"][data-page="account-auth-legacy"] .left h2,
  body[data-section="account-auth"][data-page="account-auth-legacy"] .title {
    font-size: clamp(30px, 8.6vw, 34px) !important;
    line-height: 1.08 !important;
  }

  body[data-section="account-auth"][data-page="account-auth-legacy"] .left p,
  body[data-section="account-auth"][data-page="account-auth-legacy"] .sub {
    font-size: 15px !important;
    line-height: 1.4 !important;
  }

  body[data-section="account-auth"][data-page="account-auth-legacy"] .right {
    padding: 24px 20px !important;
    gap: 14px !important;
  }

  body[data-section="account-auth"][data-page="account-auth-legacy"] .row,
  body[data-section="account-auth"][data-page="account-auth-legacy"] .verify .row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body[data-section="account-auth"][data-page="account-auth-legacy"] .social {
    flex-wrap: wrap;
  }

  body[data-section="account-auth"][data-page="account-auth-legacy"] .btn,
  body[data-section="account-auth"][data-page="account-auth-legacy"] .ghost,
  body[data-section="account-auth"][data-page="account-auth-legacy"] .mini-btn {
    width: 100% !important;
    min-height: 48px !important;
    border-radius: 14px !important;
  }
}

@media (max-width: 768px) {
  .z-hero__art,
  .z-hero-media,
  .z-section-hero__media {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .z-hero--landing .z-search--hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .z-hero--landing .z-hero-search__row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  .z-hero--landing .z-hero-search__row .z-search__inputWrap {
    flex: 1 1 100%;
    min-width: 0;
    width: 100% !important;
  }

  .z-hero--landing #sectionSelect,
  .z-hero--landing .z-hero-search__row .z-search__select {
    display: none !important;
  }

  .z-hero--landing .z-search__submit {
    width: 100% !important;
  }

  body:not([data-page]) .z-cats {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .z-topbar[data-header-modern] [data-sections-menu="mobile"] [data-account-nav-key],
  .z-topbar[data-header-modern] [data-sections-menu="mobile"] [data-auth-btn],
  .z-topbar[data-header-modern] [data-sections-menu="mobile"] a[href*="/pages/account/"] {
    display: none !important;
  }

  .z-topbar[data-header-modern] .z-header-account--mobile,
  .z-topbar[data-header-modern] .z-header-mobile-usernav {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .z-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .z-footer__right {
    width: 100%;
    display: grid;
    gap: 14px;
  }

  .z-footer__projects {
    width: 100%;
  }

  .z-footer__left {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .z-footer__links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  .z-footer__link {
    display: inline-block;
    width: auto;
    max-width: none;
    min-width: 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 4px 0 !important;
    white-space: normal;
    line-height: 1.4;
    color: inherit;
  }

  .z-footer__link:hover,
  .z-footer__link:focus-visible {
    text-decoration: underline;
  }

  .z-footer__menu-trigger {
    width: 100%;
    justify-content: space-between;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 4px 0;
  }

  .z-footer__menu-panel {
    position: static;
    min-width: 0;
    padding: 4px 0 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .z-footer__menu-link {
    display: inline-block;
    width: auto;
    padding: 4px 0;
    border-radius: 0;
  }

  .z-footer__menu-link:hover,
  .z-footer__menu-link:focus-visible {
    background: transparent;
    text-decoration: underline;
  }
}

/* Home mobile refinement: denser, calmer, navigation-first. */
@media (max-width: 768px) {
  body[data-page="home"] .z-main {
    gap: 14px;
  }

  body[data-page="home"] .z-layout {
    margin-top: 10px;
    margin-bottom: 16px;
  }

  body[data-page="home"] .z-hero {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  body[data-page="home"] .z-hero--landing {
    gap: 12px !important;
    min-height: 0 !important;
  }

  body[data-page="home"] .z-hero__title {
    font-size: clamp(29px, 8.1vw, 34px) !important;
    line-height: 1.04 !important;
    letter-spacing: -0.03em;
  }

  body[data-page="home"] .z-hero__desc {
    margin: 6px 0 12px !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
  }

  body[data-page="home"] .z-hero__resourceMeta {
    margin: 4px 0 0 !important;
    font-size: 12px;
    line-height: 1.35;
  }

  body[data-page="home"] .z-search--hero {
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07) !important;
  }

  body[data-page="home"] .z-search__inputWrap {
    width: 100%;
  }

  body[data-page="home"] .z-search__input {
    height: 42px !important;
    font-size: 16px !important;
  }

  body[data-page="home"] .z-search__submit {
    height: 40px !important;
  }

  body[data-page="home"] .z-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body[data-page="home"] .z-cats .z-cat {
    min-height: 0 !important;
    padding: 12px 13px !important;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    justify-items: stretch;
    gap: 10px;
    text-align: left;
    border-radius: 16px !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06) !important;
  }

  body[data-page="home"] .z-cats .z-cat__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: var(--cat-surface);
    color: var(--cat-accent);
  }

  body[data-page="home"] .z-cats .z-cat__icon svg {
    width: 18px;
    height: 18px;
  }

  body[data-page="home"] .z-cats .z-cat__content {
    gap: 3px;
  }

  body[data-page="home"] .z-cats .z-cat__title {
    margin: 0 !important;
    font-size: 15px;
    line-height: 1.18;
    font-weight: 700 !important;
    text-align: left;
  }

  body[data-page="home"] .z-cats .z-cat__text {
    display: block;
    text-align: left;
    font-size: 12px;
    line-height: 1.32;
    color: #667085;
  }

  body[data-page="home"] .z-cats .z-cat__arrow {
    display: grid;
    place-items: center;
    position: static !important;
    right: auto !important;
    bottom: auto !important;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: #fff;
    color: #475569;
    font-size: 18px;
    line-height: 1;
  }

  body[data-page="home"] .z-discover {
    gap: 8px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body[data-page="home"] .z-discover__main {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body[data-page="home"] .z-section__head {
    margin-bottom: 8px !important;
    padding: 0 !important;
  }

  body[data-page="home"] .z-discover .z-section__title {
    font-size: 18px !important;
    line-height: 1.14;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  body[data-page="home"] .z-discover .z-citylist {
    gap: 10px !important;
    padding: 2px 16px 4px 0 !important;
    scroll-snap-type: x proximity !important;
    scroll-padding-left: 0 !important;
    scrollbar-width: none;
  }

  body[data-page="home"] .z-discover .z-citylist .z-city {
    flex: 0 0 clamp(252px, 75vw, 336px) !important;
    min-width: 252px !important;
    max-width: clamp(252px, 75vw, 336px) !important;
    display: flex !important;
    flex-direction: column;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.52) !important;
    box-shadow:
      0 8px 18px rgba(15, 23, 42, 0.08),
      0 2px 5px rgba(15, 23, 42, 0.04) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(248, 250, 252, 0.74) 100%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    backdrop-filter: blur(10px) saturate(1.08);
  }

  body[data-page="home"] .z-city__img,
  body[data-page="home"] .z-discover .z-citylist .z-city .z-city__img {
    height: 124px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    background-color: rgba(226, 232, 240, 0.26);
  }

  body[data-page="home"] .z-city__meta {
    padding: 10px 11px 11px !important;
    display: grid;
    gap: 3px;
  }

  body[data-page="home"] .z-city__meta h3 {
    font-size: 15px !important;
    line-height: 1.2;
  }

  body[data-page="home"] .z-city__meta p {
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1.3;
    color: #5b6678 !important;
  }

  body[data-page="home"] .z-grid {
    padding: 14px !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05) !important;
  }

  body[data-page="home"] .z-grid__head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
    gap: 8px 12px !important;
    margin-bottom: 12px !important;
  }

  body[data-page="home"] .z-grid__headLeft {
    min-width: 0 !important;
    gap: 2px !important;
  }

  body[data-page="home"] .z-grid__title {
    font-size: 21px !important;
    line-height: 1.08 !important;
    overflow-wrap: anywhere;
  }

  body[data-page="home"] .z-grid__meta {
    font-size: 12px !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere;
  }

  body[data-page="home"] .z-grid__controls {
    width: auto !important;
    max-width: none !important;
    justify-items: end !important;
    align-self: start !important;
  }

  body[data-page="home"] .z-grid__toolbar {
    width: auto !important;
    justify-content: flex-end !important;
    gap: 6px !important;
  }

  body[data-page="home"] .z-toolbar-trigger {
    width: 34px !important;
    min-width: 0 !important;
    height: 34px !important;
    padding: 0 !important;
    gap: 0 !important;
    border-radius: 10px !important;
  }

  body[data-page="home"] .z-toolbar-trigger__icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body[data-page="home"] .z-toolbar-trigger__icon svg {
    width: 16px;
    height: 16px;
  }

  body[data-page="home"] .z-toolbar-trigger__label {
    display: none !important;
  }

  body[data-page="home"] .z-toolbar-popover {
    min-width: 170px !important;
  }

  body[data-page="home"] .z-grid .z-card {
    min-height: 0 !important;
    padding: 13px !important;
    gap: 8px !important;
    border-radius: 16px !important;
    border-color: rgba(203, 213, 225, 0.78) !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05) !important;
  }

  body[data-page="home"] .z-grid .z-card__head {
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
    gap: 8px !important;
  }

  body[data-page="home"] .z-grid .z-card__pills {
    min-width: 0 !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
  }

  body[data-page="home"] .z-grid .z-card__headRight {
    min-width: 0 !important;
    max-width: 100% !important;
    justify-self: end !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  body[data-page="home"] .z-grid .z-chip {
    padding: 3px 8px !important;
    font-size: 10px !important;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  body[data-page="home"] .z-grid .z-card__when {
    font-size: 11px !important;
    white-space: normal !important;
    line-height: 1.35 !important;
    text-align: right;
    overflow-wrap: anywhere;
  }

  body[data-page="home"] .z-grid .z-card__title {
    min-height: 0 !important;
    font-size: 16px !important;
    line-height: 1.28 !important;
    display: block !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  body[data-page="home"] .z-grid .z-card__desc {
    min-height: 0 !important;
    margin-bottom: 0 !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    display: block !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  body[data-page="home"] .z-grid .z-card__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  body[data-page="home"] .z-grid .z-card__metaItem {
    min-height: 0 !important;
    min-width: 0 !important;
    padding: 7px 8px !important;
    border-radius: 11px !important;
    background: rgba(248, 250, 252, 0.78) !important;
    border-color: rgba(203, 213, 225, 0.72) !important;
  }

  body[data-page="home"] .z-grid .z-card__metaItem:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  body[data-page="home"] .z-grid .z-card__metaLabel {
    font-size: 10px !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere;
  }

  body[data-page="home"] .z-grid .z-card__metaValue {
    font-size: 12px !important;
    line-height: 1.32 !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  body[data-page="home"] .z-grid .z-card__notice {
    min-height: 0 !important;
    padding: 8px 10px !important;
    border-radius: 11px !important;
    font-size: 12px !important;
    display: block !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  body[data-page="home"] .z-grid .z-card__actions {
    gap: 8px !important;
    align-items: stretch !important;
    flex-wrap: wrap !important;
  }

  body[data-page="home"] .z-grid .z-card__actions .z-btn {
    width: auto;
    min-width: 0 !important;
    height: auto !important;
    min-height: 34px !important;
    flex: 1 1 136px;
    padding: 8px 12px !important;
    border-radius: 11px !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    text-align: center;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  body[data-page="home"] .z-empty {
    padding: 14px !important;
    border-radius: 16px !important;
  }
}

@media (max-width: 560px) {
  body[data-page="home"] .z-cats {
    grid-template-columns: 1fr !important;
  }

  body[data-page="home"] .z-grid__toolbar {
    display: inline-flex !important;
    grid-template-columns: none !important;
    gap: 6px !important;
  }

  body[data-page="home"] .z-toolbar-menu {
    min-width: 0;
  }

  body[data-page="home"] .z-toolbar-trigger {
    width: 34px !important;
    justify-content: center !important;
  }

  body[data-page="home"] .z-toolbar-popover {
    left: auto !important;
    right: 0 !important;
    width: min(210px, calc(100vw - 24px)) !important;
  }

  body[data-page="home"] .z-discover .z-citylist .z-city {
    flex-basis: clamp(244px, 76vw, 320px) !important;
    max-width: clamp(244px, 76vw, 320px) !important;
  }

  body[data-page="home"] .z-grid .z-card__actions .z-btn {
    flex-basis: 100%;
  }
}

@media (max-width: 430px) {
  body[data-page="home"] .z-hero__title {
    font-size: clamp(28px, 8.6vw, 32px) !important;
  }

  body[data-page="home"] .z-search__submit {
    height: 38px !important;
  }

  body[data-page="home"] .z-cats .z-cat {
    padding: 12px !important;
  }

  body[data-page="home"] .z-discover .z-citylist .z-city {
    flex-basis: clamp(238px, 77vw, 304px) !important;
    max-width: clamp(238px, 77vw, 304px) !important;
  }
}

@media (max-width: 768px) {
  /* Mobile: hide hero search rows */
  .z-hero--landing .z-search--hero,
  body[data-page="universities"] .u2-top .z-section-search,
  body[data-page="programs"] .u2-top .z-section-search,
  body[data-page="work"] .u2-top .z-section-search,
  body[data-page="legal"] .u2-top .z-section-search,
  body[data-page="life"] .u2-top .z-section-search {
    display: none !important;
  }

  /* Mobile: keep card photos visible on section pages (not index). */
  body[data-page="universities"] .z-uni-card2__media,
  body[data-page="programs"] .z-prog-card2__media {
    min-height: 140px !important;
    overflow: hidden;
  }
  
  body[data-page="universities"] .z-uni-card2__img,
  body[data-page="programs"] .z-prog-card2__img {
    display: block !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
  }

  body[data-page="work"] .z-work-grid .z-card::before {
    min-height: 140px !important;
    background-position: var(--work-card-image-position, center center), center !important;
    background-size: var(--work-card-image-size, auto 96%), cover !important;
    border-radius: inherit;
  }

  body[data-page="documents"] #cards .z-card,
  body[data-page="ausbildung"] #cards .z-card {
    overflow: hidden;
    border-radius: 18px;
  }

  body[data-page="documents"] #cards .z-card::before,
  body[data-page="ausbildung"] #cards .z-card::before {
    content: "";
    display: block;
    margin: -18px -18px 12px;
    min-height: 140px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
  }

  body[data-page="documents"] #cards .z-card::before { background-image: url("/assets/img/visa.jpg"); }
  body[data-page="ausbildung"] #cards .z-card::before { background-image: url("/assets/img/programs/ausbildung.jpg"); }
}

@media (max-width: 768px) {
  /* Restore homepage mobile state: hero search + find button + sections list visible. */
  body[data-page="home"] .z-hero--landing[data-live-hero="aixram"],
  body:not([data-page]) .z-hero--landing[data-live-hero="aixram"] {
    position: relative !important;
    overflow: hidden !important;
  }

  body[data-page="home"] .z-hero--landing[data-live-hero="aixram"] .z-hero__content,
  body:not([data-page]) .z-hero--landing[data-live-hero="aixram"] .z-hero__content {
    display: flex !important;
    position: relative !important;
    z-index: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  body[data-page="home"] .z-hero--landing[data-live-hero="aixram"] .z-hero__title,
  body[data-page="home"] .z-hero--landing[data-live-hero="aixram"] .z-hero__desc,
  body[data-page="home"] .z-hero--landing[data-live-hero="aixram"] .z-hero__resourceMeta,
  body:not([data-page]) .z-hero--landing[data-live-hero="aixram"] .z-hero__title,
  body:not([data-page]) .z-hero--landing[data-live-hero="aixram"] .z-hero__desc,
  body:not([data-page]) .z-hero--landing[data-live-hero="aixram"] .z-hero__resourceMeta {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 1 !important;
  }

  body[data-page="home"] .z-hero--landing .z-search--hero,
  body:not([data-page]) .z-hero--landing .z-search--hero {
    display: flex !important;
    position: relative !important;
    z-index: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  body[data-page="home"] .z-hero--landing .z-search__submit,
  body:not([data-page]) .z-hero--landing .z-search__submit {
    display: inline-flex !important;
    position: relative !important;
    z-index: 1 !important;
  }

  body[data-page="home"] .z-cats,
  body:not([data-page]) .z-cats {
    display: grid !important;
  }
}

@media (max-width: 768px) {
  /* Section pages: keep hero photos visible on mobile (same sources as desktop). */
  body[data-page="universities"] .u2-top .z-section-hero__media,
  body[data-page="programs"] .u2-top .z-section-hero__media,
  body[data-page="work"] .u2-top .z-section-hero__media,
  body[data-page="legal"] .u2-top .z-section-hero__media,
  body[data-page="life"] .u2-top .z-section-hero__media {
    display: block !important;
  }

  body[data-page="life"] .u2-top .z-section-hero__img {
    display: block !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
  }
}

@media (max-width: 768px) {
  /* Final restore for homepage sections below hero/discover. */
  body[data-page="home"] #searchResults,
  body[data-page="home"] [data-search-results],
  body:not([data-page]) #searchResults,
  body:not([data-page]) [data-search-results] {
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  body[data-page="home"] #searchResults .z-grid__head,
  body[data-page="home"] [data-search-results] .z-grid__head,
  body:not([data-page]) #searchResults .z-grid__head,
  body:not([data-page]) [data-search-results] .z-grid__head {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  body[data-page="home"] #cards,
  body[data-page="home"] #empty,
  body:not([data-page]) #cards,
  body:not([data-page]) #empty {
    position: relative !important;
    z-index: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

@media (max-width: 768px) {
  body[data-page="home"] #searchResults .z-grid__head,
  body[data-page="home"] [data-search-results] .z-grid__head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
  }

  body[data-page="home"] #searchResults .z-grid__controls,
  body[data-page="home"] [data-search-results] .z-grid__controls {
    width: auto !important;
    justify-items: end !important;
  }
}

/* ==========================================================================
   1. Base Mobile Contract
   ========================================================================== */

.z-mobile-controls > summary {
  display: none;
}

.z-mobile-controls > *:not(summary) {
  display: block;
}

@media (max-width: 768px) {
  :root {
    --z-mobile-page-gutter: 12px;
    --z-mobile-block-gap: 14px;
    --z-mobile-card-radius: 20px;
    --z-mobile-card-padding: 14px;
    --z-mobile-control-height: 44px;
    --z-mobile-title-size: clamp(28px, 8.6vw, 34px);
    --z-mobile-body-size: 15px;
    --z-mobile-meta-size: 13px;
  }

  body {
    font-size: var(--z-mobile-body-size);
    line-height: 1.5;
  }

  .z-layout {
    width: 100% !important;
    max-width: none !important;
    padding-left: var(--z-mobile-page-gutter) !important;
    padding-right: var(--z-mobile-page-gutter) !important;
  }

  .z-service-shell,
  .z-resource-page__shell,
  .z-forum-page .page-shell {
    width: auto !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body[data-section="services"] .z-service-shell,
  body[data-page="resource-detail"] .z-resource-page__shell,
  body.forum-page .z-forum-page .page-shell {
    width: calc(100% - (var(--z-mobile-page-gutter) * 2)) !important;
  }

  body[data-page="resource-detail"] .z-resource-page__shell {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .z-main {
    gap: var(--z-mobile-block-gap) !important;
  }
}

/* ==========================================================================
   2. Header
   ========================================================================== */

@media (max-width: 768px) {
  body[data-section="account"] .z-topbar[data-header-modern] .z-header-dropdown--lang,
  body[data-section="account-auth"] .z-topbar[data-header-modern] .z-header-dropdown--lang,
  body:not([data-section="account"]):not([data-section="account-auth"]) .z-topbar[data-header-modern][data-auth-state="guest"] .z-header-account--desktop,
  body:not([data-section="account"]):not([data-section="account-auth"]) .z-topbar[data-header-modern] .z-header-dropdown--lang {
    display: none !important;
  }

  body:not([data-section="account"]):not([data-section="account-auth"]) .z-topbar[data-header-modern][data-auth-state="guest"] .z-topbar__right,
  body:not([data-section="account"]):not([data-section="account-auth"]) .z-topbar[data-header-modern][data-auth-state="guest"] .z-topbar__controls {
    gap: 0 !important;
  }

  body:not([data-section="account"]):not([data-section="account-auth"]) .z-topbar[data-header-modern] .z-burger {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 14px;
  }

  .z-topbar[data-header-modern] .z-mnav-group--session .z-mnav-group__body {
    padding: 8px;
  }

  .z-topbar[data-header-modern] .z-mnav-link--accent {
    justify-content: center;
    min-height: 46px;
    border-color: rgba(237, 191, 63, 0.94);
    background: linear-gradient(180deg, rgba(245, 200, 75, 0.96) 0%, rgba(241, 194, 66, 0.9) 100%);
    color: #3b2a00;
    box-shadow: 0 8px 18px rgba(245, 200, 75, 0.18);
  }

}

/* ==========================================================================
   3. Public Pages
   ========================================================================== */

@media (max-width: 768px) {
  body[data-page="home"] .z-layout,
  body[data-page="programs"] .z-layout,
  body[data-page="universities"] .z-layout,
  body[data-page="work"] .z-layout,
  body[data-page="life"] .z-layout,
  body[data-page="legal"] .z-layout,
  body[data-page="forum"] .z-layout,
  body[data-page="resource-detail"] .z-layout,
  body[data-section="services"] .z-layout,
  body[data-page="home"] .z-service-page,
  body[data-page="resource-detail"] .z-resource-page {
    margin-top: 10px !important;
    margin-bottom: 18px !important;
  }

  body[data-page="home"] .z-hero--landing {
    gap: 12px !important;
    padding: 16px !important;
    border-radius: var(--z-mobile-card-radius) !important;
    min-height: 0 !important;
  }

  body[data-page="home"] .z-hero__title {
    font-size: var(--z-mobile-title-size) !important;
    line-height: 1.02 !important;
    margin: 0 !important;
  }

  body[data-page="home"] .z-hero__desc {
    margin: 8px 0 0 !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    max-width: 28ch;
  }

  body[data-page="home"] .z-hero__resourceMeta {
    display: none !important;
  }

  body[data-page="home"] .z-search--hero {
    margin-top: 12px !important;
    padding: 10px !important;
    border-radius: 16px !important;
  }

  body[data-page="home"] .z-search__submit {
    min-height: 44px !important;
    border-radius: 14px !important;
  }

  body[data-page="home"] .z-cats {
    gap: 10px !important;
    margin-top: 0 !important;
  }

  body[data-page="home"] .z-cat {
    min-height: 88px;
    padding: 14px !important;
    border-radius: 18px !important;
  }

  body[data-page="home"] .z-cat__title {
    font-size: 16px !important;
    line-height: 1.2 !important;
  }

  body[data-page="home"] .z-cat__text {
    font-size: 13px !important;
    line-height: 1.35 !important;
  }

  body[data-page="programs"] .z-sidebar,
  body[data-page="universities"] .z-sidebar,
  body[data-page="work"] .z-sidebar,
  body[data-page="life"] .z-sidebar,
  body[data-page="legal"] .z-sidebar,
  body[data-page="home"] .z-sidebar {
    display: none !important;
  }

  body[data-page="programs"] .u2-top,
  body[data-page="universities"] .u2-top,
  body[data-page="work"] .u2-top,
  body[data-page="life"] .u2-top,
  body[data-page="legal"] .u2-top {
    display: block !important;
  }

  body[data-page="programs"] .u2-top__grid,
  body[data-page="universities"] .u2-top__grid,
  body[data-page="work"] .u2-top__grid,
  body[data-page="life"] .u2-top__grid,
  body[data-page="legal"] .u2-top__grid {
    display: grid !important;
    gap: 12px !important;
  }

  body[data-page="programs"] .u2-top__aside,
  body[data-page="universities"] .u2-top__aside,
  body[data-page="work"] .u2-top__aside,
  body[data-page="life"] .u2-top__aside,
  body[data-page="legal"] .u2-top__aside {
    display: none !important;
  }

  body[data-page="programs"] .z-section-hero,
  body[data-page="universities"] .z-section-hero,
  body[data-page="work"] .z-section-hero,
  body[data-page="life"] .z-section-hero,
  body[data-page="legal"] .z-section-hero,
  body[data-section="services"] .z-service-hero {
    padding: 16px !important;
    border-radius: var(--z-mobile-card-radius) !important;
    gap: 12px !important;
    min-height: 0 !important;
  }

  body[data-page="programs"] .z-section-hero__title,
  body[data-page="universities"] .z-section-hero__title,
  body[data-page="work"] .z-section-hero__title,
  body[data-page="life"] .z-section-hero__title,
  body[data-page="legal"] .z-section-hero__title,
  body[data-section="services"] .z-service-title {
    font-size: var(--z-mobile-title-size) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.03em !important;
  }

  body[data-page="programs"] .z-section-hero__desc,
  body[data-page="universities"] .z-section-hero__desc,
  body[data-page="work"] .z-section-hero__desc,
  body[data-page="life"] .z-section-hero__desc,
  body[data-page="legal"] .z-section-hero__desc,
  body[data-section="services"] .z-service-subtitle {
    font-size: 15px !important;
    line-height: 1.4 !important;
    max-width: 30ch;
    margin: 0 !important;
  }

  body[data-page="programs"] .z-section-guide,
  body[data-page="universities"] .z-section-guide,
  body[data-page="work"] .z-section-guide,
  body[data-page="life"] .z-section-guide,
  body[data-page="legal"] .z-section-guide {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  body[data-page="programs"] .z-section-title,
  body[data-page="universities"] .z-section-title,
  body[data-page="work"] .z-section-title,
  body[data-page="life"] .z-section-title,
  body[data-page="legal"] .z-section-title {
    font-size: 20px !important;
    line-height: 1.2 !important;
  }

  body[data-page="programs"] .z-section-steps,
  body[data-page="universities"] .z-section-steps,
  body[data-page="work"] .z-section-steps,
  body[data-page="life"] .z-section-steps,
  body[data-page="legal"] .z-section-steps {
    display: flex !important;
    gap: 10px !important;
    overflow-x: auto !important;
    padding: 2px 0 4px !important;
    scroll-snap-type: x proximity;
  }

  body[data-page="programs"] .z-step-card,
  body[data-page="universities"] .z-step-card,
  body[data-page="work"] .z-step-card,
  body[data-page="life"] .z-step-card,
  body[data-page="legal"] .z-step-card {
    flex: 0 0 min(78vw, 250px);
    min-height: 0 !important;
    padding: 12px !important;
    border-radius: 16px !important;
    scroll-snap-align: start;
  }

  body[data-page="programs"] .z-grid,
  body[data-page="universities"] .z-section-card,
  body[data-page="work"] .z-grid,
  body[data-page="life"] .z-grid,
  body[data-page="legal"] .z-grid,
  body[data-section="services"] .z-service-card,
  body[data-section="services"] .z-service-cta,
  body[data-page="resource-detail"] .z-resource-page__hero,
  body[data-page="resource-detail"] .z-resource-page__card {
    padding: var(--z-mobile-card-padding) !important;
    border-radius: var(--z-mobile-card-radius) !important;
  }

  body[data-page="programs"] .z-grid__head,
  body[data-page="universities"] .z-grid__head,
  body[data-page="work"] .z-grid__head,
  body[data-page="life"] .z-grid__head,
  body[data-page="legal"] .z-grid__head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    align-items: start !important;
  }

  body[data-page="programs"] .z-grid__title,
  body[data-page="universities"] .z-grid__title,
  body[data-page="work"] .z-grid__title,
  body[data-page="life"] .z-grid__title,
  body[data-page="legal"] .z-grid__title {
    font-size: 22px !important;
    line-height: 1.15 !important;
  }

  body[data-page="programs"] .z-grid__meta,
  body[data-page="universities"] .z-grid__meta,
  body[data-page="work"] .z-grid__meta,
  body[data-page="life"] .z-grid__meta,
  body[data-page="legal"] .z-grid__meta {
    font-size: var(--z-mobile-meta-size) !important;
    white-space: nowrap;
    padding-top: 3px;
  }

  .z-mobile-controls {
    margin-top: 10px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 16px;
    background: #f8fafc;
    overflow: hidden;
  }

  .z-mobile-controls > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: var(--z-mobile-control-height);
    padding: 0 14px;
    list-style: none;
    cursor: pointer;
  }

  .z-mobile-controls > summary::-webkit-details-marker {
    display: none;
  }

  .z-mobile-controls__icons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
  }

  .z-mobile-controls__icons svg {
    width: 18px;
    height: 18px;
    display: block;
  }

  .z-mobile-controls__count {
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.1);
    color: #475569;
    font-size: 12px;
    font-weight: 800;
  }

  .z-mobile-controls[open] > summary {
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  }

  .z-mobile-controls > *:not(summary) {
    display: none;
  }

  .z-mobile-controls[open] > *:not(summary) {
    display: block;
  }

  body[data-page="programs"] .z-prog-toolbar,
  body[data-page="universities"] #uniCatalogFilters,
  body[data-page="work"] #workToolbar,
  body[data-page="life"] #lifeToolbar,
  body[data-page="legal"] #legalToolbar {
    margin: 0 !important;
    padding: 12px !important;
    display: grid !important;
    gap: 10px !important;
    background: transparent !important;
  }

  body[data-page="programs"] .z-prog-filter,
  body[data-page="universities"] .z-uni-filter {
    display: grid !important;
    gap: 6px !important;
  }

  body[data-page="programs"] .z-prog-filter > span,
  body[data-page="universities"] .z-uni-filter > span {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    letter-spacing: 0.02em;
  }

  body[data-page="programs"] .z-prog-filter select,
  body[data-page="universities"] .z-uni-filter select,
  body[data-page="work"] #workToolbar .z-sort,
  body[data-page="life"] #lifeToolbar .z-sort,
  body[data-page="legal"] #legalToolbar .z-sort {
    width: 100% !important;
    min-height: var(--z-mobile-control-height) !important;
    border-radius: 14px !important;
    padding: 0 14px !important;
    font-size: 15px !important;
    background: #fff !important;
  }

  body[data-page="programs"] .z-prog-cards,
  body[data-page="universities"] .z-uni-universities__list,
  body[data-page="work"] .z-cards,
  body[data-page="life"] .z-cards,
  body[data-page="legal"] .z-cards,
  body[data-section="services"] .z-service-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  body[data-page="programs"] .z-prog-card2,
  body[data-page="universities"] .z-uni-card2,
  body[data-page="work"] .z-card,
  body[data-page="life"] .z-card,
  body[data-page="legal"] .z-card,
  body[data-section="services"] .z-service-card {
    min-height: 0 !important;
    height: auto !important;
    border-radius: 18px !important;
    overflow: hidden;
  }

  body[data-page="programs"] .z-prog-card2__body,
  body[data-page="universities"] .z-uni-card2__body,
  body[data-page="work"] .z-card,
  body[data-page="life"] .z-card,
  body[data-page="legal"] .z-card {
    padding: 14px !important;
  }

  body[data-page="programs"] .z-prog-card2__title,
  body[data-page="universities"] .z-uni-card2__title,
  body[data-page="work"] .z-card__title,
  body[data-page="life"] .z-card__title,
  body[data-page="legal"] .z-card__title,
  body[data-section="services"] .z-service-card__title {
    font-size: 18px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }

  body[data-page="programs"] .z-prog-card2__desc,
  body[data-page="universities"] .z-uni-card2__desc,
  body[data-page="work"] .z-card__desc,
  body[data-page="life"] .z-card__desc,
  body[data-page="legal"] .z-card__desc,
  body[data-section="services"] .z-service-text,
  body[data-section="services"] .z-service-list li {
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  body[data-page="programs"] .z-prog-card2__meta,
  body[data-page="universities"] .z-uni-card2__meta {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px !important;
  }

  body[data-page="programs"] .z-prog-card2__meta-item,
  body[data-page="universities"] .z-uni-card2__meta-item {
    padding: 8px 10px;
    border-radius: 12px;
    background: #f8fafc;
  }

  body[data-page="programs"] .z-prog-card2__actions .z-btn,
  body[data-page="universities"] .z-uni-card2__actions .z-btn,
  body[data-section="services"] .z-service-actions .z-btn,
  body[data-page="resource-detail"] .z-resource-page__cta .z-btn {
    width: 100%;
    min-height: 44px !important;
    border-radius: 14px !important;
  }

  body[data-section="services"] .z-service-shell {
    gap: 12px !important;
    margin-top: 12px !important;
  }

  body[data-section="services"] .z-service-breadcrumbs {
    display: none !important;
  }

  body[data-section="services"] .z-service-hero {
    grid-template-columns: 1fr !important;
  }

  body[data-section="services"] .z-service-panel {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  body[data-section="services"] .z-service-note,
  body[data-section="services"] .z-service-helper {
    display: none !important;
  }

  body[data-section="services"] .z-service-steps {
    grid-template-columns: 1fr !important;
  }

  body[data-page="resource-detail"] .z-resource-page {
    padding: 12px 0 24px !important;
  }

  body[data-page="resource-detail"] .z-resource-page__breadcrumbs {
    display: none !important;
  }

  body[data-page="resource-detail"] .z-resource-page__heroGrid,
  body[data-page="resource-detail"] .z-resource-page__layout {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 0 !important;
  }

  body[data-page="resource-detail"] .z-resource-page__hero {
    overflow: visible !important;
  }

  body[data-page="resource-detail"] .z-resource-page__heroMain > .z-resource-page__heroMeta,
  body[data-page="resource-detail"] .z-resource-page__heroMain > .z-resource-page__cta {
    display: flex !important;
  }

  body[data-page="resource-detail"] .z-resource-page__heroAside {
    display: none !important;
  }

  body[data-page="resource-detail"] .z-resource-page__title,
  body[data-page="resource-detail"] .z-resource-page__heading {
    text-align: left !important;
    font-size: 24px !important;
    line-height: 1.15 !important;
  }

  body[data-page="resource-detail"] .z-resource-page__summary,
  body[data-page="resource-detail"] .z-resource-page__heroNote,
  body[data-page="resource-detail"] .z-resource-page__text,
  body[data-page="resource-detail"] .z-resource-page__list li {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }

  body[data-page="resource-detail"] .z-resource-page__aside {
    position: static !important;
  }

  body[data-section="legal"] .z-legal-doc-page {
    padding: 0 !important;
  }

  body[data-section="legal"] .z-legal-doc {
    width: 100% !important;
    padding: 16px !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05) !important;
  }

  body[data-section="legal"] .z-legal-doc__title {
    font-size: 28px !important;
    line-height: 1.08 !important;
  }

  body[data-section="legal"] .z-legal-doc__subtitle,
  body[data-section="legal"] .z-legal-doc__body,
  body[data-section="legal"] .z-legal-doc__body p,
  body[data-section="legal"] .z-legal-doc__body li {
    font-size: 15px !important;
    line-height: 1.65 !important;
  }

  body[data-section="legal"] .z-legal-doc__body h2 {
    font-size: 20px !important;
    line-height: 1.25 !important;
    margin: 24px 0 10px !important;
  }

  body.forum-page .z-forum-page .page-shell {
    padding-top: 10px !important;
  }

  body.forum-page .z-forum-page .forum-heading {
    padding: 0 !important;
    justify-content: stretch !important;
  }

  body.forum-page .z-forum-page .forum-pagehead__actions {
    width: 100%;
  }

  body.forum-page .z-forum-page .forum-pagehead__actions .search {
    width: 100% !important;
  }

  body.forum-page .z-forum-page .composer {
    display: none !important;
  }

  body.forum-page .z-forum-page .forum-mobile-actions {
    display: grid !important;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin: 10px 0 12px;
  }

  body.forum-page .z-forum-page .forum-mobile-actions .btn {
    min-height: 44px;
    border-radius: 14px;
  }
}

/* ==========================================================================
   4. Utilities
   ========================================================================== */

@media (max-width: 480px) {
  body[data-page="programs"] .z-prog-card2__meta,
  body[data-page="universities"] .z-uni-card2__meta {
    grid-template-columns: 1fr !important;
  }

  .z-mobile-controls > summary {
    padding-left: 12px;
    padding-right: 12px;
  }

  body[data-page="home"] .z-cat,
  body[data-page="programs"] .z-prog-card2,
  body[data-page="universities"] .z-uni-card2,
  body[data-page="work"] .z-card,
  body[data-page="life"] .z-card,
  body[data-page="legal"] .z-card,
  body[data-section="services"] .z-service-card,
  body[data-page="resource-detail"] .z-resource-page__card,
  body[data-section="legal"] .z-legal-doc {
    border-radius: 18px !important;
  }
}

/* ==========================================================================
   5. Header Visual Refresh
   ========================================================================== */

@media (max-width: 768px) {
  .z-topbar[data-header-modern] .z-shell {
    padding-left: max(16px, calc(env(safe-area-inset-left, 0px) + 12px)) !important;
    padding-right: max(16px, calc(env(safe-area-inset-right, 0px) + 12px)) !important;
  }

  .z-topbar[data-header-modern] .z-topbar__row {
    min-height: 54px !important;
    padding: 5px 0 !important;
    gap: 8px !important;
    align-items: center !important;
  }

  .z-topbar[data-header-modern] .z-brand--link {
    min-width: 0;
    padding: 0 !important;
    border-radius: 12px;
  }

  .z-topbar[data-header-modern] .z-brand {
    gap: 7px !important;
    align-items: center !important;
    max-width: min(58vw, 220px);
  }

  .z-topbar[data-header-modern] .z-brand__text {
    display: flex;
    align-items: center;
    min-width: 0;
  }

  .z-topbar[data-header-modern] .z-brand__logo {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px;
    border-radius: 9px !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 4px 10px rgba(17, 24, 39, 0.05) !important;
  }

  .z-topbar[data-header-modern] .z-brand__logo img {
    width: 248%;
    height: 258%;
  }

  .z-topbar[data-header-modern] .z-brand__name {
    font-size: clamp(16px, 4.2vw, 17px) !important;
    line-height: 1 !important;
    letter-spacing: -0.025em !important;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .z-topbar[data-header-modern] .z-brand__sub {
    display: none !important;
  }

  .z-topbar[data-header-modern] .z-topbar__right,
  .z-topbar[data-header-modern] .z-topbar__controls {
    gap: 2px !important;
    align-items: center !important;
  }

  .z-topbar[data-header-modern] .z-burger {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    box-shadow: none !important;
    display: inline-grid !important;
    place-items: center !important;
  }

  .z-topbar[data-header-modern] .z-burger:hover,
  .z-topbar[data-header-modern] .z-burger:active,
  .z-topbar[data-header-modern] .z-burger[aria-expanded="true"] {
    transform: none !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .z-topbar[data-header-modern] .z-burger__glyph {
    width: 24px;
    height: 24px;
    display: block;
    overflow: visible;
  }

  .z-topbar[data-header-modern] .z-burger__glyph path {
    fill: none;
    stroke: rgba(17, 24, 39, 0.82);
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .z-topbar[data-header-modern] .z-burger:hover .z-burger__glyph path,
  .z-topbar[data-header-modern] .z-burger[aria-expanded="true"] .z-burger__glyph path {
    stroke: #0f172a;
  }

  .z-topbar[data-header-modern] .z-burger::before,
  .z-topbar[data-header-modern] .z-burger::after {
    content: none !important;
  }
}

@media (max-width: 480px) {
  :root {
    --z-mobile-page-gutter: 10px;
  }

  .z-topbar[data-header-modern] .z-shell {
    padding-left: max(14px, calc(env(safe-area-inset-left, 0px) + 10px)) !important;
    padding-right: max(14px, calc(env(safe-area-inset-right, 0px) + 10px)) !important;
  }

  .z-topbar[data-header-modern] .z-topbar__row {
    min-height: 50px !important;
    padding: 4px 0 !important;
  }

  .z-topbar[data-header-modern] .z-brand {
    max-width: 62vw;
    gap: 6px !important;
  }

  .z-topbar[data-header-modern] .z-brand__logo {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px;
    border-radius: 8px !important;
  }

  .z-topbar[data-header-modern] .z-brand__name {
    font-size: 16px !important;
  }

  .z-topbar[data-header-modern] .z-burger {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }
}

@media (max-width: 768px) {
  /* Keep auth cards horizontally centered on mobile without redesigning the forms. */
  body[data-section="account-auth"] {
    min-height: 100svh !important;
    display: grid !important;
    place-items: center !important;
    padding-top: 16px !important;
    padding-bottom: 16px !important;
    padding-left: var(--z-mobile-page-gutter, 12px) !important;
    padding-right: var(--z-mobile-page-gutter, 12px) !important;
    overflow-y: auto !important;
  }

  body[data-section="account-auth"][data-page="account-auth-legacy"] {
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: center !important;
  }

  body[data-section="account-auth"][data-page="account-auth-legacy"] .card {
    width: min(100%, 980px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body[data-section="account-auth"]:not([data-page="account-auth-legacy"]) .z-auth-layout {
    width: 100% !important;
    min-height: calc(100svh - 32px) !important;
    display: grid !important;
    place-items: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body[data-section="account-auth"]:not([data-page="account-auth-legacy"]) .z-auth-card {
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (max-width: 768px) and (max-height: 760px) {
  body[data-section="account-auth"] {
    place-items: start center !important;
  }

  body[data-section="account-auth"]:not([data-page="account-auth-legacy"]) .z-auth-layout {
    min-height: 0 !important;
  }
}

@media (max-width: 640px) {
  /* Home hero: modern mobile typography without overflow. */
  body[data-page="home"] .z-hero--landing {
    padding: 12px !important;
    gap: 10px !important;
  }

  body[data-page="home"] .z-hero--landing .z-hero__content {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    gap: 6px !important;
  }

  body[data-page="home"] .z-hero__title {
    max-width: 100% !important;
    margin: 0 !important;
    font-size: clamp(23px, 7.1vw, 27px) !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
    letter-spacing: -0.035em !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    text-wrap: balance;
  }

  body[data-page="home"] .z-hero__desc {
    max-width: 100% !important;
    margin: 2px 0 0 !important;
    font-size: clamp(12px, 3.2vw, 13px) !important;
    line-height: 1.3 !important;
    letter-spacing: -0.015em !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }
}

@media (max-width: 390px) {
  body[data-page="home"] .z-hero--landing {
    padding: 12px !important;
  }

  body[data-page="home"] .z-hero__title {
    font-size: clamp(21px, 6.8vw, 24px) !important;
    line-height: 1.12 !important;
  }

  body[data-page="home"] .z-hero__desc {
    font-size: 12px !important;
    line-height: 1.28 !important;
  }
}

@media (max-width: 768px) {
  /* List pages: align mobile catalog UI with homepage card/header rhythm. */
  body[data-page="programs"] [data-search-results],
  body[data-page="universities"] [data-search-results],
  body[data-page="work"] [data-search-results],
  body[data-page="life"] [data-search-results],
  body[data-page="legal"] [data-search-results],
  body[data-page="ausbildung"] [data-search-results] {
    padding: 14px !important;
    border-radius: 18px !important;
    border-color: rgba(203, 213, 225, 0.78) !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05) !important;
  }

  body[data-page="programs"] .z-grid__head,
  body[data-page="universities"] .z-grid__head,
  body[data-page="work"] .z-grid__head,
  body[data-page="life"] .z-grid__head,
  body[data-page="legal"] .z-grid__head,
  body[data-page="ausbildung"] .z-grid__head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
    gap: 6px 12px !important;
    margin-bottom: 10px !important;
  }

  body[data-page="programs"] .z-grid__title,
  body[data-page="universities"] .z-grid__title,
  body[data-page="work"] .z-grid__title,
  body[data-page="life"] .z-grid__title,
  body[data-page="legal"] .z-grid__title,
  body[data-page="ausbildung"] .z-grid__title {
    margin: 0 !important;
    font-size: 21px !important;
    line-height: 1.08 !important;
    letter-spacing: -0.025em !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    overflow-wrap: anywhere;
  }

  body[data-page="programs"] .z-grid__meta,
  body[data-page="universities"] .z-grid__meta,
  body[data-page="work"] .z-grid__meta,
  body[data-page="life"] .z-grid__meta,
  body[data-page="legal"] .z-grid__meta,
  body[data-page="ausbildung"] .z-grid__meta {
    align-self: start !important;
    padding-top: 2px !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    color: #64748b !important;
    white-space: nowrap !important;
  }

  body[data-page="programs"] .z-mobile-controls,
  body[data-page="universities"] .z-mobile-controls,
  body[data-page="work"] .z-mobile-controls,
  body[data-page="life"] .z-mobile-controls,
  body[data-page="legal"] .z-mobile-controls {
    margin: 0 0 12px !important;
    border: 0 !important;
    background: transparent !important;
    overflow: visible !important;
  }

  body[data-page="programs"] .z-mobile-controls > summary,
  body[data-page="universities"] .z-mobile-controls > summary,
  body[data-page="work"] .z-mobile-controls > summary,
  body[data-page="life"] .z-mobile-controls > summary,
  body[data-page="legal"] .z-mobile-controls > summary {
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body[data-page="programs"] .z-mobile-controls[open] > summary,
  body[data-page="universities"] .z-mobile-controls[open] > summary,
  body[data-page="work"] .z-mobile-controls[open] > summary,
  body[data-page="life"] .z-mobile-controls[open] > summary,
  body[data-page="legal"] .z-mobile-controls[open] > summary {
    border-color: transparent !important;
  }

  body[data-page="programs"] .z-mobile-controls__icons,
  body[data-page="universities"] .z-mobile-controls__icons,
  body[data-page="work"] .z-mobile-controls__icons,
  body[data-page="life"] .z-mobile-controls__icons,
  body[data-page="legal"] .z-mobile-controls__icons {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #5f6b84 !important;
  }

  body[data-page="programs"] .z-mobile-controls__icons svg,
  body[data-page="universities"] .z-mobile-controls__icons svg,
  body[data-page="work"] .z-mobile-controls__icons svg,
  body[data-page="life"] .z-mobile-controls__icons svg,
  body[data-page="legal"] .z-mobile-controls__icons svg {
    width: 36px !important;
    height: 36px !important;
    padding: 9px !important;
    border: 1px solid rgba(203, 213, 225, 0.86) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 10px rgba(15, 23, 42, 0.04) !important;
    display: block !important;
  }

  body[data-page="programs"] .z-mobile-controls__count,
  body[data-page="universities"] .z-mobile-controls__count,
  body[data-page="work"] .z-mobile-controls__count,
  body[data-page="life"] .z-mobile-controls__count,
  body[data-page="legal"] .z-mobile-controls__count {
    min-width: 30px !important;
    height: 30px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(203, 213, 225, 0.92) !important;
    background: #fff !important;
    color: #475569 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  }

  body[data-page="programs"] .z-mobile-controls > summary,
  body[data-page="universities"] .z-mobile-controls > summary,
  body[data-page="work"] .z-mobile-controls > summary,
  body[data-page="life"] .z-mobile-controls > summary,
  body[data-page="legal"] .z-mobile-controls > summary {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  body[data-page="programs"] .z-mobile-controls__count,
  body[data-page="universities"] .z-mobile-controls__count,
  body[data-page="work"] .z-mobile-controls__count,
  body[data-page="life"] .z-mobile-controls__count,
  body[data-page="legal"] .z-mobile-controls__count {
    margin-left: auto !important;
  }

  body[data-page="programs"] .z-mobile-controls > *:not(summary),
  body[data-page="universities"] .z-mobile-controls > *:not(summary),
  body[data-page="work"] .z-mobile-controls > *:not(summary),
  body[data-page="life"] .z-mobile-controls > *:not(summary),
  body[data-page="legal"] .z-mobile-controls > *:not(summary) {
    margin-top: 8px !important;
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%) !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04) !important;
  }

  body[data-page="programs"] .z-prog-toolbar,
  body[data-page="universities"] #uniCatalogFilters,
  body[data-page="work"] #workToolbar,
  body[data-page="life"] #lifeToolbar,
  body[data-page="legal"] #legalToolbar {
    padding: 12px !important;
    gap: 10px !important;
  }

  body[data-page="programs"] .z-prog-filter > span,
  body[data-page="universities"] .z-uni-filter > span {
    font-size: 11px !important;
    line-height: 1.25 !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
    color: #64748b !important;
  }

  body[data-page="programs"] .z-prog-filter select,
  body[data-page="universities"] .z-uni-filter select,
  body[data-page="universities"] .z-uni-filter input,
  body[data-page="work"] #workToolbar .z-sort,
  body[data-page="life"] #lifeToolbar .z-sort,
  body[data-page="legal"] #legalToolbar .z-sort {
    min-height: 42px !important;
    border-radius: 12px !important;
    border-color: rgba(203, 213, 225, 0.82) !important;
    background: #fff !important;
    color: #0f172a !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
  }

  body[data-page="programs"] .z-prog-cards,
  body[data-page="universities"] .z-uni-universities__list,
  body[data-page="work"] .z-cards,
  body[data-page="life"] .z-cards,
  body[data-page="legal"] .z-cards,
  body[data-page="ausbildung"] .z-cards {
    gap: 12px !important;
  }

  body[data-page="programs"] .z-prog-card2,
  body[data-page="universities"] .z-uni-card2,
  body[data-page="work"] .z-card,
  body[data-page="life"] .z-card,
  body[data-page="legal"] .z-card,
  body[data-page="ausbildung"] .z-card {
    border-radius: 16px !important;
    border-color: rgba(203, 213, 225, 0.78) !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05) !important;
  }

  body[data-page="programs"] .z-prog-card2__body,
  body[data-page="universities"] .z-uni-card2__body,
  body[data-page="work"] .z-card,
  body[data-page="life"] .z-card,
  body[data-page="legal"] .z-card,
  body[data-page="ausbildung"] .z-card {
    padding: 13px !important;
    gap: 8px !important;
  }

  body[data-page="programs"] .z-prog-card2__title,
  body[data-page="universities"] .z-uni-card2__title,
  body[data-page="work"] .z-card__title,
  body[data-page="life"] .z-card__title,
  body[data-page="legal"] .z-card__title,
  body[data-page="ausbildung"] .z-card__title {
    font-size: 16px !important;
    line-height: 1.28 !important;
  }

  body[data-page="programs"] .z-prog-card2__desc,
  body[data-page="universities"] .z-uni-card2__desc,
  body[data-page="work"] .z-card__desc,
  body[data-page="life"] .z-card__desc,
  body[data-page="legal"] .z-card__desc,
  body[data-page="ausbildung"] .z-card__desc {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  body[data-page="programs"] .z-prog-card2__meta,
  body[data-page="universities"] .z-uni-card2__meta,
  body[data-page="work"] .z-card__meta,
  body[data-page="life"] .z-card__meta,
  body[data-page="legal"] .z-card__meta {
    gap: 7px !important;
  }

  body[data-page="programs"] .z-prog-card2__actions,
  body[data-page="universities"] .z-uni-card2__actions,
  body[data-page="work"] .z-card__actions,
  body[data-page="life"] .z-card__actions,
  body[data-page="legal"] .z-card__actions,
  body[data-page="ausbildung"] .z-card__actions {
    gap: 8px !important;
  }

  body[data-page="programs"] .z-prog-card2__actions .z-btn,
  body[data-page="universities"] .z-uni-card2__actions .z-btn,
  body[data-page="work"] .z-card__actions .z-btn,
  body[data-page="life"] .z-card__actions .z-btn,
  body[data-page="legal"] .z-card__actions .z-btn,
  body[data-page="ausbildung"] .z-card__actions .z-btn {
    min-height: 34px !important;
    border-radius: 11px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 390px) {
  body[data-page="programs"] .z-grid__head,
  body[data-page="universities"] .z-grid__head,
  body[data-page="work"] .z-grid__head,
  body[data-page="life"] .z-grid__head,
  body[data-page="legal"] .z-grid__head,
  body[data-page="ausbildung"] .z-grid__head {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-page="programs"] .z-grid__meta,
  body[data-page="universities"] .z-grid__meta,
  body[data-page="work"] .z-grid__meta,
  body[data-page="life"] .z-grid__meta,
  body[data-page="legal"] .z-grid__meta,
  body[data-page="ausbildung"] .z-grid__meta {
    padding-top: 0 !important;
  }
}

@media (max-width: 920px) {
  .z-grid__head {
    flex-direction: column;
    align-items: stretch;
  }

  .z-grid__controls {
    justify-items: stretch;
  }

  .z-grid__toolbar {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .z-toolbar-menu {
    min-width: 0;
  }

  .z-toolbar-trigger {
    width: 34px !important;
    min-width: 0 !important;
    height: 34px !important;
    padding: 0 !important;
    gap: 0 !important;
    border-radius: 10px !important;
    justify-content: center !important;
  }

  .z-toolbar-trigger__icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .z-toolbar-trigger__icon svg {
    width: 16px;
    height: 16px;
  }

  .z-toolbar-popover {
    left: auto !important;
    right: 0 !important;
    width: min(210px, calc(100vw - 24px)) !important;
    min-width: 170px !important;
  }

  .z-toolbar-popover--panel {
    width: min(320px, calc(100vw - 24px)) !important;
  }
}
