/* =========================================================
   DARK CODE — components.css
   Header, Footer, Mobile menu — glass / floating / fixed
   Uses design tokens from assets/css/style.css (:root)
   ========================================================= */

/* clearance for fixed floating header/bottom-nav */
main{padding-top:104px;}

/* =========================================================
   HEADER (desktop) — floating glass pill, fixed
   ========================================================= */
.site-header{
  position:fixed; top:0; left:0; right:0; z-index:1000;
  display:flex; justify-content:center;
  padding:18px 24px 0;
  pointer-events:none;
}
.header-inner{
  pointer-events:auto;
  width:100%; max-width:var(--container);
  display:flex; align-items:center; justify-content:space-between; gap:20px;
  padding:10px 12px 10px 22px;
  border-radius:var(--r-pill);
  box-shadow:var(--shadow-1);
  transition:padding .35s ease, background .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.site-header.is-scrolled .header-inner{
  padding:8px 10px 8px 20px;
  background:linear-gradient(180deg, var(--surface-strong-a), var(--surface-strong-b));
  box-shadow:var(--scrolled-shadow);
  border-color:var(--border-strong);
}

/* brand */
.brand{display:flex; align-items:center; gap:10px; flex-shrink:0;}
.brand-mark{
  width:36px; height:36px; border-radius:11px;
  display:flex; align-items:center; justify-content:center;
  background:var(--signal-dim); color:var(--signal);
  box-shadow:0 0 0 1px rgba(57,255,138,.18) inset, 0 4px 14px -4px var(--signal-glow);
  flex-shrink:0;
}
.brand-mark svg{width:18px; height:18px;}
.brand-mark img{width:24px; height:24px; object-fit:contain; border-radius:6px;}
.brand-name{
  font-family:var(--f-display); font-weight:700; font-size:18px;
  letter-spacing:-.01em; color:var(--text-1); white-space:nowrap;
}
.brand-accent{color:var(--signal);}
.brand-sm .brand-mark{width:32px; height:32px; border-radius:10px;}
.brand-sm .brand-mark svg{width:16px; height:16px;}
.brand-sm .brand-mark img{width:20px; height:20px;}
.brand-sm .brand-name{font-size:16px;}

/* main nav */
.main-nav{display:flex; align-items:center; gap:2px; flex:1; justify-content:center;}
.nav-link{
  font-family:var(--f-body); font-size:14px; font-weight:500;
  color:var(--text-2); padding:10px 16px; border-radius:var(--r-pill);
  display:inline-flex; align-items:center; gap:6px;
  transition:color .2s ease, background .2s ease;
  white-space:nowrap;
}
.nav-link:hover{color:var(--text-1); background:var(--glass-hover);}
.nav-link.active{color:var(--signal); background:var(--signal-dim);}
.dropdown-toggle{font-family:inherit;}
.dropdown-toggle.active{color:var(--signal); background:var(--signal-dim);}
.chevron{width:13px; height:13px; transition:transform .25s ease;}

.nav-item{position:relative;}
.nav-item.has-dropdown.open .chevron,
.nav-item.has-dropdown:hover .chevron{transform:rotate(180deg);}
.nav-item.has-dropdown.open > .nav-link,
.nav-item.has-dropdown:hover > .nav-link{color:var(--text-1); background:var(--glass-hover);}

.dropdown-panel{
  position:absolute; top:calc(100% + 14px); left:50%;
  transform:translateX(-50%) translateY(6px);
  min-width:460px;
  background:linear-gradient(180deg, rgba(20,24,30,.92), rgba(12,16,21,.94));
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  padding:18px;
  box-shadow:var(--shadow-1);
  backdrop-filter:blur(26px); -webkit-backdrop-filter:blur(26px);
  display:grid; grid-template-columns:repeat(2,1fr); gap:4px;
  opacity:0; visibility:hidden; pointer-events:none;
  transition:opacity .22s ease, transform .22s ease, visibility .22s;
  z-index:1001;
}
.nav-item.has-dropdown:hover .dropdown-panel,
.nav-item.has-dropdown.open .dropdown-panel{
  opacity:1; visibility:visible; pointer-events:auto;
  transform:translateX(-50%) translateY(0);
}
.dropdown-link{
  display:flex; align-items:center; gap:11px;
  padding:10px 12px; border-radius:var(--r-sm);
  transition:background .2s ease;
}
.dropdown-link:hover{background:var(--glass-hover);}
.dropdown-link.active{background:var(--signal-dim); box-shadow:0 0 0 1px rgba(57,255,138,.18) inset;}
.dropdown-link.active .dropdown-text h5{color:var(--signal);}
.dropdown-viewall.active{color:var(--signal); text-decoration:underline; text-underline-offset:3px;}
.dropdown-icon{
  width:32px; height:32px; border-radius:9px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  background:var(--ink-800); border:1px solid var(--border);
}
.dropdown-icon svg{width:16px; height:16px; color:var(--signal);}
.dropdown-icon img{width:60%; height:60%; object-fit:contain;}
.dropdown-text h5{font-size:13px; font-weight:600; color:var(--text-1); line-height:1.3;}
.dropdown-text p{font-size:11px; color:var(--text-3); margin-top:2px; line-height:1.3;}
.dropdown-viewall{
  grid-column:1 / -1; margin-top:8px; padding-top:14px;
  border-top:1px solid var(--border-soft);
  display:flex; align-items:center; justify-content:center; gap:8px;
  font-family:var(--f-mono); font-size:12.5px; color:var(--signal);
  transition:gap .2s ease;
}
.dropdown-viewall:hover{gap:12px;}
.dropdown-viewall svg{width:14px; height:14px;}

/* header actions: search + login */
.header-actions{display:flex; align-items:center; gap:12px; flex-shrink:0;}
.header-search{
  display:flex; align-items:center; gap:8px;
  background:var(--glass); border:1px solid var(--border);
  border-radius:var(--r-pill); padding:9px 8px 9px 14px;
  transition:border-color .25s ease, background .25s ease;
}
.header-search:focus-within{border-color:rgba(57,255,138,.35); background:var(--glass-hover);}
.search-icon-btn{display:flex; color:var(--text-3);}
.search-icon-btn svg{width:16px; height:16px;}
.header-search:focus-within .search-icon-btn{color:var(--signal);}
.search-input{
  background:none; border:none; outline:none; color:var(--text-1);
  font-family:var(--f-body); font-size:13.5px; width:140px;
  transition:width .3s ease;
}
.header-search:focus-within .search-input{width:200px;}
.search-input::placeholder{color:var(--text-3);}
.btn-login{padding:10px 22px; font-size:13.5px;}

/* =========================================================
   LIVE SEARCH DROPDOWN — desktop header + mobile topbar
   Shares the glass-card language used by .dropdown-panel above.
   ========================================================= */
.header-search{position:relative;}
.header-search-results{
  position:absolute; top:calc(100% + 10px); left:0;
  width:340px; max-width:min(90vw, 380px);
  /* explicit semi-transparent gradient (matches .dropdown-panel above) —
     var(--glass-bg-strong) on this site resolves close to opaque, which
     hides the blur entirely, so the panel just looks like a flat solid
     block instead of frosted glass. */
  background:linear-gradient(180deg, rgba(20,24,30,.78), rgba(12,16,21,.82));
  backdrop-filter:blur(22px) saturate(140%);
  -webkit-backdrop-filter:blur(22px) saturate(140%);
  border:1px solid var(--border); border-radius:var(--r-md, 14px);
  box-shadow:0 20px 50px rgba(5,7,13,.5), inset 0 1px 0 rgba(255,255,255,.05);
  padding:8px; max-height:min(420px, 70vh); overflow-y:auto;
  opacity:0; visibility:hidden; transform:translateY(-6px);
  transition:opacity .16s ease, transform .16s ease, visibility .16s ease;
  z-index:1200;
}
.header-search-results.is-open{opacity:1; visibility:visible; transform:translateY(0);}
.hsr-item{
  display:flex; flex-direction:column; gap:2px;
  padding:9px 12px; border-radius:10px; cursor:pointer;
  text-decoration:none; transition:background .15s ease;
}
.hsr-item:hover, .hsr-item.is-active{background:var(--glass-hover);}
.hsr-item .hsr-title{font-size:13.5px; font-weight:600; color:var(--text-1); line-height:1.3;}
.hsr-item .hsr-tag{
  font-family:var(--f-mono); font-size:10.5px; color:var(--signal);
  text-transform:uppercase; letter-spacing:.05em;
}
.hsr-empty{padding:18px 12px; text-align:center; font-size:12.5px; color:var(--text-3);}
.hsr-viewall{
  display:flex; align-items:center; justify-content:center; gap:6px;
  margin-top:6px; padding:10px 12px 4px; border-top:1px solid var(--border-soft);
  font-family:var(--f-mono); font-size:12px; color:var(--signal);
  text-decoration:none; transition:gap .2s ease;
}
.hsr-viewall:hover{gap:10px;}
.hsr-viewall svg{width:13px; height:13px;}

/* Mobile: dropdown hangs below the floating pill topbar, and must live
   outside .mobile-topbar-inner (which has overflow:hidden for the pill
   shape), so it's positioned relative to .mobile-topbar instead. */
.mobile-search-results{
  left:14px; right:14px; width:auto; max-width:none;
  top:calc(100% + 8px);
}
.mobile-topbar-inner.search-active ~ .mobile-search-results.is-open{
  opacity:1; visibility:visible; transform:translateY(0);
}

/* =========================================================
   FOOTER
   ========================================================= */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
.site-footer{
  margin-top:90px; padding-top:64px;
  border-top:1px solid var(--border-soft);
  background:
    radial-gradient(700px 320px at 12% 0%, rgba(57,255,138,.05), transparent 60%),
    linear-gradient(180deg, transparent, var(--footer-tint));
  position:relative;
  overflow:hidden;
}
.site-footer::before{
  content:''; position:absolute; top:-1px; left:50%; translate:-50% 0;
  width:min(560px, 70%); height:1px;
  background:linear-gradient(90deg, transparent, var(--signal-glow), transparent);
  opacity:.55; pointer-events:none;
}
.footer-grid{
  display:grid; grid-template-columns:1.3fr .8fr .8fr .9fr 1.1fr; gap:32px;
  padding-bottom:48px;
}
.footer-brand p{color:var(--text-2); font-size:13.5px; margin:16px 0 20px; max-width:320px; line-height:1.65;}
.footer-social{display:flex; flex-wrap:wrap; gap:10px;}
.footer-social a{
  width:36px; height:36px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--glass); border:1px solid var(--border); color:var(--text-2);
  transition:color .25s ease, border-color .25s ease, background .25s ease, transform .25s ease;
}
.footer-social a svg{width:16px; height:16px;}
.footer-social a:hover{color:var(--signal); border-color:rgba(57,255,138,.3); background:var(--signal-dim); transform:translateY(-3px);}
.footer-col h4{font-family:var(--f-display); font-size:14px; font-weight:600; color:var(--text-1); margin-bottom:16px;}
.footer-col a{display:block; color:var(--text-2); font-size:13.5px; padding:7px 0; transition:color .2s ease, transform .2s ease;}
.footer-col a:hover{color:var(--signal); transform:translateX(3px);}
.newsletter p{color:var(--text-2); font-size:12.5px; line-height:1.6; margin:0 0 16px; max-width:240px;}
.newsletter-form{display:flex; gap:8px;}
.newsletter-form input{
  flex:1; min-width:0; background:var(--glass); border:1px solid var(--border);
  border-radius:var(--r-pill); padding:11px 16px; color:var(--text-1);
  font-family:var(--f-body); font-size:13px; outline:none;
  transition:border-color .25s ease, background .25s ease;
}
.newsletter-form input:focus{border-color:rgba(57,255,138,.35); background:var(--glass-hover);}
.newsletter-form input::placeholder{color:var(--text-3);}
.newsletter-form button{
  width:42px; height:42px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; padding:0;
  transition:transform .2s ease, box-shadow .2s ease;
}
.newsletter-form button svg{width:16px; height:16px;}
.newsletter-form button:hover{transform:translateX(1px) scale(1.05);}
.newsletter-form button:active{transform:scale(.94);}
.footer-bottom{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px;
  padding:22px 0 40px; border-top:1px solid var(--border-soft);
  font-size:12.5px; color:var(--text-3); font-family:var(--f-mono);
}
.footer-bottom-links{display:flex; flex-wrap:wrap; gap:8px 20px;}
.footer-bottom-links a{color:var(--text-3); transition:color .2s ease; padding:4px 0;}
.footer-bottom-links a:hover{color:var(--signal);}

