فهرست منبع

fix(web): repair navbar links and add the mobile menu (#1830) (#1832)

The internal pages sent 'How it works' to / without the anchor, so the click dropped the reader at the top of the home page. The prerendered language routes also left /#how and /integrations pointing at the Spanish root.

All four pages now share the same menu, the fixed header no longer covers the target section (scroll-padding-top), and a burger button opens the links as a panel below 860px, where they were previously hidden with no alternative. The redundant GitHub text link is gone: the star button already points at the repository.
Nacho 1 ماه پیش
والد
کامیت
a62f3cc8aa
10فایلهای تغییر یافته به همراه140 افزوده شده و 33 حذف شده
  1. 38 4
      web/app.js
  2. 3 0
      web/build-langs.mjs
  3. 6 2
      web/features.html
  4. 7 2
      web/home-assistant.html
  5. 10 10
      web/i18n.js
  6. 6 1
      web/index.html
  7. 7 2
      web/integrations.html
  8. 27 0
      web/src/app.ts
  9. 10 10
      web/src/i18n.ts
  10. 26 2
      web/styles.css

+ 38 - 4
web/app.js

@@ -1419,19 +1419,20 @@ function initAppearance() {
         applyTheme(); });
 }
 /* ---------- copiar comando ---------- */
+// #1631 F-30: el comando es una constante del bundle, no texto leído del DOM.
+const INSTALL_CMD = 'curl -fsSL https://raw.githubusercontent.com/gnacho/netpulse/main/install.sh | sh';
+const AGENT_CMD = 'opkg install netpulse-agent';
 function initCopy() {
     const btn = document.getElementById('copyBtn');
     if (!btn)
         return;
     btn.addEventListener('click', async () => {
-        const cmd = document.getElementById('installCmd').textContent;
-        copyText(cmd, btn);
+        copyText(INSTALL_CMD, btn);
     });
     const agentBtn = document.getElementById('agentCopyBtn');
     if (agentBtn) {
         agentBtn.addEventListener('click', async () => {
-            const cmd = document.getElementById('agentCmd').textContent;
-            copyText(cmd, agentBtn);
+            copyText(AGENT_CMD, agentBtn);
         });
     }
 }
@@ -1616,8 +1617,41 @@ async function initGhMeta() {
     }
     catch { /* sin red */ }
 }
