.fg-nav-page {
  --fg-nav-height: 52px;
  --fg-nav-padding: 18px;
  --fg-nav-offset: var(--fg-nav-height);
  scroll-padding-top: calc(var(--fg-nav-offset) + 12px);
}

.fg-nav {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: var(--fg-nav-height);
  padding: 0 var(--fg-nav-padding);
  position: sticky;
  top: 0;
  z-index: 110;
  background: rgba(7, 9, 15, 0.97);
  border-bottom: 1px solid rgba(72, 124, 255, 0.12);
  backdrop-filter: blur(10px);
  font-family: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1;
}

.fg-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 20px;
  flex-shrink: 0;
  text-decoration: none;
  color: #fff;
}
.fg-nav-logo:hover { color: #fff; text-decoration: none; }
.fg-nav-logo-img { height: 28px; width: 28px; border-radius: 50%; object-fit: cover; }
.fg-nav-wordmark { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; line-height: 1; }
.fg-nav-flux { color: #93BBF9; }
.fg-nav-links { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.fg-nav-link, .fg-nav-more-button, .fg-nav-trial {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  height: 34px;
  padding: 0 12px;
  margin: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(147, 187, 249, 0.7);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.fg-nav-link:hover, .fg-nav-more-button:hover, .fg-nav-active {
  color: #fff;
  background: rgba(72, 124, 255, 0.12);
  text-decoration: none;
}
.fg-nav-logo:focus-visible, .fg-nav-link:focus-visible,
.fg-nav-more-button:focus-visible, .fg-nav-trial:focus-visible {
  outline: 2px solid #93BBF9;
  outline-offset: 2px;
}
.fg-nav-right { display: flex; align-items: center; margin-left: auto; flex-shrink: 0; }
.fg-nav-trial { background: #487CFF; color: #fff; font-weight: 600; }
.fg-nav-trial:hover { background: #3568e6; color: #fff; text-decoration: none; }
.fg-nav-more { position: relative; flex-shrink: 0; }
.fg-nav-caret { margin-left: 5px; font-size: 10px; }
.fg-nav-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 140px;
  padding: 6px;
  background: #10131b;
  border: 1px solid rgba(72, 124, 255, 0.2);
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.fg-nav-menu[hidden] { display: none; }
.fg-nav-menu .fg-nav-link { display: flex; }

/* Preserve Subscription's content padding while extending the bar to the edges. */
.fg-nav-subscribe > .fg-nav { margin: -56px -24px 56px; }

/* Keep Docs' existing controls and anchor targets below the sticky bar. */
.fg-nav-doc #toggleSidebarButton { top: calc(var(--fg-nav-offset) + 10px); }
/* Agent API keeps its fixed sidebar at every width; include its padding in the available height. */
.fg-nav-agent-api #sidebar {
  top: var(--fg-nav-offset);
  height: calc(100% - var(--fg-nav-offset));
  box-sizing: border-box;
}
@media (min-width: 801px) {
  .fg-nav-doc #sidebar {
    top: var(--fg-nav-offset);
    height: calc(100% - var(--fg-nav-offset));
    box-sizing: border-box;
  }
}
@media (max-width: 800px) {
  .fg-nav-doc #toggleSidebarButton { top: calc(var(--fg-nav-offset) + 20px); }
}

/* Wrap links on small screens so every destination and the dropdown stay reachable. */
@media (max-width: 980px) {
  .fg-nav { height: auto; min-height: var(--fg-nav-height); flex-wrap: wrap; padding-block: 9px; row-gap: 8px; }
  .fg-nav-links { order: 3; flex-basis: 100%; flex-wrap: wrap; min-height: 34px; }
}
@media (min-width: 2560px) {
  .fg-nav-page { --fg-nav-height: 64px; --fg-nav-padding: 40px; }
}
