/* ==========================================================================
   MOKY Screens — site navigation (the home, Pricing and Ads pages)
   The app's command deck (moky-frontend components/app-shell/app-shell.css), brought to the site:
   a sticky glass deck, a brand mark that locks on, a page rail with a glowing lens and cyan HUD
   corners, a scan of light along the lower edge when a new section comes into view, drop-down
   panels like the app's search results, and on phones the app's bottom sheet.

   Loaded after style.css, so it also sets --nav-h for the pages that use it; the others keep the
   classic .nav header from style.css. Logical properties throughout, so it mirrors in Arabic; the
   only physical `left` values are the sliding lens/marker and the panel, which JS positions from
   measured offsets.
   ========================================================================== */

/* --nav-h includes the status bar for browsers whose page runs under it (viewport-fit=cover in Brave
   on iPhone, a home-screen app), so the deck and everything that clears it stay below the status
   bar. Safari and in-app browsers report a 0 inset and see no change. */
:root {
  --nav-h: calc(68px + env(safe-area-inset-top, 0px));
  --mk-ease: cubic-bezier(.2, .8, .2, 1);
}
@media (max-width: 1179.98px) {
  :root { --nav-h: calc(60px + env(safe-area-inset-top, 0px)); }
}

/* ---------- Deck ---------- */
.mnav { position: sticky; top: 0; z-index: 60; height: var(--nav-h); padding-top: env(safe-area-inset-top, 0px); }
/* The glass lives on a pseudo-element: a backdrop-filter on the header itself would trap the
   fixed-position sheet and scrim inside it. */
.mnav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--ln) 55%, transparent);
  transition: box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}
.mnav.is-scrolled::before {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom-color: var(--ln);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .7);
}
.mnav-bar { position: relative; height: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.mnav-pill { display: flex; align-items: center; gap: 12px; height: 100%; }

/* Section progress, and the scan: a light that sweeps the lower edge when a new section arrives. */
.mnav-progress {
  position: absolute; inset-inline: 0; bottom: -1px; height: 2px;
  overflow: hidden; pointer-events: none;
  opacity: 0; transition: opacity .3s ease;
}
.mnav.is-scrolled .mnav-progress { opacity: .85; }
.mnav-progress i {
  display: block; height: 100%;
  background: linear-gradient(90deg, #2F6BFF, #7C4DFF 65%, #22D3EE);
  transform: scaleX(var(--p, 0)); transform-origin: left center;
}
[dir="rtl"] .mnav-progress i { transform-origin: right center; }
.mnav-scan {
  position: absolute; inset-inline: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--cy) 45%, var(--pg) 60%, transparent) no-repeat;
  background-size: 28% 100%; background-position: -40% 0;
  opacity: 0;
}
.mnav-scan.run { animation: mnav-scan 1.1s cubic-bezier(.4, 0, .2, 1) both; }
[dir="rtl"] .mnav-scan.run { animation-name: mnav-scan-rtl; }
@keyframes mnav-scan { from { background-position: -40% 0; opacity: 1; } 80% { opacity: 1; } to { background-position: 140% 0; opacity: 0; } }
@keyframes mnav-scan-rtl { from { background-position: 140% 0; opacity: 1; } 80% { opacity: 1; } to { background-position: -40% 0; opacity: 0; } }

