/* The blue site navbar (templates/partials/site_navbar.html): logo, a Tools menu, then Sign in
   and Create free account, or the signed-in account controls. Used by the focused homepage and by
   app-shell pages that put it across the top (see "Across an app-shell page" below).
   Self-contained: literal values, no tokens, so it works on any shell. Selectors carry two classes
   where a theme's bare a / button / li rules would otherwise restyle them. */

.fh-nav, .fh-nav * { box-sizing: border-box; }
.fh-nav { --fh-nav-blue: #1600ff; font-size: 1rem; line-height: 1.5; position: sticky; top: 0; z-index: 1030; background: var(--fh-nav-blue); }
.fh-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.fh-nav__brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; }
/* The logo is dark blue: a white tile keeps it legible on the blue bar. */
.fh-nav__brand img { height: 40px; width: auto; display: block; padding: 3px; border-radius: 8px; background: #fff; }
.fh-nav__name { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.fh-nav__links { display: flex; align-items: center; gap: 1.5rem; }
.fh-nav__links a { color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; }
.fh-nav__links a:hover, .fh-nav__links a:focus-visible { color: #d6d2ff; }
.fh-nav .fh-nav__cta { padding: 8px 16px; border-radius: 10px; background: #fff; color: var(--fh-nav-blue); }
.fh-nav .fh-nav__cta:hover, .fh-nav .fh-nav__cta:focus-visible { background: #e5e3ff; color: var(--fh-nav-blue); }

/* ── Tools menu ─────────────────────────────────────────────────────────── */
/* Opened and closed by static/js/site-navbar.js, which toggles .show. */
.fh-nav .fh-nav__menu { position: relative; }
.fh-nav .fh-nav__toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 0; padding: 0 2px; border: 0; background: none; box-shadow: none; color: #fff; font: inherit; font-weight: 600; line-height: 1.2; letter-spacing: normal; text-transform: none; white-space: nowrap; cursor: pointer; }
.fh-nav .fh-nav__toggle::after { content: ""; width: 7px; height: 7px; margin-top: -4px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s ease; }
.fh-nav .fh-nav__toggle[aria-expanded="true"]::after { margin-top: 3px; transform: rotate(-135deg); }
.fh-nav .fh-nav__toggle:hover { color: #d6d2ff; }
.fh-nav .fh-nav__toggle:focus-visible, .fh-nav .fh-nav__links a:focus-visible, .fh-nav .fh-nav__burger:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.fh-nav .fh-nav__dropdown { display: none; position: absolute; top: calc(100% + 10px); right: 0; left: auto; z-index: 1040; min-width: 15rem; margin: 0; padding: 8px; border: 1px solid #d4d5eb; border-radius: 12px; background: #fff; box-shadow: 0 18px 40px -18px rgba(16, 16, 50, .45); list-style: none; }
.fh-nav .fh-nav__dropdown.show { display: block; }
.fh-nav .fh-nav__dropdown li { margin: 0; padding: 0; list-style: none; }
.fh-nav .fh-nav__dropdown a { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 8px; color: #101032; font-weight: 600; white-space: nowrap; }
.fh-nav .fh-nav__dropdown a:hover, .fh-nav .fh-nav__dropdown a:focus-visible { background: #e8eafd; color: #1600ff; outline: 0; }
.fh-nav .fh-nav__dropdown .fh-nav__all { margin-top: 6px; padding-top: 6px; border-top: 1px solid #e3e4f3; }
.fh-nav .fh-nav__dropdown .fh-nav__all a { color: #1600ff; }
/* Sign in sits in the bar, and in the Tools menu instead on the narrowest phones. */
.fh-nav .fh-nav__dropdown .fh-nav__narrow { display: none; }
/* A page's own link: in the bar on wide screens, at the top of the menu on narrow ones. */
.fh-nav .fh-nav__dropdown .fh-nav__extra-item { display: none; margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid #e3e4f3; }
/* Pinned over the page, for a hero that already leaves room for a fixed navbar. */
.fh-nav.fh-nav--fixed { position: fixed; top: 0; right: 0; left: 0; }
.fh-nav__inner--wide { padding: 0 24px; }

@media (max-width: 991.98px) {
  .fh-nav .fh-nav__links .fh-nav__extra { display: none; }
  .fh-nav .fh-nav__dropdown .fh-nav__extra-item { display: block; }
}
@media (max-width: 767.98px) {
  .fh-nav__links { gap: 1rem; }
  .fh-nav__inner--wide { padding: 0 12px; }
}
@media (max-width: 575.98px) {
  /* Signed in, the email and Log out need the room: the logo alone stands for the brand. */
  .fh-nav__inner:has(.iai-nav-account) .fh-nav__name { display: none; }
  .fh-nav__links { gap: .75rem; min-width: 0; }
  .fh-nav .fh-nav__cta { padding: 8px 12px; }
}
/* Too narrow for the wordmark beside three controls. */
@media (max-width: 519.98px) {
  .fh-nav .fh-nav__inner:has(.fh-nav__cta) .fh-nav__name { display: none; }
}
@media (max-width: 399.98px) {
  .fh-nav .fh-nav__links .fh-nav__signin { display: none; }
  .fh-nav .fh-nav__dropdown .fh-nav__narrow { display: block; }
  .fh-nav .fh-nav__dropdown { right: auto; left: 0; }
}

/* ── Across an app-shell page ───────────────────────────────────────────── */
/* A base_app.html page opts in with body class "iai-topnav" and the partial (shell=True
   burger=True) in its navbar block. The bar then runs edge to edge above everything, and the
   left sidebar, its hide/show button and the main column start below it. */
.iai-topnav { --iai-topnav-h: 68px; }
.iai-topnav .fh-nav { position: fixed; top: 0; right: 0; left: 0; z-index: 1100; height: var(--iai-topnav-h); }
.iai-topnav .fh-nav__inner { height: 100%; }
.iai-topnav .app-navbar { position: static; background: none; box-shadow: none; }
.iai-topnav .app-sidebar { top: var(--iai-topnav-h); height: calc(100vh - var(--iai-topnav-h)); }
.iai-topnav .app-main { padding-top: var(--iai-topnav-h); }
.iai-topnav .ia-sb-toggle { top: calc(var(--iai-topnav-h) + 14px); }
/* Opens the sidebar drawer on phones, where the shell keeps it off-canvas. */
.fh-nav .fh-nav__burger { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 4px 0 -8px; padding: 0; border: 0; border-radius: 8px; background: none; color: #fff; cursor: pointer; }
.fh-nav .fh-nav__burger svg { display: block; width: 26px; height: 26px; }
.fh-nav__start { display: flex; align-items: center; min-width: 0; }
@media (max-width: 768px) {
  .iai-topnav .fh-nav__burger { display: inline-flex; }
}
/* With the drawer button in the bar there is less room on phones: Sign in moves into the Tools
   menu, and on the narrowest screens the button reads "Sign up" (its accessible name is unchanged). */
@media (max-width: 575.98px) {
  .fh-nav .fh-nav__inner:has(.fh-nav__burger) .fh-nav__signin { display: none; }
  .fh-nav .fh-nav__inner:has(.fh-nav__burger) .fh-nav__dropdown .fh-nav__narrow { display: block; }
  .fh-nav .fh-nav__inner:has(.fh-nav__burger) .fh-nav__cta { padding: 8px 12px; font-size: .9375rem; }
}
@media (max-width: 399.98px) {
  .fh-nav .fh-nav__inner:has(.fh-nav__burger) .fh-nav__cta { font-size: 0; }
  .fh-nav .fh-nav__inner:has(.fh-nav__burger) .fh-nav__cta::after { content: "Sign up"; font-size: .9375rem; }
}

/* ── Above a full-height app shell ──────────────────────────────────────── */
/* Body class "iai-topnav-flow": the bar sits in the page flow and the shell below it (the
   Startup Builder: platform sidebar, rail, steps, main column, each scrolling by itself) gives
   up the bar's height. Below 900px that shell scrolls as one page and needs no adjustment. */
.iai-topnav-flow { --iai-topnav-h: 68px; }
body.iai-topnav-flow { margin: 0; }
.iai-topnav-flow .fh-nav { position: sticky; height: var(--iai-topnav-h); }
.iai-topnav-flow .fh-nav__inner { height: 100%; }
.iai-topnav-flow .ia-sb-toggle { top: calc(var(--iai-topnav-h) + 14px); }
@media (min-width: 901px) {
  .iai-topnav-flow .business-plan-app.bpr { height: calc(100vh - var(--iai-topnav-h)); }
  .iai-topnav-flow .ia-main-sidebar .ia-ms-inner { height: calc(100vh - var(--iai-topnav-h)); }
}
@media (prefers-reduced-motion: reduce) {
  .fh-nav * , .fh-nav .fh-nav__toggle::after { transition: none !important; }
}
