/* The one header and menu of toolswithterry.com. Every page loads this file and
   assets/nav.js; the markup comes from terry_tutorials/make_guide.py (NAV_HTML,
   `python terry_tutorials/make_guide.py --sync-nav` writes it into the static pages).
   Self-contained on purpose: no page variable is needed, and every rule is scoped to
   .nav so a page's own a, ul, li or .brand rules cannot change it.
   Gate: tests/test_terry_guides.py (same links, same order, on every page). */
.nav{position:sticky;top:0;z-index:100;background:rgba(255,255,255,.9);
  backdrop-filter:saturate(1.4) blur(14px);-webkit-backdrop-filter:saturate(1.4) blur(14px);
  border-bottom:1px solid transparent;transition:border-color .3s;
  font-family:"Plus Jakarta Sans",system-ui,-apple-system,"Segoe UI",sans-serif;font-size:16px;line-height:1.65;
  -webkit-font-smoothing:antialiased}
.nav.is-scrolled{border-bottom-color:#E1E7F1}
.nav *{box-sizing:border-box}
.nav__wrap{max-width:1180px;margin:0 auto;padding:0 28px}
.nav__in{display:flex;align-items:center;justify-content:space-between;height:68px;gap:16px}
.nav .brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:#0B1B3F;
  font-weight:800;font-size:18px;letter-spacing:-.01em;white-space:nowrap}
.nav .brand svg{width:32px;height:32px;flex:none}
.nav .nav__links{display:flex;align-items:center;gap:4px;list-style:none;margin:0;padding:0}
.nav .nav__links li{margin:0;padding:0}
.nav .nav__links a{display:block;padding:10px 13px;border-radius:10px;text-decoration:none;
  color:#4A5672;font-weight:600;font-size:16px;line-height:1.65}
.nav .nav__links a:hover{color:#0B1B3F;background:#F4F8FE}
.nav .nav__links .nav__pick{color:#0B1B3F;background:#FFF2E5}
.nav .nav__links a[aria-current="page"]{color:#0B1B3F;box-shadow:inset 0 -3px 0 #FF7A00}
.nav .nav__links .nav__work{color:#fff;background:#0B1B3F;margin-left:8px}
.nav .nav__links .nav__work:hover{color:#fff;background:#13296b}
.nav .nav__work--top{display:none;color:#fff;background:#0B1B3F;border-radius:10px;padding:10px 14px;font-weight:700;font-size:15px;
  line-height:1.65;text-decoration:none;white-space:nowrap}
.nav .nav__menu{display:none;font:inherit;font-weight:700;font-size:16px;color:#0B1B3F;
  background:#F4F8FE;border:1px solid #E1E7F1;border-radius:10px;padding:10px 16px;min-height:44px;cursor:pointer}
.nav :focus-visible{outline:3px solid #FF7A00;outline-offset:3px;border-radius:6px}
@media (max-width:820px){
  /* the empty nav stays in the flex row as a 0-width child; the button takes the free space */
  .nav__in{gap:0}
  .nav .nav__menu{display:inline-flex;align-items:center;margin-left:8px}
  .nav .nav__links{display:none;position:absolute;left:0;right:0;top:68px;flex-direction:column;align-items:stretch;
    background:#fff;border-bottom:1px solid #E1E7F1;padding:8px 16px 16px;box-shadow:0 18px 30px rgba(11,27,63,.08)}
  .nav.is-open .nav__links{display:flex}
  .nav .nav__links a{font-size:18px;padding:14px 12px}
  .nav .nav__work-li{display:none}
  .nav .nav__work--top{display:inline-flex;align-items:center;margin-left:auto}
  .nav .nav__links .nav__work{margin:0 0 8px;text-align:center}
}
@media (max-width:640px){.nav__wrap{padding:0 16px}}
@media (max-width:520px){.nav .brand span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}}
@media (prefers-reduced-motion:reduce){.nav{transition:none}}
@media print{.nav{display:none!important}}