/* =========================================================
   MOBILE — topbar w/ search-takeover, tabbed bottom-sheet menu,
   "bump" style floating bottom nav.
   Hidden by default (desktop); shown under the breakpoint
   ========================================================= */
.mobile-topbar,.mobile-bottom-nav{display:none;}

.mobile-topbar{
  position:fixed; top:0; left:0; right:0; z-index:1100;
  padding:14px 14px 0;
}
.mobile-topbar-inner{
  position:relative; overflow:hidden;
  padding:8px 8px 8px 14px; border-radius:var(--r-pill);
  box-shadow:var(--shadow-1);
  min-height:52px;
}
.topbar-row{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  transition:opacity .22s ease, transform .22s ease;
}
.topbar-row-search{
  position:absolute; inset:0; padding:8px 8px 8px 16px;
  opacity:0; pointer-events:none; transform:translateY(6px);
}
.mobile-topbar-inner.search-active .topbar-row-default{opacity:0; pointer-events:none; transform:translateY(-6px);}
.mobile-topbar-inner.search-active .topbar-row-search{opacity:1; pointer-events:auto; transform:translateY(0);}
.topbar-row-search svg:first-child{width:16px; height:16px; color:var(--text-3); flex-shrink:0;}
.topbar-row-search input{
  flex:1; min-width:0; background:none; border:none; outline:none;
  color:var(--text-1); font-family:var(--f-body); font-size:14.5px;
}
.topbar-row-search input::placeholder{color:var(--text-3);}

