/* Shared iRad Courses navbar.
   Loaded by the landing page and by each course app, so every page on
   courses.irad.app carries the same bar. Loaded AFTER each app's styles.css
   so the .ai-gear offset below wins. */

.irad-nav {
  --nav-bg: #ffffff;
  --nav-border: #e1e6f0;
  --nav-text: #1c2434;
  --nav-muted: #5b6678;
  --nav-accent: #3b6cf6;

  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  .irad-nav {
    --nav-bg: #151c29;
    --nav-border: #2a3346;
    --nav-text: #e7ecf5;
    --nav-muted: #9aa6bd;
    --nav-accent: #5b85ff;
  }
}

.irad-nav__inner {
  max-width: 900px;
  margin: 0 auto;
  min-height: 52px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.irad-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.01em;
  color: var(--nav-text);
  text-decoration: none;
  white-space: nowrap;
}

.irad-nav__brand:hover { color: var(--nav-accent); }
.irad-nav__mark { flex: 0 0 auto; border-radius: 7px; display: block; }

.irad-nav__links {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  font-size: .88rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.irad-nav__links a {
  color: var(--nav-muted);
  text-decoration: none;
  white-space: nowrap;
}

.irad-nav__links a:hover { color: var(--nav-accent); }
.irad-nav__links a.is-current { color: var(--nav-text); font-weight: 600; }

.irad-nav__user {
  color: var(--nav-muted);
  white-space: nowrap;
  max-width: 34ch;
  overflow: hidden;
  text-overflow: ellipsis;
}

.irad-nav__user strong { color: var(--nav-text); font-weight: 600; }

.irad-nav__sep {
  width: 1px;
  height: 18px;
  background: var(--nav-border);
  flex: 0 0 auto;
}

/* The course apps float their AI settings button at top:14px, which would sit
   under the sticky bar. Push it clear. */
.ai-gear { top: 66px !important; }

@media (max-width: 560px) {
  .irad-nav__inner { gap: 10px; padding: 8px 14px; flex-wrap: nowrap; }
  /* never let the bar grow to two or three rows on a narrow phone: the links
     stay on one line and scroll sideways if they truly do not fit */
  .irad-nav__links { gap: 12px; font-size: .82rem; flex-wrap: nowrap; overflow-x: auto;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .irad-nav__links::-webkit-scrollbar { display: none; }
  .irad-nav__user { display: none; }
  .ai-gear { top: 62px !important; }
}

@media (max-width: 420px) {
  .irad-nav__brand { font-size: .92rem; gap: 7px; }
  .irad-nav__links { gap: 9px; font-size: .78rem; }
  .irad-nav__sep { display: none; }
}