/* ---------- Brand: the way home ---------- */
.mnav-brand {
  display: flex; align-items: center; gap: 10px; flex: none;
  height: 46px; padding-inline: 6px 12px; margin-inline-start: -6px;
  border-radius: 14px;
  color: var(--tx); font: 700 15px var(--fd); letter-spacing: .3em;
  transition: background-color .2s ease;
}
.mnav-brand:hover { background: rgba(47, 107, 255, .1); }
.mnav-brand-m { position: relative; display: grid; place-items: center; width: 34px; height: 34px; }
.mnav-brand-m .bm {
  width: 30px; height: 30px;
  filter: drop-shadow(0 0 8px rgba(47, 107, 255, .6));
  transition: transform .4s var(--mk-ease), filter .2s ease;
}
/* A cyan frame snaps around the mark on hover, like a HUD lock-on. */
.mnav-brand-m::after {
  content: ""; position: absolute; inset: -4px;
  border: 1px solid var(--cy); border-radius: 13px;
  opacity: 0; transform: scale(.6);
  transition: opacity .2s ease, transform .4s var(--mk-ease);
}
.mnav-brand:hover .mnav-brand-m .bm,
.mnav-brand:focus-visible .mnav-brand-m .bm { transform: rotate(-8deg) scale(1.06); filter: drop-shadow(0 0 14px rgba(79, 141, 255, .95)); }
.mnav-brand:hover .mnav-brand-m::after,
.mnav-brand:focus-visible .mnav-brand-m::after { opacity: .75; transform: none; }
.mnav-brand:active .mnav-brand-m .bm { transform: scale(.88); transition-duration: .1s; }
/* "SCREENS" rolls over to "HOME" while the pointer is on the brand. */
.mnav-brand-d {
  display: grid; height: 16px; overflow: hidden;
  padding-inline-start: 10px; border-inline-start: 1px solid var(--ln);
}
.mnav-brand-d em {
  grid-area: 1 / 1;
  display: flex; align-items: center; gap: 5px; height: 16px;
  font: 600 10px var(--fb); font-style: normal; letter-spacing: .34em;
  color: var(--mu);
  transition: transform .32s var(--mk-ease), opacity .25s ease;
}
.mnav-brand-d em + em { color: var(--cy); font-weight: 800; transform: translateY(100%); opacity: 0; }
.mnav-brand-d .ic { width: 12px; height: 12px; stroke-width: 2.2; }
.mnav-brand:hover .mnav-brand-d em:first-child,
.mnav-brand:focus-visible .mnav-brand-d em:first-child { transform: translateY(-100%); opacity: 0; }
.mnav-brand:hover .mnav-brand-d em + em,
.mnav-brand:focus-visible .mnav-brand-d em + em { transform: none; opacity: 1; }
[dir="rtl"] .mnav-brand, [dir="rtl"] .mnav-brand-d em:first-child { letter-spacing: .12em; }
[dir="rtl"] .mnav-brand-d em + em { letter-spacing: 0; font-size: 12px; }