.mobile-topbar-actions{display:flex; align-items:center; gap:8px;}
.icon-btn{
  width:40px; height:40px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  background:var(--glass); border:1px solid var(--border); color:var(--text-1);
  transition:background .2s ease, color .2s ease, border-color .2s ease;
}
.icon-btn svg{width:17px; height:17px;}
.icon-btn:hover{color:var(--signal); border-color:rgba(57,255,138,.3);}

/* theme toggle: swap moon/sun icons based on html[data-theme] */
.theme-toggle-btn{position:relative;}
.theme-toggle-btn svg{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%) scale(1) rotate(0deg);
  transition:opacity .3s ease, transform .4s cubic-bezier(.2,.8,.2,1);
}
.theme-toggle-btn .theme-icon-sun{opacity:0; transform:translate(-50%,-50%) scale(.4) rotate(-90deg);}
.theme-toggle-btn .theme-icon-moon{opacity:1;}
html[data-theme="light"] .theme-toggle-btn .theme-icon-moon{opacity:0; transform:translate(-50%,-50%) scale(.4) rotate(90deg);}
html[data-theme="light"] .theme-toggle-btn .theme-icon-sun{opacity:1; transform:translate(-50%,-50%) scale(1) rotate(0deg);}

/* custom asymmetric hamburger -> X, signal-accent middle bar */
.ham-bars{width:18px; height:13px; position:relative; display:block; flex-shrink:0;}
.ham-bars span{
  position:absolute; left:0; height:2px; border-radius:2px;
  background:currentColor; transition:all .3s cubic-bezier(.4,0,.2,1);
}
.ham-bars span:nth-child(1){top:0; width:100%;}
.ham-bars span:nth-child(2){top:5.5px; width:68%; background:var(--signal);}
.ham-bars span:nth-child(3){top:11px; width:85%;}
.hamburger-btn[aria-expanded="true"] .ham-bars span:nth-child(1){top:5.5px; width:100%; background:currentColor; transform:rotate(45deg);}
.hamburger-btn[aria-expanded="true"] .ham-bars span:nth-child(2){opacity:0; width:0;}
.hamburger-btn[aria-expanded="true"] .ham-bars span:nth-child(3){top:5.5px; width:100%; background:currentColor; transform:rotate(-45deg);}
.hamburger-btn[aria-expanded="true"]{color:var(--signal); border-color:rgba(57,255,138,.3);}