+/* ---------- menú de navegación en móvil ---------- */
+function initNav() {
+    const btn = document.getElementById('navBurger');
+    const links = document.getElementById('navLinks');
+    if (!btn || !links)
+        return;
+    const setOpen = (open) => {
+        links.classList.toggle('open', open);
+        btn.setAttribute('aria-expanded', open ? 'true' : 'false');
+    };
+    const isOpen = () => links.classList.contains('open');
+    btn.addEventListener('click', () => setOpen(!isOpen()));
+    links.addEventListener('click', (e) => {
+        if (e.target.closest('a'))
+            setOpen(false);
+    });
+    document.addEventListener('keydown', (e) => {
+        if (e.key === 'Escape' && isOpen()) {
+            setOpen(false);
+            btn.focus();
+        }
+    });
+    document.addEventListener('click', (e) => {
+        const t = e.target;
+        if (isOpen() && !links.contains(t) && !btn.contains(t))
+            setOpen(false);
+    });
+    window.matchMedia('(min-width: 861px)').addEventListener('change', (e) => {
+        if (e.matches)
+            setOpen(false);
+    });
+}
 document.addEventListener('DOMContentLoaded', () => {
     initAppearance();
+    initNav();
     initBackgroundCanvas();
     renderTicker();
     renderAlerts();

+ 3 - 0
web/build-langs.mjs

@@ -76,12 +76,15 @@ function fixHead(html, lang, slug, esSlug) {
 function fixLinks(html, lang) {
   return html
     .replace(/href="\/home-assistant/g, `href="/${lang}/home-assistant`)
+    .replace(/href="\/integrations/g, `href="/${lang}/integrations`)
     .replace(/href="\/features/g, `href="/${lang}/features`)
     .replace(/href="\/"\/?/g, `href="/${lang}/"`)
+    .replace(/href="\/#how/g, `href="/${lang}/#how`)
     .replace(/href="\/#faq/g, `href="/${lang}/#faq`)
     .replace(/href="\/#free/g, `href="/${lang}/#free`)
     .replace(/href="\/#install/g, `href="/${lang}/#install`)
     .replace(new RegExp(`href="/${lang}/features"`, 'g'), `href="/${lang}/features/"`)
+    .replace(new RegExp(`href="/${lang}/integrations"`, 'g'), `href="/${lang}/integrations/"`)
     .replace(new RegExp(`href="/${lang}/home-assistant"`, 'g'), `href="/${lang}/home-assistant/"`)
 }
 

+ 6 - 2
web/features.html

@@ -81,11 +81,11 @@
         </svg>
         NetPulse
       </a>
-      <div class="nav-links">
+      <div class="nav-links" id="navLinks">
         <a href="/features" data-i18n="featuresPage.navActive" class="active">Funciones</a>
         <a href="/home-assistant" data-i18n="haPage.navActive">Home Assistant</a>
         <a href="/integrations" data-i18n="integrationsPage.navActive">Integraciones</a>
-        <a href="/" data-i18n="nav.how">Cómo funciona</a>
+        <a href="/#how" data-i18n="nav.how">Cómo funciona</a>
         <a href="/#free" data-i18n="nav.free">Gratis</a>
         <a href="/#faq" data-i18n="nav.faq">FAQ</a>
       </div>
@@ -95,6 +95,10 @@
       </a>
       <select id="langSelect" aria-label="Language" style="margin-left:1rem;background:rgb(var(--surface));color:rgb(var(--text-secondary));border:1px solid rgb(var(--border));border-radius:var(--radius);padding:0.3rem 0.5rem;font-size:0.75rem;font-family:inherit;"></select>
       <a class="nav-cta" href="/#install" data-i18n="featuresPage.cta">Instalar en tu red</a>
+      <button class="nav-burger" id="navBurger" type="button" aria-expanded="false" aria-controls="navLinks" data-i18n-aria="nav.menu" aria-label="Navigation menu">
+        <svg class="icon-open" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M4 7h16M4 12h16M4 17h16"/></svg>
+        <svg class="icon-close" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg>
+      </button>
     </div>
   </nav>
 

+ 7 - 2
web/home-assistant.html

@@ -53,12 +53,13 @@
         </svg>
         NetPulse
       </a>
-      <div class="nav-links">
+      <div class="nav-links" id="navLinks">
         <a href="/features" data-i18n="featuresPage.navActive">Funciones</a>
         <a href="/home-assistant" class="active" data-i18n="haPage.navActive">Home Assistant</a>
         <a href="/integrations" data-i18n="integrationsPage.navActive">Integraciones</a>
-        <a href="/" data-i18n="nav.how">Cómo funciona</a>
+        <a href="/#how" data-i18n="nav.how">Cómo funciona</a>
         <a href="/#free" data-i18n="nav.free">Gratis</a>
+        <a href="/#faq" data-i18n="nav.faq">FAQ</a>
       </div>
       <a class="nav-star" id="navStar" href="https://github.com/gnacho/netpulse" target="_blank" rel="noopener" data-i18n-aria="nav.starAria" aria-label="Star NetPulse on GitHub">
         <svg viewBox="0 0 24 24" aria-hidden="true"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>
@@ -66,6 +67,10 @@
       </a>
       <select id="langSelect" aria-label="Language" style="margin-left:1rem;background:rgb(var(--surface));color:rgb(var(--text-secondary));border:1px solid rgb(var(--border));border-radius:var(--radius);padding:0.3rem 0.5rem;font-size:0.75rem;font-family:inherit;"></select>
       <a class="nav-cta" href="/#install" data-i18n="haPage.ctaInstall">Instalar en tu red</a>
+      <button class="nav-burger" id="navBurger" type="button" aria-expanded="false" aria-controls="navLinks" data-i18n-aria="nav.menu" aria-label="Navigation menu">
+        <svg class="icon-open" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M4 7h16M4 12h16M4 17h16"/></svg>
+        <svg class="icon-close" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg>
+      </button>
     </div>
   </nav>
 

+ 10 - 10
web/i18n.js

@@ -25,7 +25,7 @@ const DEMO = {
 const I18N = {
     /* ---------------- ENGLISH ---------------- */
     en: {
-        nav: { features: 'Features', club: 'The club', install: 'Install', github: 'GitHub', star: 'Star', starAria: 'Star NetPulse on GitHub' },
+        nav: { menu: 'Navigation menu', features: 'Features', club: 'The club', install: 'Install', github: 'GitHub', star: 'Star', starAria: 'Star NetPulse on GitHub' },
         haPage: {
             navActive: 'Home Assistant',
             metaTitle: 'NetPulse and Home Assistant',
@@ -207,7 +207,7 @@ const I18N = {
     },
     /* ---------------- ESPAÑOL ---------------- */
     es: {
-        nav: { features: 'Funciones', club: 'El club', install: 'Instalar', github: 'GitHub', star: 'Star', starAria: 'Dale una estrella a NetPulse en GitHub' },
+        nav: { menu: 'Menú de navegación', features: 'Funciones', club: 'El club', install: 'Instalar', github: 'GitHub', star: 'Star', starAria: 'Dale una estrella a NetPulse en GitHub' },
         haPage: {
             navActive: 'Home Assistant',
             metaTitle: 'NetPulse y Home Assistant',
@@ -377,7 +377,7 @@ const I18N = {
     },
     /* ---------------- 中文 (简体) ---------------- */
     zh: {
-        nav: { features: '功能', install: '安装', github: 'GitHub' },
+        nav: { menu: '导航菜单', features: '功能', install: '安装', github: 'GitHub' },
         hero: {
             eyebrow: 'OpenWrt 家庭网络的实时监控',
             t1: '你网络的脉搏。',
@@ -466,7 +466,7 @@ const I18N = {
     },
     /* ---------------- العربية ---------------- */
     ar: {
-        nav: { features: 'المزايا', install: 'التثبيت', github: 'GitHub' },
+        nav: { menu: 'قائمة التنقل', features: 'المزايا', install: 'التثبيت', github: 'GitHub' },
         hero: {
             eyebrow: 'مراقبة مباشرة لشبكة منزلك على OpenWrt',
             t1: 'نبض شبكتك.',
@@ -555,7 +555,7 @@ const I18N = {
     },
     /* ---------------- हिन्दी ---------------- */
     hi: {
-        nav: { features: 'फ़ीचर', install: 'इंस्टॉल', github: 'GitHub' },
+        nav: { menu: 'नेविगेशन मेन्यू', features: 'फ़ीचर', install: 'इंस्टॉल', github: 'GitHub' },
         hero: {
             eyebrow: 'आपके OpenWrt होम नेटवर्क के लिए लाइव मॉनिटरिंग',
             t1: 'आपके नेटवर्क की धड़कन।',
@@ -644,7 +644,7 @@ const I18N = {
     },
     /* ---------------- PORTUGUÊS ---------------- */
     pt: {
-        nav: { features: 'Recursos', install: 'Instalar', github: 'GitHub' },
+        nav: { menu: 'Menu de navegação', features: 'Recursos', install: 'Instalar', github: 'GitHub' },
         hero: {
             eyebrow: 'Monitorização em direto da tua rede doméstica OpenWrt',
             t1: 'O pulso da sua rede.',
@@ -733,7 +733,7 @@ const I18N = {
     },
     /* ---------------- FRANÇAIS ---------------- */
     fr: {
-        nav: { features: 'Fonctions', install: 'Installer', github: 'GitHub' },
+        nav: { menu: 'Menu de navigation', features: 'Fonctions', install: 'Installer', github: 'GitHub' },
         hero: {
             eyebrow: 'Supervision en direct de votre réseau domestique OpenWrt',
             t1: 'Le pouls de votre réseau.',
@@ -822,7 +822,7 @@ const I18N = {
     },
     /* ---------------- 日本語 ---------------- */
     ja: {
-        nav: { features: '機能', install: 'インストール', github: 'GitHub' },
+        nav: { menu: 'ナビゲーションメニュー', features: '機能', install: 'インストール', github: 'GitHub' },
         hero: {
             eyebrow: 'OpenWrtホームネットワークのライブ監視',
             t1: 'あなたのネットワークの鼓動。',
@@ -911,7 +911,7 @@ const I18N = {
     },
     /* ---------------- РУССКИЙ ---------------- */
     ru: {
-        nav: { features: 'Возможности', install: 'Установка', github: 'GitHub' },
+        nav: { menu: 'Меню навигации', features: 'Возможности', install: 'Установка', github: 'GitHub' },
         hero: {
             eyebrow: 'Мониторинг вашей домашней сети OpenWrt в реальном времени',
             t1: 'Пульс вашей сети.',
@@ -1000,7 +1000,7 @@ const I18N = {
     },
     /* ---------------- DEUTSCH ---------------- */
     de: {
-        nav: { features: 'Funktionen', install: 'Installieren', github: 'GitHub' },
+        nav: { menu: 'Navigationsmenü', features: 'Funktionen', install: 'Installieren', github: 'GitHub' },
         hero: {
             eyebrow: 'Live-Monitoring für dein OpenWrt-Heimnetz',
             t1: 'Der Puls deines Netzwerks.',

+ 6 - 1
web/index.html

@@ -108,8 +108,9 @@
         </svg>
         NetPulse
       </a>
-      <div class="nav-links">
+      <div class="nav-links" id="navLinks">
         <a href="/features" data-i18n="nav.features">Funciones</a>
+        <a href="/home-assistant" data-i18n="haPage.navActive">Home Assistant</a>
         <a href="/integrations" data-i18n="integrationsPage.navActive">Integraciones</a>
         <a href="#how" data-i18n="nav.how">Cómo funciona</a>
         <a href="#free" data-i18n="nav.free">Gratis</a>
@@ -121,6 +122,10 @@
       </a>
       <select id="langSelect" aria-label="Language" style="margin-left:1rem;background:rgb(var(--surface));color:rgb(var(--text-secondary));border:1px solid rgb(var(--border));border-radius:var(--radius);padding:0.3rem 0.5rem;font-size:0.75rem;font-family:inherit;"></select>
       <a class="nav-cta" href="#install" data-i18n="hero.cta1">Instalar en tu red</a>
+      <button class="nav-burger" id="navBurger" type="button" aria-expanded="false" aria-controls="navLinks" data-i18n-aria="nav.menu" aria-label="Navigation menu">
+        <svg class="icon-open" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M4 7h16M4 12h16M4 17h16"/></svg>
+        <svg class="icon-close" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg>
+      </button>
     </div>
   </nav>
 

+ 7 - 2
web/integrations.html

@@ -53,12 +53,13 @@
         </svg>
         NetPulse
       </a>
-      <div class="nav-links">
+      <div class="nav-links" id="navLinks">
         <a href="/features" data-i18n="featuresPage.navActive">Funciones</a>
         <a href="/home-assistant" data-i18n="haPage.navActive">Home Assistant</a>
         <a href="/integrations" class="active" data-i18n="integrationsPage.navActive">Integraciones</a>
-        <a href="/" data-i18n="nav.how">Cómo funciona</a>
+        <a href="/#how" data-i18n="nav.how">Cómo funciona</a>
         <a href="/#free" data-i18n="nav.free">Gratis</a>
+        <a href="/#faq" data-i18n="nav.faq">FAQ</a>
       </div>
       <a class="nav-star" id="navStar" href="https://github.com/gnacho/netpulse" target="_blank" rel="noopener" data-i18n-aria="nav.starAria" aria-label="Star NetPulse on GitHub">
         <svg viewBox="0 0 24 24" aria-hidden="true"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>
@@ -66,6 +67,10 @@
       </a>
       <select id="langSelect" aria-label="Language" style="margin-left:1rem;background:rgb(var(--surface));color:rgb(var(--text-secondary));border:1px solid rgb(var(--border));border-radius:var(--radius);padding:0.3rem 0.5rem;font-size:0.75rem;font-family:inherit;"></select>
       <a class="nav-cta" href="/#install" data-i18n="integrationsPage.ctaInstall">Instalar NetPulse</a>
+      <button class="nav-burger" id="navBurger" type="button" aria-expanded="false" aria-controls="navLinks" data-i18n-aria="nav.menu" aria-label="Navigation menu">
+        <svg class="icon-open" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M4 7h16M4 12h16M4 17h16"/></svg>
+        <svg class="icon-close" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg>
+      </button>
     </div>
   </nav>
 

+ 27 - 0
web/src/app.ts

@@ -1482,8 +1482,35 @@ async function initGhMeta() {
   } catch { /* sin red */ }
 }
 
+/* ---------- menú de navegación en móvil ---------- */
+function initNav() {
+  const btn = document.getElementById('navBurger') as HTMLButtonElement | null
+  const links = document.getElementById('navLinks')
+  if (!btn || !links) return
+  const setOpen = (open: boolean) => {
+    links.classList.toggle('open', open)
+    btn.setAttribute('aria-expanded', open ? 'true' : 'false')
+  }
+  const isOpen = () => links.classList.contains('open')
+  btn.addEventListener('click', () => setOpen(!isOpen()))
+  links.addEventListener('click', (e) => {
+    if ((e.target as HTMLElement).closest('a')) setOpen(false)
+  })
+  document.addEventListener('keydown', (e) => {
+    if (e.key === 'Escape' && isOpen()) { setOpen(false); btn.focus() }
+  })
+  document.addEventListener('click', (e) => {
+    const t = e.target as Node
+    if (isOpen() && !links.contains(t) && !btn.contains(t)) setOpen(false)
+  })
+  window.matchMedia('(min-width: 861px)').addEventListener('change', (e) => {
+    if (e.matches) setOpen(false)
+  })
+}
+
 document.addEventListener('DOMContentLoaded', () => {
   initAppearance()
+  initNav()
   initBackgroundCanvas()
   renderTicker()
   renderAlerts()

+ 10 - 10
web/src/i18n.ts

@@ -28,7 +28,7 @@ const DEMO = {
 const I18N = {
   /* ---------------- ENGLISH ---------------- */
   en: {
-    nav: { features: 'Features', club: 'The club', install: 'Install', github: 'GitHub', star: 'Star', starAria: 'Star NetPulse on GitHub' },
+    nav: { menu: 'Navigation menu', features: 'Features', club: 'The club', install: 'Install', github: 'GitHub', star: 'Star', starAria: 'Star NetPulse on GitHub' },
     haPage: {
       navActive: 'Home Assistant',
       metaTitle: 'NetPulse and Home Assistant',
@@ -211,7 +211,7 @@ const I18N = {
 
   /* ---------------- ESPAÑOL ---------------- */
   es: {
-    nav: { features: 'Funciones', club: 'El club', install: 'Instalar', github: 'GitHub', star: 'Star', starAria: 'Dale una estrella a NetPulse en GitHub' },
+    nav: { menu: 'Menú de navegación', features: 'Funciones', club: 'El club', install: 'Instalar', github: 'GitHub', star: 'Star', starAria: 'Dale una estrella a NetPulse en GitHub' },
     haPage: {
       navActive: 'Home Assistant',
       metaTitle: 'NetPulse y Home Assistant',
@@ -382,7 +382,7 @@ const I18N = {
 
   /* ---------------- 中文 (简体) ---------------- */
   zh: {
-    nav: { features: '功能', install: '安装', github: 'GitHub' },
+    nav: { menu: '导航菜单', features: '功能', install: '安装', github: 'GitHub' },
     hero: {
       eyebrow: 'OpenWrt 家庭网络的实时监控',
       t1: '你网络的脉搏。',
@@ -472,7 +472,7 @@ const I18N = {
 
   /* ---------------- العربية ---------------- */
   ar: {
-    nav: { features: 'المزايا', install: 'التثبيت', github: 'GitHub' },
+    nav: { menu: 'قائمة التنقل', features: 'المزايا', install: 'التثبيت', github: 'GitHub' },
     hero: {
       eyebrow: 'مراقبة مباشرة لشبكة منزلك على OpenWrt',
       t1: 'نبض شبكتك.',
@@ -562,7 +562,7 @@ const I18N = {
 
   /* ---------------- हिन्दी ---------------- */
   hi: {
-    nav: { features: 'फ़ीचर', install: 'इंस्टॉल', github: 'GitHub' },
+    nav: { menu: 'नेविगेशन मेन्यू', features: 'फ़ीचर', install: 'इंस्टॉल', github: 'GitHub' },
     hero: {
       eyebrow: 'आपके OpenWrt होम नेटवर्क के लिए लाइव मॉनिटरिंग',
       t1: 'आपके नेटवर्क की धड़कन।',
@@ -652,7 +652,7 @@ const I18N = {
 
   /* ---------------- PORTUGUÊS ---------------- */
   pt: {
-    nav: { features: 'Recursos', install: 'Instalar', github: 'GitHub' },
+    nav: { menu: 'Menu de navegação', features: 'Recursos', install: 'Instalar', github: 'GitHub' },
     hero: {
       eyebrow: 'Monitorização em direto da tua rede doméstica OpenWrt',
       t1: 'O pulso da sua rede.',
@@ -742,7 +742,7 @@ const I18N = {
 
   /* ---------------- FRANÇAIS ---------------- */
   fr: {
-    nav: { features: 'Fonctions', install: 'Installer', github: 'GitHub' },
+    nav: { menu: 'Menu de navigation', features: 'Fonctions', install: 'Installer', github: 'GitHub' },
     hero: {
       eyebrow: 'Supervision en direct de votre réseau domestique OpenWrt',
       t1: 'Le pouls de votre réseau.',
@@ -832,7 +832,7 @@ const I18N = {
 
   /* ---------------- 日本語 ---------------- */
   ja: {
-    nav: { features: '機能', install: 'インストール', github: 'GitHub' },
+    nav: { menu: 'ナビゲーションメニュー', features: '機能', install: 'インストール', github: 'GitHub' },
     hero: {
       eyebrow: 'OpenWrtホームネットワークのライブ監視',
       t1: 'あなたのネットワークの鼓動。',
@@ -922,7 +922,7 @@ const I18N = {
 
   /* ---------------- РУССКИЙ ---------------- */
   ru: {
-    nav: { features: 'Возможности', install: 'Установка', github: 'GitHub' },
+    nav: { menu: 'Меню навигации', features: 'Возможности', install: 'Установка', github: 'GitHub' },
     hero: {
       eyebrow: 'Мониторинг вашей домашней сети OpenWrt в реальном времени',
       t1: 'Пульс вашей сети.',
@@ -1012,7 +1012,7 @@ const I18N = {
 
   /* ---------------- DEUTSCH ---------------- */
   de: {
-    nav: { features: 'Funktionen', install: 'Installieren', github: 'GitHub' },
+    nav: { menu: 'Navigationsmenü', features: 'Funktionen', install: 'Installieren', github: 'GitHub' },
     hero: {
       eyebrow: 'Live-Monitoring für dein OpenWrt-Heimnetz',
       t1: 'Der Puls deines Netzwerks.',

+ 26 - 2
web/styles.css

@@ -45,7 +45,7 @@ html.light {
 
 /* ---------- base ---------- */
 * { box-sizing: border-box; border-color: rgb(var(--border)); }
-html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
+html { scroll-behavior: smooth; scroll-padding-top: 4.25rem; -webkit-tap-highlight-color: transparent; }
 body {
   margin: 0;
   background: rgb(var(--canvas));
@@ -144,7 +144,31 @@ a:hover { text-decoration: underline; }
   font-size: 0.8125rem; font-family: inherit; cursor: pointer;
 }
 html[dir="rtl"] #langSelect { margin-left: 0; margin-right: 0.5rem; }
-@media (max-width: 860px) { .nav-links { display: none; } }
+.nav-burger {
+  display: none; align-items: center; justify-content: center; flex: 0 0 auto;
+  width: 2.25rem; height: 2.25rem; padding: 0; margin-left: 0.4rem;
+  background: rgb(var(--surface)); color: rgb(var(--text-secondary));
+  border: 1px solid rgb(var(--border)); border-radius: var(--radius); cursor: pointer;
+}
+.nav-burger:hover { color: rgb(var(--text-primary)); border-color: rgb(var(--border-strong)); }
+.nav-burger svg { width: 1.15rem; height: 1.15rem; }
+.nav-burger .icon-close { display: none; }
+.nav-burger[aria-expanded="true"] .icon-open { display: none; }
+.nav-burger[aria-expanded="true"] .icon-close { display: block; }
+@media (max-width: 860px) {
+  .nav-links { display: none; }
+  .nav-burger { display: inline-flex; }
+  .nav-links.open {
+    display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem;
+    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
+    padding: 0.4rem 1.25rem 0.9rem;
+    background: rgb(var(--canvas) / 0.97); backdrop-filter: blur(12px);
+    border-bottom: 1px solid rgb(var(--border) / 0.6);
+    box-shadow: 0 20px 30px -26px rgb(0 0 0 / 0.7);
+  }
+  .nav-links.open a { width: 100%; padding: 0.65rem 0; font-size: 0.95rem; }
+  html[dir="rtl"] .nav-links.open { align-items: flex-end; }
+}
 @media (max-width: 600px) {
   .nav-inner { gap: 0.6rem; }
   .nav-star { display: none; }