/* ---------- Page rail ---------- */
.mnav-links {
  position: relative; display: flex; align-items: center; gap: 2px;
  margin-inline: auto; padding: 4px;
  border: 1px solid color-mix(in srgb, var(--ln) 70%, transparent); border-radius: 14px;
  background: color-mix(in srgb, var(--sf) 72%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}
.mnav-link {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px;
  border: 0; border-radius: 10px; background: none;
  color: var(--mu);
  font: 600 14px var(--fb); white-space: nowrap;
  cursor: pointer;
  transition: color .15s ease;
}
.mnav-link .mnav-li { width: 18px; height: 18px; transition: transform .2s ease, color .2s ease; }
.mnav-link:hover,
.mnav-link[aria-expanded="true"],
.mnav-link[aria-current="true"] { color: var(--tx); }
.mnav-link:hover .mnav-li { transform: translateY(-1px); }
.mnav-link:active .mnav-li { transform: scale(.9); }
.mnav-link[aria-current="true"] .mnav-li { color: var(--pg); }
.mnav-chev { width: 16px; height: 16px; margin-inline: -2px -4px; transition: transform .3s var(--mk-ease); }
.mnav-link[aria-expanded="true"] .mnav-chev { transform: rotate(180deg); }

/* The lens: a glowing capsule with HUD corners that glides to the section in view.
   A fainter one follows the pointer across the rail. JS sets width and translateX. */
.mnav-lens, .mnav-mark {
  position: absolute; left: 0; top: 4px; z-index: 0;
  width: 0; height: 38px; border-radius: 10px;
  opacity: 0; pointer-events: none;
}
.mnav-lens {
  background: rgba(47, 107, 255, .1);
  transition: transform .22s var(--mk-ease), width .22s var(--mk-ease), opacity .15s ease;
}
.mnav-mark {
  background: linear-gradient(180deg, rgba(47, 107, 255, .3), rgba(47, 107, 255, .14));
  border: 1px solid rgba(79, 141, 255, .55);
  box-shadow: 0 0 18px -3px rgba(47, 107, 255, .6), inset 0 0 12px rgba(79, 141, 255, .14);
  transition: transform .36s var(--mk-ease), width .36s var(--mk-ease), opacity .25s ease;
}
.mnav-mark::before, .mnav-mark::after {
  content: ""; position: absolute; width: 8px; height: 8px; border: 1.5px solid var(--cy);
}
.mnav-mark::before { top: -3px; left: -3px; border-right: 0; border-bottom: 0; border-top-left-radius: 6px; }
.mnav-mark::after { bottom: -3px; right: -3px; border-left: 0; border-top: 0; border-bottom-right-radius: 6px; }
.mnav-lens.jump, .mnav-mark.jump { transition: opacity .2s ease; }

.beta {
  display: inline-flex; align-items: center;
  padding: 2px 7px; border-radius: 99px;
  border: 1px solid rgba(124, 77, 255, .6);
  background: rgba(124, 77, 255, .18);
  color: #CDBEFF;
  font: 700 12px/1.25 var(--fb); letter-spacing: 0; text-transform: none;
}

/* ---------- Pricing and Ads: the two business sides of MOKY, set apart from the section links ----------
   Each wears a hairline in the signature gradient with a light that travels round it, a faint tint,
   and a Beta tag that catches the light; the icon moves once on hover. The light runs for under five
   seconds after the page opens (WCAG 2.2.2), then again for as long as the button is pointed at or focused.
   Pricing leads with electric blue, Ads with signal violet. Same treatment in the phone sheet.
   Reduced motion: the edge and tint stay, nothing moves. Logical sizes only, so it mirrors in Arabic. */
@property --mnav-spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.mnav-link:is([data-key="pricing"], [data-key="ads"]),
.mnav-row.simple:is([href$="pricing/"], [href$="publisher/"]) {
  --f1: #4F8DFF; --f2: #7C4DFF;
  isolation: isolate;
  color: var(--tx);
}
.mnav-link[data-key="ads"], .mnav-row.simple[href$="publisher/"] { --f1: #A58BFF; --f2: #2F6BFF; }
.mnav-link:is([data-key="pricing"], [data-key="ads"])::before,
.mnav-link:is([data-key="pricing"], [data-key="ads"])::after,
.mnav-row.simple:is([href$="pricing/"], [href$="publisher/"])::before,
.mnav-row.simple:is([href$="pricing/"], [href$="publisher/"])::after {
  content: ""; position: absolute; inset: 3px; z-index: -1; border-radius: 9px; pointer-events: none;
}
.mnav-row.simple:is([href$="pricing/"], [href$="publisher/"])::before,
.mnav-row.simple:is([href$="pricing/"], [href$="publisher/"])::after { inset: 0; border-radius: 10px; }
/* the travelling light: a conic gradient shown only on a 1px ring */
.mnav-link:is([data-key="pricing"], [data-key="ads"])::before,
.mnav-row.simple:is([href$="pricing/"], [href$="publisher/"])::before {
  padding: 1px;
  background: conic-gradient(from var(--mnav-spin),
    color-mix(in srgb, var(--f1) 30%, transparent) 0deg 200deg,
    var(--f1) 260deg, var(--f2) 300deg,
    color-mix(in srgb, var(--f1) 30%, transparent) 340deg 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: mnav-spin 2.4s linear 2;
}
.mnav-link[data-key="ads"]::before, .mnav-row.simple[href$="publisher/"]::before { animation-delay: -1.2s; }
.mnav-link:is([data-key="pricing"], [data-key="ads"]):is(:hover, :focus-visible)::before,
.mnav-row.simple:is([href$="pricing/"], [href$="publisher/"]):is(:hover, :focus-visible)::before { animation: mnav-spin-on 2.4s linear infinite; }
/* the tint, rising from the lower edge; stronger on hover */
.mnav-link:is([data-key="pricing"], [data-key="ads"])::after,
.mnav-row.simple:is([href$="pricing/"], [href$="publisher/"])::after {
  background: radial-gradient(120% 130% at 50% 120%, color-mix(in srgb, var(--f1) 22%, transparent), transparent 70%);
  opacity: .55; transition: opacity .2s ease;
}
.mnav-link:is([data-key="pricing"], [data-key="ads"]):hover::after,
.mnav-row.simple:is([href$="pricing/"], [href$="publisher/"]):hover::after { opacity: 1; }
.mnav-link:is([data-key="pricing"], [data-key="ads"]) .mnav-li { color: var(--f1); }
.mnav-link[data-key="pricing"]:hover .mnav-li { animation: mnav-swing .7s var(--mk-ease); }
.mnav-link[data-key="ads"]:hover .mnav-li { animation: mnav-call .7s var(--mk-ease); }
/* the Beta tag catches a sheen once, and again on hover */
:is(.mnav-link, .mnav-row) .beta {
  background:
    linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%) -150% 0 / 250% 100% no-repeat,
    rgba(124, 77, 255, .18);
  animation: mnav-sheen 2.6s ease-in-out .4s 1 backwards;
}
.mnav-link[data-key="ads"] .beta, .mnav-row.simple[href$="publisher/"] .beta { animation-delay: 1.6s; }
:is(.mnav-link, .mnav-row):hover .beta { animation: mnav-sheen-on 1.6s ease-in-out; }
@keyframes mnav-spin { to { --mnav-spin: 360deg; } }
@keyframes mnav-spin-on { to { --mnav-spin: 360deg; } }
@keyframes mnav-sheen { 0%, 40% { background-position: -150% 0, 0 0; } 100% { background-position: 250% 0, 0 0; } }
@keyframes mnav-sheen-on { from { background-position: -150% 0, 0 0; } to { background-position: 250% 0, 0 0; } }
@keyframes mnav-swing { 30% { transform: rotate(-14deg); } 60% { transform: rotate(8deg); } }
@keyframes mnav-call { 30% { transform: scale(1.18) rotate(-6deg); } 60% { transform: scale(.96); } }

/* ---------- Actions ---------- */
.mnav-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.mnav-lang {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 12px;
  border: 1px solid var(--ln); border-radius: 10px; background: transparent;
  color: var(--tx); font: 700 13px var(--fb);
  transition: border-color .15s ease, background-color .15s ease;
}
.mnav-lang::before {
  content: ""; width: 16px; height: 16px; flex: none; background: currentColor; opacity: .8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.7 5.6 3.7 9s-1.2 6.4-3.7 9c-2.5-2.6-3.7-5.6-3.7-9S9.5 5.6 12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.7 5.6 3.7 9s-1.2 6.4-3.7 9c-2.5-2.6-3.7-5.6-3.7-9S9.5 5.6 12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mnav-lang:hover { border-color: var(--pg); background: var(--s2); }

.mnav-login {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 12px;
  border: 1px solid transparent; border-radius: 10px;
  color: var(--mu); font: 700 14px var(--fb); white-space: nowrap;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.mnav-login .ic { width: 15px; height: 15px; transition: transform .25s var(--mk-ease); }
.mnav-login:hover { color: var(--tx); border-color: var(--ln); background: var(--s2); }
.mnav-login:hover .ic { transform: translate(2px, -2px); }

.mnav .mnav-cta { min-height: 40px; padding: 0 14px; }
.mnav-cta .ic { width: 16px; height: 16px; }

/* ---------- Burger ---------- */
.mnav-burger {
  display: none; place-items: center; position: relative;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--ln); border-radius: 12px; background: var(--sf);
}
.mnav-burger span {
  position: absolute; left: 13px; right: 13px; height: 2px; border-radius: 2px; background: var(--tx);
  transition: transform .35s var(--mk-ease), opacity .2s ease;
}
.mnav-burger span:nth-child(1) { transform: translateY(-4px); }
.mnav-burger span:nth-child(2) { transform: translateY(4px); }
.mnav-burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); }
.mnav-burger[aria-expanded="true"] span:nth-child(2) { transform: rotate(-45deg); }

/* ---------- Drop-down panels (desktop): drop like the app's search results ---------- */
.mnav-panel {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 2;
  width: 760px; max-width: calc(100vw - 16px);
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 4px 16px; align-items: start;
  padding: 10px;
  border: 1px solid var(--pg); border-radius: 16px;
  background: var(--sf);
  box-shadow: var(--glow), 0 30px 70px rgba(0, 0, 0, .55);
  transform-origin: 50% 0;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-4px) scale(.98);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.mnav-panel::before { content: ""; position: absolute; inset: -18px 0 auto; height: 18px; } /* hover bridge */
.mnav-panel.open {
  opacity: 1; visibility: visible; pointer-events: auto; transform: none;
  transition: opacity .18s ease-out, transform .18s ease-out, visibility 0s;
}
/* A panel with no previews: one column of cards. */
.mnav-panel.solo { width: 400px; grid-template-columns: minmax(0, 1fr); }
.mnav-ph {
  grid-column: 1 / -1; margin: 4px 10px 4px;
  font: 800 11px/1.2 var(--fb); letter-spacing: .14em; text-transform: uppercase; color: var(--cy);
}
[dir="rtl"] .mnav-ph { letter-spacing: 0; font-size: 12px; }

.mnav-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; align-content: start; }
.mnav-card, .mnav-row {
  position: relative;
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 1px 12px; align-items: center;
  min-height: 48px; padding: 7px 10px; border-radius: 10px;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.mnav-card:hover, .mnav-card:focus-visible, .mnav-row:hover { background: var(--s2); }
.mnav-card[aria-current="true"], .mnav-row[aria-current="true"] { background: rgba(47, 107, 255, .2); box-shadow: inset 2px 0 0 var(--pg); }
[dir="rtl"] .mnav-card[aria-current="true"], [dir="rtl"] .mnav-row[aria-current="true"] { box-shadow: inset -2px 0 0 var(--pg); }
.mnav-ico {
  grid-row: span 2; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(47, 107, 255, .14); color: var(--pg);
  transition: background-color .15s ease, color .15s ease;
}
.mnav-ico .ic { width: 19px; height: 19px; }
.mnav-card:hover .mnav-ico, .mnav-card[aria-current="true"] .mnav-ico { background: var(--pr); color: #fff; }
.mnav-txt { display: contents; }
.mnav-txt b { align-self: end; font: 600 14px/1.25 var(--fb); color: var(--tx); }
.mnav-txt small { align-self: start; color: var(--mu); font: 400 12px/1.35 var(--fb); }
/* The Content Hub sits inside the Dashboard: an indented entry on a tree line from the Dashboard's icon */
.mnav-sub { margin-inline-start: 36px; }
.mnav-sub::before {
  content: ""; position: absolute; inset-inline-start: -9px; top: -10px; width: 17px; height: calc(50% + 10px);
  border-inline-start: 1.5px solid rgba(124, 77, 255, .55); border-block-end: 1.5px solid rgba(124, 77, 255, .55);
  border-end-start-radius: 8px; pointer-events: none;
}
.mnav-sub .mnav-ico { background: rgba(124, 77, 255, .16); color: #A58BFF; }
.mnav-card.mnav-sub:hover .mnav-ico, .mnav-card.mnav-sub[aria-current="true"] .mnav-ico { background: #7C4DFF; color: #fff; }

.mnav-pv {
  position: relative; align-self: start; aspect-ratio: 3 / 2; overflow: hidden; margin-top: 2px;
  border: 1px solid var(--sl); border-radius: 12px; background: #081034;
}
.mnav-pv figure {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; transform: scale(1.04);
  transition: opacity .35s ease, transform .6s var(--mk-ease);
}
.mnav-pv figure.on { opacity: 1; transform: none; }
.mnav-pv img, .mnav-pv svg { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.mnav-pv svg text { fill: var(--tx); font: 600 12px var(--fb); text-anchor: middle; }
.mnav-pv .dsh { stroke-dasharray: 3 6; animation: mnavdash 1.2s linear infinite; }
@keyframes mnavdash { to { stroke-dashoffset: -18; } }

.mnav-foot {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 6px; padding: 10px 6px 2px; border-top: 1px solid var(--sl);
}
.mnav-app {
  display: inline-flex; align-items: center; gap: 12px;
  padding-block: 7px; padding-inline: 8px 14px; border: 1px solid var(--ln); border-radius: 12px;
  transition: border-color .15s ease, background-color .15s ease;
}
.mnav-app:hover { border-color: var(--pg); background: var(--s2); }
.mnav-app .mnav-ico { width: 32px; height: 32px; grid-row: auto; background: linear-gradient(135deg, var(--vi), var(--pr)); }
.mnav-app .mnav-ico .bm { width: 20px; height: 20px; filter: none; }
.mnav-app > span:not(.mnav-ico) { display: grid; line-height: 1.25; }
.mnav-app b { font: 700 14px var(--fb); }
.mnav-app small { color: var(--mu); font: 500 12px var(--fb); direction: ltr; text-align: start; }
.mnav-app > .ic { width: 16px; height: 16px; color: var(--mu); margin-inline-start: 4px; }
.mnav-tour {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 10px;
  color: var(--mu); font: 700 14px var(--fb);
  transition: color .15s ease, background-color .15s ease;
}
.mnav-tour:hover { color: var(--tx); background: var(--s2); }
.mnav-tour .ic { width: 16px; height: 16px; transition: transform .3s var(--mk-ease); }
.mnav-tour:hover .ic { transform: translateX(3px); }
[dir="rtl"] .mnav-tour .ic { transform: scaleX(-1); }
[dir="rtl"] .mnav-tour:hover .ic { transform: scaleX(-1) translateX(3px); }

/* ---------- Phone and tablet: the app's bottom sheet ---------- */
.mnav-scrim, .mnav-drawer, .mnav-grip { display: none; }
.mnav-lock { overflow: hidden; padding-inline-end: var(--sbw, 0px); }

@media (max-width: 1179.98px) {
  .mnav-links, .mnav-lang, .mnav-login, .mnav-panel { display: none; }
  .mnav-burger { display: grid; }
  .mnav-pill { gap: 10px; }
  .mnav-actions { margin-inline-start: auto; }
  .mnav .mnav-cta { min-height: 44px; }

  .mnav-scrim {
    display: block; position: fixed; inset: 0; z-index: 0;
    background: rgba(3, 8, 24, .6);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    opacity: 0; visibility: hidden;
    transition: opacity .25s ease, visibility 0s linear .25s;
  }
  .mnav[data-drawer="open"] .mnav-scrim { opacity: 1; visibility: visible; transition: opacity .25s ease, visibility 0s; }
  .mnav-bar { z-index: 1; }

  .mnav-drawer {
    display: block; position: fixed; z-index: 2;
    inset-inline: 0; bottom: 0;
    max-height: 88vh; max-height: 88dvh;
    overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: var(--ln) transparent;
    padding: 8px 12px calc(16px + env(safe-area-inset-bottom, 0px));
    border: 1px solid var(--ln); border-bottom: 0; border-radius: 22px 22px 0 0;
    background: var(--sf);
    box-shadow: 0 -20px 50px rgba(0, 0, 0, .55);
    transform: translateY(100%); visibility: hidden;
    transition: transform .34s var(--mk-ease), visibility 0s linear .34s;
  }
  .mnav[data-drawer="open"] .mnav-drawer { transform: none; visibility: visible; transition: transform .34s var(--mk-ease), visibility 0s; }
  .mnav[data-drawer="open"] .mnav-drawer > :not(.mnav-grip) { animation: mnavin .42s var(--mk-ease) both; animation-delay: calc(var(--i, 0) * 28ms + 80ms); }
  .mnav-grip { display: block; width: 40px; height: 5px; margin: 4px auto 6px; border-radius: 99px; background: var(--sl); }

  .mnav-dh {
    margin: 6px 10px 4px;
    font: 800 11px/1.2 var(--fb); letter-spacing: .14em; text-transform: uppercase; color: var(--cy);
  }
  [dir="rtl"] .mnav-dh { letter-spacing: 0; font-size: 12px; }
  .mnav-drawer hr { margin: 6px 4px; border: 0; border-top: 1px solid var(--sl); }
  .mnav-row { min-height: 52px; }
  .mnav-row:active { background: rgba(47, 107, 255, .2); }
  .mnav-row.simple { grid-template-columns: 34px minmax(0, 1fr); font: 600 15px var(--fb); color: var(--tx); }
  .mnav-row.simple .mnav-ico { grid-row: auto; }
  .mnav-row.simple > span:last-child { display: inline-flex; align-items: center; gap: 10px; }

  .mnav-dfoot { display: grid; gap: 10px; margin-top: 10px; padding: 12px 4px 0; border-top: 1px solid var(--sl); }
  .mnav-dfoot .btn { min-height: 48px; font-size: 15px; width: 100%; }
  .mnav-dfoot .btn .ic { width: 16px; height: 16px; }

  .mnav-seg {
    position: relative; display: grid; grid-template-columns: 1fr 1fr; direction: ltr;
    padding: 4px; border: 1px solid var(--sl); border-radius: 14px; background: rgba(5, 11, 36, .7);
  }
  .mnav-seg::before {
    content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
    border-radius: 10px; background: var(--pr); box-shadow: var(--glow);
    transition: transform .4s var(--mk-ease);
  }
  .mnav-seg[data-lang="ar"]::before { transform: translateX(100%); }
  .mnav-seg button {
    position: relative; min-height: 44px; border: 0; border-radius: 10px; background: none;
    color: var(--mu); font: 700 15px var(--fb); transition: color .2s ease;
  }
  .mnav-seg button[aria-pressed="true"] { color: #fff; }
}
@keyframes mnavin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Width-specific trims ---------- */
@media (min-width: 1180px) and (max-width: 1279.98px) {
  .mnav-li { display: none; }
  .mnav-link { padding: 0 11px; }
}
@media (max-width: 899.98px) {
  .mnav-brand-d { display: none; }
}
@media (max-width: 380px) {
  .mnav .mnav-cta { padding-inline: 11px; }
  .mnav-cta .ic { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mnav-scan { display: none; }
  .mnav-link:is([data-key="pricing"], [data-key="ads"])::before,
  .mnav-row.simple:is([href$="pricing/"], [href$="publisher/"])::before,
  .mnav-link:is([data-key="pricing"], [data-key="ads"]):is(:hover, :focus-visible)::before,
  .mnav-row.simple:is([href$="pricing/"], [href$="publisher/"]):is(:hover, :focus-visible)::before,
  :is(.mnav-link, .mnav-row) .beta, :is(.mnav-link, .mnav-row):hover .beta,
  .mnav-link:is([data-key="pricing"], [data-key="ads"]):hover .mnav-li { animation: none; }
}
