
@import url("atlas.css");

/* --- generated-page extras layered on top of atlas.css --- */
.related-notes, .branch-nav {
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}
.related-grid, .branch-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}
.related-card, .branch-nav-link {
  display: block;
  padding: .95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--fg);
  box-shadow: var(--shadow-card);
  transition: transform .12s, border-color .12s, box-shadow .12s;
  text-decoration: none;
}
.related-card:hover, .branch-nav-link:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}
.branch-nav-link { display: flex; flex-direction: column; gap: .25rem; line-height: 1.35; }
.branch-nav-link.next { text-align: right; align-items: flex-end; }
.nav-dir, .related-card span {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* search results dropdown — overrides the basic atlas.css version */
#search-results {
  position: fixed;
  top: calc(var(--topbar-h) + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 2rem));
  max-height: min(68vh, 760px);
  overflow: auto;
  padding: .45rem;
  z-index: 60;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
}
#search-results[hidden] { display: none !important; }
#search-results .results-meta {
  padding: .55rem .85rem .65rem;
  margin-bottom: .25rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}
#search-results .hit {
  display: block;
  padding: .7rem .85rem;
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
}
#search-results .hit:hover,
#search-results .hit.active {
  background: var(--bg);
  text-decoration: none;
}
#search-results .hit.active { outline: 1px solid var(--accent-line); }
#search-results .hit-title { color: var(--fg); font-weight: 700; }
#search-results .meta {
  margin-top: .15rem;
  color: var(--muted);
  font-size: .82rem;
}
#search-results .empty { padding: .8rem; color: var(--muted); }
#search-results mark {
  background: var(--accent-soft);
  color: var(--accent-2);
  border-radius: 2px;
  padding: 0 1px;
}
#search-results .hit p { margin: .25rem 0 0; color: var(--muted); font-size: .86rem; line-height: 1.45; }

.gh-label { display: inline; }
@media (max-width: 860px) {
  .related-grid, .branch-nav { grid-template-columns: 1fr; }
  .branch-nav-link.next { text-align: left; align-items: flex-start; }
  .gh-label { display: none; }
  .github-link { padding: 0; width: 36px; justify-content: center; }
}
@media (max-width: 780px) {
  #search-results { top: 96px; width: calc(100vw - 1.5rem); max-height: 70vh; }
}
