/* Header menus, grouped by what a visitor came to do: Learn, Fix, Releases & AI,
   Prepare. The same four groups as the footer, so the site has one mental model.
   Loaded after article/landing/styles.css, which each carry an older copy of the
   header rules, so everything here only has to win on order, not on weight. */

.nav-links { gap: 4px; }

.nav-group { position: relative; }

.nav-top {
  appearance: none; background: none; border: 0; cursor: pointer;
  font: 600 14.5px var(--sans, Inter, system-ui, sans-serif);
  color: var(--dim, #5f5c54);
  padding: 9px 11px; border-radius: 9px;
  display: inline-flex; align-items: center; gap: 5px;
}
.nav-top::after {
  content: ""; width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg); opacity: .6; transition: transform .15s;
}
.nav-top:hover, .nav-group.open .nav-top { color: var(--ink, #2b2a26); background: rgba(0, 0, 0, .04); }
.nav-group.open .nav-top::after { transform: rotate(225deg); margin-top: 3px; }
.nav-top:focus-visible { outline: 2px solid var(--architect, #3d5bc4); outline-offset: 2px; }
.nav-top.here { color: var(--ink, #2b2a26); }
.nav-top.here::before {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 2px;
  border-radius: 2px; background: var(--partner, #b07724);
}

.nav-links .nav-plain { padding: 9px 11px; border-radius: 9px; }
.nav-links .nav-plain:hover { background: rgba(0, 0, 0, .04); }

/* the drop-down panel */
.nav-drop {
  display: none; position: absolute; top: calc(100% + 8px); left: -8px; z-index: 60;
  width: 340px; padding: 8px;
  background: var(--panel, #fff); border: 1px solid var(--line, #e6dfd2); border-radius: 14px;
  box-shadow: 0 18px 40px -18px rgba(40, 32, 20, .35);
}
/* bridge the gap so the menu does not close while the pointer travels into it */
.nav-drop::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.nav-group.open .nav-drop { display: block; }
@media (hover: hover) and (min-width: 961px) {
  .nav-group:hover .nav-drop { display: block; }
}
.nav-group:last-of-type .nav-drop { left: auto; right: -8px; }

.nav-links .nav-drop a {
  display: block; padding: 9px 11px; border-radius: 9px;
  text-decoration: none; color: var(--ink, #2b2a26); font-weight: 400;
}
.nav-drop a b { display: block; font-size: 14.5px; font-weight: 650; color: var(--ink, #2b2a26); }
.nav-drop a span { display: block; font-size: 12.8px; line-height: 1.4; color: var(--dim, #5f5c54); margin-top: 1px; }
.nav-links .nav-drop a:hover, .nav-links .nav-drop a:focus-visible { background: var(--bg2, #f3efe7); outline: none; }
.nav-drop a[aria-current="page"] b { color: var(--architect, #3d5bc4); }
.nav-drop .nav-all {
  margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line, #e6dfd2); border-radius: 0 0 9px 9px;
}
.nav-drop .nav-all b { font-size: 13.5px; color: var(--architect, #3d5bc4); }

/* below 961px the burger takes over; the grouped panel is built by nav.js */
@media (max-width: 960px) {
  .nav-links .nav-group, .nav-links .nav-plain { display: none; }
}

/* ---------- mobile panel ---------- */
.nav-panel .np-search { display: flex; gap: 8px; padding: 12px 0 6px; }
.nav-panel .np-search input {
  flex: 1; min-width: 0; font: 400 16px var(--sans, Inter, sans-serif);
  padding: 11px 14px; border: 1.5px solid var(--line, #e6dfd2); border-radius: 11px; background: #fff;
}
.nav-panel .np-search button {
  font: 600 15px var(--sans, Inter, sans-serif); padding: 0 16px; border: 0; border-radius: 11px;
  background: var(--ink, #2b2a26); color: #fff; cursor: pointer;
}
.nav-panel .np-sec { padding: 10px 0 4px; border-bottom: 1px solid var(--line, #e6dfd2); }
.nav-panel .np-sec:last-child { border-bottom: 0; }
.nav-panel .np-h {
  font: 700 11.5px var(--sans, Inter, sans-serif); letter-spacing: .1em; text-transform: uppercase;
  color: var(--partner, #b07724); margin: 6px 0 2px;
}
.nav-panel .np-sec a { display: block; padding: 9px 0; border-bottom: 0; font-size: 15.5px; color: var(--ink, #2b2a26); }
.nav-panel .np-sec a:last-child { color: var(--ink, #2b2a26); }
.nav-panel .np-sec a[aria-current="page"] { color: var(--architect, #3d5bc4); }
.nav-panel { max-height: calc(100dvh - 64px); overflow-y: auto; }
