/* ══ LANDING OVERRIDES ══
   The landing page is a full document with its own navbar, so it loads
   studio.css + design.css and then this file LAST. design.css carries
   `.navbar > div:not(.logo-group):not(.nav-social):not(.nav-center)
    { display:flex !important }` — which hits the menu panel because it is
   a div inside .navbar. Only an ID can out-specify that without !important.
   Everything here is therefore ID-scoped to the landing navbar. */

#tlLandingPanel { display: none; }

@media (max-width: 820px) {
  /* the landing navbar stays fixed — the panel is anchored to it */
  #tlLandingPanel {
    display: none !important;
    position: absolute !important;
    z-index: 61;
    top: calc(100% + 8px) !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 10px !important;
    border-radius: 16px !important;
    background: rgba(11,12,10,.96) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    box-shadow: 0 30px 60px -28px rgba(0,0,0,.75) !important;
    backdrop-filter: blur(14px);
  }
  body.tlnav-open #tlLandingPanel { display: grid !important; }
  #tlLandingPanel a {
    display: block !important;
    width: 100% !important;
    padding: 12px !important;
    min-height: 44px;
    line-height: 1.2;
    border-radius: 10px !important;
    color: #f2efe7 !important;
    font-size: .92rem !important;
    text-align: start;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.08);
  }
  #tlLandingPanel a:hover { background: rgba(79,209,181,.12) !important; }
  #tlLandingPanel .nav-cta { grid-column: 1 / -1; text-align: center; }

  html[data-theme="light"] #tlLandingPanel {
    background: rgba(255,253,248,.97) !important;
    border-color: rgba(20,20,15,.12) !important;
  }
  html[data-theme="light"] #tlLandingPanel a {
    color: #1a1a15 !important;
    border-color: rgba(20,20,15,.08);
  }
  /* the social rail overlaps content on a phone — the panel replaces it */
  #tlLandingPanel ~ .nav-social { display: none !important; }
}

/* design.css forces `.navbar { position: static !important }` for the template
   nav — but the landing navbar is fixed by design, so the menu panel had no
   positioned ancestor and opened at the bottom of the document (measured:
   panel top 860 vs nav bottom 133). Restore fixed positioning here. */
@media (max-width: 820px) {
  .navbar {
    position: fixed !important;
    top: 0 !important; left: 0 !important; right: 0 !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
    height: auto !important;
    padding: 10px 14px !important;
    background: rgba(13,14,12,.82) !important;
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  html[data-theme="light"] .navbar {
    background: rgba(248,246,241,.88) !important;
    border-bottom-color: rgba(20,20,15,.08);
  }
}

/* the burger was measured at 31px wide (flex shrink inside the nowrap navbar)
   -> pin it so the 44px touch target the guidelines require is real. */
@media (max-width: 820px) {
  .navbar .tl-burger {
    flex: 0 0 auto !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    margin-inline-start: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255,255,255,.22) !important;
    background: rgba(255,255,255,.06) !important;
    color: #f2efe7 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    order: 3;
    position: relative;
    z-index: 62;
  }
  html[data-theme="light"] .navbar .tl-burger {
    border-color: rgba(20,20,15,.18) !important;
    background: rgba(255,255,255,.8) !important;
    color: #14140f !important;
  }
  .navbar .tl-burger:focus-visible {
    outline: 2px solid var(--tl-signal) !important;
    outline-offset: 2px !important;
  }
}

/* design.css re-shows `.nav-center` on phones with !important (it was written for
   the template nav), so the landing header showed 4 links AND the panel showed 8.
   On a phone the panel is the single navigation. */
@media (max-width: 820px) {
  .navbar .nav-center { display: none !important; }
}