/* bottom-sheet menu (slides up, rounded top corners, tabbed) */
.mobile-menu-overlay{
  position:fixed; inset:0; z-index:1200;
  display:flex; align-items:flex-end; justify-content:center;
  background:rgba(5,7,8,.62);
  backdrop-filter:blur(5px); -webkit-backdrop-filter:blur(5px);
  opacity:0; visibility:hidden; transition:opacity .3s ease, visibility .3s;
}
.mobile-menu-overlay.open{opacity:1; visibility:visible;}
.mobile-menu-sheet{
  width:100%; max-width:600px; max-height:82vh; overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  padding:14px 20px calc(env(safe-area-inset-bottom, 0px) + 28px);
  border-radius:26px 26px 0 0;
  background:linear-gradient(180deg, rgba(18,22,28,.98), rgba(9,12,16,.99));
  border:1px solid var(--border); border-bottom:none;
  box-shadow:0 -20px 50px rgba(0,0,0,.5);
  transform:translateY(100%);
  transition:transform .38s cubic-bezier(.2,.8,.2,1);
}
.mobile-menu-overlay.open .mobile-menu-sheet{transform:translateY(0);}
.sheet-handle{width:38px; height:4px; border-radius:4px; background:var(--border); margin:0 auto 16px;}
.sheet-header{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:16px;
}
.sheet-header .brand-name{font-family:var(--f-display); font-weight:700; font-size:17px;}

