/* The menu: quiet, always visible, no lines. The current section is marked by the pen's red alone: its name turns
   red. The ¶ stays the logo's and the chosen language's; a third one in the same row repeats itself (Ron, 25.11.2026:
   "אולי הסימן רפטטיבי?").
   Wide screens: the three parts as a list at the side of the page, in reach at any point. Below 1100px: a strip at the bottom. */
html[data-menu="top"] .mt-nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 32px); }
html[data-menu="top"] .mt-link,
html[data-menu="top"] .mt-blink {
  display: inline-block; padding-block: 10px; line-height: 1.5; white-space: nowrap;
  font-size: clamp(1rem, 1.35vw, 1.125rem); color: var(--graphite); text-decoration: none;
  transition: color 160ms ease, transform 160ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
/* the current section (aria-current="location") and the current page: red, and it stays red under the pointer */
html[data-menu="top"] a[aria-current="location"], html[data-menu="top"] a[aria-current="page"],
html[data-menu="top"] a[aria-current]:hover, html[data-menu="top"] a[aria-current]:active { color: var(--red); }
html[data-menu="top"] .mt-link:active, html[data-menu="top"] .mt-blink:active { color: var(--ink); transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { html[data-menu="top"] .mt-link:hover { color: var(--ink); } }
/* desktop: the line types itself in once, red, then settles to ink */
html[data-menu="top"] .mt-typing .mt-ch { opacity: 0; }
html[data-menu="top"] .mt-typing .mt-ch.on { opacity: 1; color: var(--red); transition: color 260ms ease; }
html[data-menu="top"] .mt-typing.mt-settled .mt-ch.on { color: inherit; }
html[data-menu="top"] .mt-bar { display: none; }
/* this menu never sits in the header row (side list or bottom strip), so the header gives its room to the language letters */
html[data-menu="top"] .hdr-end { gap: 0; }
@media (min-width: 1100px) {
  html[data-menu="top"] .mt-nav {
    position: fixed; z-index: 25; top: 50%; inset-inline-end: clamp(24px, 3.2vw, 56px); transform: translateY(-50%);
    flex-direction: column; align-items: flex-end; gap: 4px;
  }
  html[data-menu="top"] .mt-link { padding-block: 10px; font-size: clamp(1.0625rem, 1.15vw, 1.1875rem); }
}

/* ---------- phones: a flat strip of paper at the bottom, within the thumb's reach ---------- */
@media (max-width: 1099px) {
  html[data-menu="top"] .mt-nav { display: none; }
  html[data-menu="top"] .mt-bar {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 2px;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    padding: 2px 8px env(safe-area-inset-bottom, 0px);
    /* set apart by tone alone, no line and no shadow */
    background: #EEEDE8;
    transition: opacity 140ms ease;
  }
  html[data-menu="top"] .mt-blink { font-size: 0.9375rem; padding: 0 clamp(7px, 2.6vw, 12px); line-height: 48px; min-width: 44px; text-align: center; }   /* never narrower than a fingertip, the short "AI" too */
  /* the strip sits over the page: the footer, the last lines and keyboard focus are never hidden under it */
  html[data-menu="top"] .site-footer { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  html[data-menu="top"] { scroll-padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  html.switching[data-menu="top"] .mt-bar { opacity: 0; }
}
@media (max-width: 360px) { html[data-menu="top"] .mt-blink { font-size: 0.875rem; } }

@media (prefers-reduced-motion: reduce) {
  html[data-menu="top"] .mt-link, html[data-menu="top"] .mt-blink { transition: none; }
  html[data-menu="top"] .mt-link:active, html[data-menu="top"] .mt-blink:active { transform: none; }
}
