/* "Tools I built" dropdown in the top nav. Shared by the built pages and audit.html.
   Desktop: a click-to-open panel under the button. Phone menu: an accordion row. */
.nav-drop { position: relative; }
.nav-drop-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: .9rem; font-weight: 700; color: var(--gray-warm);
}
.nav-drop-btn:hover, .nav-drop-btn[aria-expanded="true"] { color: var(--white); }
.nav-drop-btn:focus-visible { outline: 3px solid var(--accent-hot); outline-offset: 4px; border-radius: 4px; }
.nav-drop-btn svg { width: 12px; height: 12px; transition: transform .2s ease; }
.nav-drop-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.nav-drop-panel {
  position: absolute; top: calc(100% + 18px); right: -18px; width: 360px;
  background: #0F0C09; border: 1px solid var(--line-dark); border-radius: 14px;
  box-shadow: 0 28px 60px -24px rgba(0,0,0,.75);
  padding: 10px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.nav-drop.open .nav-drop-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .18s ease, transform .18s ease, visibility 0s; }
.nav-drop-panel::before { content: ""; position: absolute; top: -7px; right: 40px; width: 12px; height: 12px; background: #0F0C09; border-left: 1px solid var(--line-dark); border-top: 1px solid var(--line-dark); transform: rotate(45deg); }

.nav-links .nd-item {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center;
  padding: 10px 12px; border-radius: 10px; text-decoration: none; min-height: 44px;
}
.nav-links .nd-item:hover, .nav-links .nd-item:focus-visible { background: var(--black-3); outline: none; }
.nd-item img { width: 44px; height: 44px; border-radius: 11px; display: block; }
.nd-item b { display: block; color: var(--white); font-size: .95rem; font-weight: 800; }
.nd-item small { display: block; color: var(--gray-warm); font-size: .82rem; font-weight: 500; margin-top: 2px; line-height: 1.35; }
.nav-links .nd-all {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 6px 2px 2px; padding: 14px 12px 6px; border-top: 1px solid var(--line-dark); min-height: 48px;
  color: var(--accent-hot); font-size: .88rem; font-weight: 800; text-decoration: none;
}
.nav-links .nd-all:hover { color: var(--white); }
.nd-all svg { width: 16px; height: 16px; }

/* Desktop widths where seven nav items get tight */
@media (min-width: 1001px) and (max-width: 1140px) {
  .nav-links { gap: 16px; }
  .nav-links a, .nav-drop-btn { font-size: .82rem; white-space: nowrap; }
}

/* Phone menu (and narrow laptops): the dropdown becomes an accordion row */
@media (max-width: 1000px) {
  .nav-drop { border-bottom: 1px solid var(--line-dark); }
  .nav-drop-btn { width: 100%; justify-content: space-between; padding: 14px 0; font-size: 1rem; min-height: 48px; }
  .nav-drop-btn svg { width: 14px; height: 14px; }
  .nav-drop-panel {
    position: static; width: auto; box-shadow: none; border: 0; border-radius: 0; background: transparent;
    padding: 0 0 12px; display: none; opacity: 1; visibility: visible; transform: none; transition: none;
  }
  .nav-drop.open .nav-drop-panel { display: block; }
  .nav-drop-panel::before { display: none; }
  .nav-links .nd-item { padding: 10px 4px; border-bottom: 0; }
  .nav-links .nd-all { border-bottom: 0; padding: 14px 4px 4px; margin: 4px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-drop-panel, .nav-drop-btn svg { transition: none !important; }
}