.sheet-tabs{
  display:flex; gap:4px; background:var(--glass); border:1px solid var(--border);
  border-radius:var(--r-pill); padding:4px; margin-bottom:18px;
}
.sheet-tab{
  flex:1; padding:9px 0; text-align:center; border-radius:var(--r-pill);
  font-family:var(--f-body); font-size:13px; font-weight:600; color:var(--text-2);
  transition:background .25s ease, color .25s ease, box-shadow .25s ease;
}
.sheet-tab.active{
  background:linear-gradient(180deg, var(--signal-2), #17b263); color:#03150a;
  box-shadow:0 1px 0 rgba(255,255,255,.35) inset, 0 6px 16px -6px var(--signal-glow);
}

.sheet-body{position:relative;}
.sheet-pane{display:none;}
.sheet-pane.active{display:block; animation:sheetFadeIn .28s ease;}
@keyframes sheetFadeIn{from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:translateY(0);}}

.sheet-link{
  display:flex; align-items:center; gap:12px; padding:15px 4px;
  border-bottom:1px solid var(--border-soft);
}
.sheet-link-icon{
  width:34px; height:34px; border-radius:10px; flex-shrink:0;
  background:var(--ink-800); border:1px solid var(--border); color:var(--signal);
  display:flex; align-items:center; justify-content:center;
}
.sheet-link-icon svg{width:16px; height:16px;}
.sheet-link-text{flex:1; font-size:14.5px; font-weight:500; color:var(--text-1);}
.sheet-link-arrow{width:14px; height:14px; color:var(--text-3); flex-shrink:0;}
.sheet-login-btn{margin-top:18px;}
.sheet-link.active .sheet-link-icon{background:var(--signal-dim); color:var(--signal); border-color:rgba(57,255,138,.3);}
.sheet-link.active .sheet-link-text{color:var(--signal);}

.sheet-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:10px;}
.sheet-card{
  display:flex; flex-direction:column; align-items:center; text-align:center; gap:9px;
  padding:16px 10px; border-radius:var(--r-md);
  background:var(--glass); border:1px solid var(--border);
  transition:background .2s ease, border-color .2s ease;
}
.sheet-card:active{background:var(--glass-hover); border-color:rgba(57,255,138,.3);}
.sheet-card.active{background:var(--signal-dim); border-color:rgba(57,255,138,.35);}
.sheet-card.active .sheet-card-title{color:var(--signal);}
.sheet-card-icon{
  width:38px; height:38px; border-radius:11px; flex-shrink:0;
  background:var(--ink-800); border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
}
.sheet-card-icon svg{width:18px; height:18px; color:var(--signal);}
.sheet-card-icon img{width:58%; height:58%; object-fit:contain;}
.sheet-card-title{font-size:12px; font-weight:600; color:var(--text-1); line-height:1.3;}

/* "bump" bottom nav — active icon lifts into a filled glowing badge */
.mobile-bottom-nav{
  position:fixed; bottom:16px; left:50%; transform:translateX(-50%);
  z-index:1100; width:calc(100% - 28px); max-width:420px;
  align-items:flex-end; justify-content:space-around;
  padding:10px 6px 8px; border-radius:var(--r-pill); height:60px;
  background:linear-gradient(180deg, var(--surface-soft-a), var(--surface-soft-b));
  border:1px solid var(--border);
  backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
  box-shadow:var(--shadow-1);
}
.bottom-nav-item{
  display:flex; flex-direction:column; align-items:center; justify-content:flex-end;
  gap:2px; flex:1; color:var(--text-3);
}
.bni-icon{
  width:24px; height:24px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  transition:width .3s cubic-bezier(.2,.8,.2,1), height .3s cubic-bezier(.2,.8,.2,1),
             transform .3s cubic-bezier(.2,.8,.2,1), background .3s ease, box-shadow .3s ease, color .3s ease;
}
.bni-icon svg{width:19px; height:19px;}
.bni-label{
  font-family:var(--f-mono); font-size:9.5px; margin-top:1px;
  transition:opacity .2s ease, height .2s ease;
}
.bottom-nav-item:hover{color:var(--text-1);}
.bottom-nav-item.active{color:var(--signal);}
.bottom-nav-item.active .bni-icon{
  width:46px; height:46px;
  transform:translateY(-14px);
  background:linear-gradient(180deg, var(--signal-2), #17b263); color:#03150a;
  box-shadow:0 1px 0 rgba(255,255,255,.35) inset, 0 10px 24px -6px var(--signal-glow);
}
.bottom-nav-item.active .bni-icon svg{width:21px; height:21px;}
.bottom-nav-item.active .bni-label{opacity:0; height:0; margin:0;}

/* Quiz — permanent featured badge, always lifted & glowing regardless
   of which page is active. Distinct violet gradient so it reads as
   "try me" rather than "you are here". */
.bottom-nav-item.is-featured{color:#c4b5fd;}
.bottom-nav-item.is-featured .bni-icon{
  width:50px; height:50px;
  transform:translateY(-16px);
  background:linear-gradient(160deg, #b39dff 0%, #7c5cff 55%, #5636d6 100%);
  color:#fff;
  box-shadow:0 1px 0 rgba(255,255,255,.4) inset,
             0 10px 26px -6px rgba(124,92,255,.6),
             0 0 0 5px rgba(124,92,255,.12);
  animation:bniFeaturedPulse 2.8s ease-in-out infinite;
}
.bottom-nav-item.is-featured .bni-icon svg{width:23px; height:23px;}
.bottom-nav-item.is-featured .bni-label{opacity:0; height:0; margin:0;}
@keyframes bniFeaturedPulse{
  0%,100%{
    box-shadow:0 1px 0 rgba(255,255,255,.4) inset,
               0 10px 26px -6px rgba(124,92,255,.6),
               0 0 0 5px rgba(124,92,255,.12);
  }
  50%{
    box-shadow:0 1px 0 rgba(255,255,255,.4) inset,
               0 14px 32px -4px rgba(124,92,255,.8),
               0 0 0 8px rgba(124,92,255,.05);
  }
}
@media (prefers-reduced-motion: reduce){
  .bottom-nav-item.is-featured .bni-icon{animation:none;}
}

/* =========================================================
   HEADER — progressive shrink so nothing overflows the pill
   before the 880px mobile switch kicks in. Fixes login/profile
   box being pushed outside the header on laptop/tablet widths.
   ========================================================= */
@media (max-width:1180px){
  .header-inner{gap:10px; padding-left:16px;}
  .main-nav{gap:0;}
  .nav-link{padding:10px 10px; font-size:13.5px;}
  .header-search{padding:9px 6px 9px 12px;}
  .search-input{width:90px;}
  .header-search:focus-within .search-input{width:140px;}
  .header-actions{gap:8px;}
  .dropdown-panel{min-width:400px;}
}
@media (max-width:1000px){
  .header-search{display:none;}
  .nav-link{padding:9px 8px; font-size:13px;}
  .main-nav{gap:0;}
  .brand-name{display:none;}
}

/* =========================================================
   BREAKPOINT — switch desktop header for mobile bar/nav
   ========================================================= */
@media (max-width:880px){
  .site-header{display:none;}
  .mobile-topbar{display:block;}
  .mobile-bottom-nav{display:flex;}
  main{padding-top:82px; padding-bottom:104px;}
  .footer-bottom{padding-bottom:110px;}
  .footer-grid{grid-template-columns:repeat(2,1fr); gap:36px 24px;}
  .footer-brand{grid-column:1 / -1;}
  .footer-brand p{max-width:420px;}
  .newsletter p{max-width:none;}
}

/* narrower tablets / large phones — collapse to a single, readable column */
@media (max-width:620px){
  .site-footer{margin-top:70px; padding-top:52px;}
  .footer-grid{grid-template-columns:1fr; gap:34px;}
  .footer-brand,.newsletter{grid-column:auto;}
  .footer-brand p,.newsletter p{max-width:420px;}
  .footer-col h4{margin-bottom:12px;}
}

/* small phones */
@media (max-width:420px){
  .site-footer{padding-top:44px;}
  .footer-grid{gap:30px; padding-bottom:36px;}
  .footer-brand p{font-size:13px;}
  .footer-social{gap:8px;}
  .footer-social a{width:34px; height:34px;}
  .newsletter-form input{padding:10px 14px; font-size:12.5px;}
  .newsletter-form button{width:40px; height:40px;}
  .footer-bottom{
    justify-content:center; text-align:center;
    padding-top:20px; flex-direction:column; gap:10px;
  }
  .footer-bottom-links{justify-content:center;}
}

/* =========================================================
   INSTALL APP BUTTON (header + mobile topbar)
   ========================================================= */
.install-btn{color:var(--signal);}
.install-btn:hover{border-color:rgba(57,255,138,.35); background:var(--signal-dim);}
.install-btn.is-installed{opacity:.45; pointer-events:none;}

/* =========================================================
   HEADER AUTH — Login button / Profile dropdown (desktop)
   ========================================================= */
.header-auth{display:flex; align-items:center; flex-shrink:0;}
.profile-menu{position:relative;}
.profile-btn{
  display:flex; align-items:center; gap:8px;
  padding:6px 12px 6px 6px; border-radius:var(--r-pill);
  background:var(--glass); border:1px solid var(--border);
  transition:background .2s ease, border-color .2s ease;
}
.profile-btn:hover{background:var(--glass-hover);}
.profile-btn .chevron{width:12px; height:12px; color:var(--text-3);}
.profile-btn[aria-expanded="true"] .chevron{transform:rotate(180deg);}
.profile-avatar{
  width:28px; height:28px; border-radius:50%; object-fit:cover;
  border:1px solid var(--border);
}
.profile-name{
  font-family:var(--f-body); font-size:13.5px; font-weight:500; color:var(--text-1);
  max-width:110px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.profile-dropdown{
  position:absolute; top:calc(100% + 10px); right:0; min-width:200px;
  background:linear-gradient(180deg, rgba(20,24,30,.94), rgba(12,16,21,.96));
  border:1px solid var(--border); border-radius:var(--r-lg);
  padding:8px; box-shadow:var(--shadow-1);
  backdrop-filter:blur(26px); -webkit-backdrop-filter:blur(26px);
  opacity:0; visibility:hidden; transform:translateY(6px);
  transition:opacity .22s ease, transform .22s ease, visibility .22s;
  z-index:1001;
}
.header-auth.open .profile-dropdown{opacity:1; visibility:visible; transform:translateY(0);}
.profile-dropdown-link{
  display:flex; align-items:center; gap:10px; width:100%;
  padding:10px 12px; border-radius:var(--r-sm);
  font-family:var(--f-body); font-size:13.5px; color:var(--text-2);
  text-align:left; transition:background .2s ease, color .2s ease;
}
.profile-dropdown-link svg{width:16px; height:16px; flex-shrink:0;}
.profile-dropdown-link:hover{background:var(--glass-hover); color:var(--text-1);}
.profile-logout:hover{color:#ff6b6b;}

/* =========================================================
   FOOTER — contact list
   ========================================================= */
.footer-contact{margin:14px 0 18px; display:flex; flex-direction:column; gap:9px;}
.footer-contact li{display:flex; align-items:center; gap:9px; color:var(--text-2); font-size:13px;}
.footer-contact li svg{width:15px; height:15px; color:var(--signal); flex-shrink:0;}
.footer-contact li a{color:var(--text-2); transition:color .2s ease;}
.footer-contact li a:hover{color:var(--signal);}

/* =========================================================
   MOBILE SHEET — button variant of sheet-link, socials row
   ========================================================= */
.sheet-link-btn{width:100%; background:none; border:0; border-bottom:1px solid var(--border-soft); cursor:pointer;}
.sheet-socials{display:flex; justify-content:center; gap:10px; margin-top:20px; padding-top:16px; border-top:1px solid var(--border-soft);}
.sheet-socials a{
  width:38px; height:38px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--glass); border:1px solid var(--border); color:var(--text-2);
  transition:color .2s ease, border-color .2s ease, background .2s ease;
}
.sheet-socials a svg{width:16px; height:16px;}
.sheet-socials a:hover{color:var(--signal); border-color:rgba(57,255,138,.3); background:var(--signal-dim);}

/* =========================================================
   INSTALL APP — modal (injected once by components.js)
   ========================================================= */
.install-overlay{
  position:fixed; inset:0; z-index:1300;
  display:flex; align-items:center; justify-content:center; padding:20px;
  background:rgba(5,7,8,.68);
  backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
  opacity:0; visibility:hidden; transition:opacity .3s ease, visibility .3s;
}
.install-overlay.open{opacity:1; visibility:visible;}
.install-popup{
  width:100%; max-width:400px; padding:32px 28px 26px; position:relative;
  border-radius:var(--r-lg); text-align:center;
  background:linear-gradient(180deg, rgba(20,24,30,.96), rgba(10,13,17,.98));
  border:1px solid var(--border); box-shadow:var(--shadow-1);
  backdrop-filter:blur(30px); -webkit-backdrop-filter:blur(30px);
  transform:scale(.92) translateY(14px); opacity:0;
  transition:transform .32s cubic-bezier(.2,.8,.2,1), opacity .25s ease;
}
.install-overlay.open .install-popup{transform:scale(1) translateY(0); opacity:1;}
.install-popup-close{
  position:absolute; top:14px; right:14px; width:30px; height:30px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  background:var(--glass); border:1px solid var(--border); color:var(--text-3);
  transition:color .2s ease, border-color .2s ease;
}
.install-popup-close:hover{color:#ff6b6b; border-color:rgba(255,107,107,.3);}
.install-popup-close svg{width:14px; height:14px;}
.install-popup-icon{
  width:60px; height:60px; margin:0 auto 18px; border-radius:16px;
  display:flex; align-items:center; justify-content:center;
  background:var(--signal-dim); color:var(--signal);
  box-shadow:0 0 0 1px rgba(57,255,138,.18) inset;
}
.install-popup-icon svg{width:28px; height:28px;}
.install-popup h3{font-family:var(--f-display); font-size:18px; font-weight:700; color:var(--text-1); margin-bottom:8px;}
.install-popup p{font-family:var(--f-body); font-size:13.5px; color:var(--text-2); line-height:1.6; margin-bottom:22px;}
.install-popup-actions{display:flex; flex-direction:column; gap:10px;}
.install-popup-unsupported{
  display:none; font-family:var(--f-mono); font-size:12px; color:var(--text-3);
  background:var(--glass); border:1px solid var(--border); border-radius:var(--r-sm);
  padding:10px 12px; margin-bottom:16px;
}