:root {
  --result-nav-bg: rgba(18,17,35,.92);
  --result-nav-border: rgba(255,255,255,.075);

  --result-nav-text: #ececf4;
  --result-nav-text-dim: #a6a9ba;
  --result-nav-text-muted: #777b8f;

  --result-nav-accent: #7c5cfc;
  --result-nav-accent-2: #9c86ff;
  --result-nav-accent-3: #c7bfff;

  --result-nav-ok: #3ccf91;
  --result-nav-danger: #ff7373;

  --result-nav-font: 'Bricolage Grotesque', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --result-nav-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* =========================================================
   RESULT NAVBAR — MINIMAL
   ========================================================= */

.result-navbar,
.result-navbar *,
.result-navbar *::before,
.result-navbar *::after {
  box-sizing: border-box;
}

.result-navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;

  height: 72px;

  font-family: var(--result-nav-font);
  color: var(--result-nav-text);

  background: var(--result-nav-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border-bottom: 1px solid var(--result-nav-border);
}

.result-navbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;

  height: 1px;

  pointer-events: none;

  background:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(124,92,252,.08) 20%,
      rgba(156,134,255,.20) 50%,
      rgba(124,92,252,.08) 80%,
      transparent 100%
    );
}

.result-navbar a {
  color: inherit;
  text-decoration: none !important;
}

.result-navbar button {
  font: inherit;
}

/* Layout */
.result-navbar-inner {
  width: min(1440px, calc(100% - 48px));
  height: 100%;

  margin: 0 auto;

  display: flex;
  align-items: center;
  gap: 46px;
}

/* Brand */
.result-nav-brand {
  flex: 0 0 auto;

  display: inline-flex;
  align-items: center;
  gap: 13px;

  min-width: 0;
}

.result-nav-logo {
  display: block;

  width: 178px;
  height: auto;

  object-fit: contain;
}

.result-nav-context {
  position: relative;

  padding-left: 14px;

  color: var(--result-nav-text-muted);

  font-family: var(--result-nav-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.result-nav-context::before {
  content: "";

  position: absolute;
  left: 0;
  top: 50%;

  width: 1px;
  height: 18px;

  transform: translateY(-50%);

  background: rgba(255,255,255,.11);
}

/* Menu */
.result-nav-menu {
  flex: 1 1 auto;
  min-width: 0;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 34px;
}

.result-nav-links {
  display: flex;
  align-items: center;

  gap: 31px;

  margin: 0;
  padding: 0;

  list-style: none;
}

.result-nav-link {
  position: relative;

  display: inline-flex;
  align-items: center;

  height: 72px;

  color: var(--result-nav-text-dim) !important;

  font-size: 14px;
  font-weight: 570;
  letter-spacing: .005em;

  transition:
    color .18s ease,
    opacity .18s ease;
}

.result-nav-link::after {
  content: "";

  position: absolute;
  left: 50%;
  bottom: 0;

  width: 0;
  height: 2px;

  transform: translateX(-50%);

  border-radius: 999px 999px 0 0;

  background:
    linear-gradient(
      90deg,
      var(--result-nav-accent),
      var(--result-nav-accent-2)
    );

  box-shadow: 0 -4px 14px rgba(124,92,252,.32);

  transition: width .18s ease;
}

.result-nav-link:hover {
  color: #fff !important;
}

.result-nav-link:hover::after {
  width: 22px;
}

/* Add is-active to the current page link */
.result-nav-link.is-active {
  color: #fff !important;
}

.result-nav-link.is-active::after {
  width: 30px;
}

/* Right */
.result-nav-right {
  flex: 0 0 auto;

  display: flex;
  align-items: center;

  gap: 18px;
}

.result-nav-status {
  display: inline-flex;
  align-items: center;

  gap: 8px;

  color: #82dfb3;

  font-size: 12px;
  font-weight: 620;
}

.result-nav-status-dot {
  position: relative;

  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--result-nav-ok);

  box-shadow: 0 0 12px rgba(60,207,145,.48);
}

.result-nav-status-dot::after {
  content: "";

  position: absolute;
  inset: -4px;

  border: 1px solid rgba(60,207,145,.22);
  border-radius: 50%;
}

.result-nav-status::after {
  content: "";

  width: 1px;
  height: 20px;

  margin-left: 7px;

  background: rgba(255,255,255,.09);
}

/* Account as a simple text action */
.result-nav-account {
  display: inline-flex;
  align-items: center;

  min-height: 40px;

  color: var(--result-nav-text-dim) !important;

  font-size: 13px;
  font-weight: 620;

  transition: color .16s ease;
}

.result-nav-account:hover {
  color: #fff !important;
}

/* Logout stays very quiet */
.result-nav-logout-form {
  display: inline-flex;
  margin: 0;
}

.result-nav-logout {
  appearance: none;

  padding: 0;

  border: 0;
  background: transparent;

  color: var(--result-nav-text-muted);

  font-family: var(--result-nav-font);
  font-size: 13px;
  font-weight: 600;

  cursor: pointer;

  transition: color .16s ease;
}

.result-nav-logout:hover {
  color: var(--result-nav-danger);
}

/* Logged-out CTA */
.result-nav-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 38px;
  padding: 0 17px;

  border-radius: 999px;

  color: #fff !important;

  background:
    linear-gradient(
      135deg,
      rgba(124,92,252,.95),
      rgba(156,134,255,.95)
    );

  box-shadow: 0 8px 22px rgba(124,92,252,.22);

  font-size: 13px;
  font-weight: 700;

  transition:
    transform .16s ease,
    box-shadow .16s ease;
}

.result-nav-signup:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(124,92,252,.32);
}

/* Mobile toggle */
.result-nav-toggle {
  display: none;

  width: 42px;
  height: 42px;

  margin-left: auto;

  align-items: center;
  justify-content: center;
  flex-direction: column;

  gap: 6px;

  border: 0;
  background: transparent;

  cursor: pointer;
}

.result-nav-toggle span {
  display: block;

  width: 21px;
  height: 1.5px;

  border-radius: 999px;

  background: var(--result-nav-text);

  transition:
    transform .18s ease,
    opacity .18s ease;
}

.result-nav-toggle.is-open span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.result-nav-toggle.is-open span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {
  .result-navbar-inner {
    width: min(100% - 32px, 1180px);
    gap: 30px;
  }

  .result-nav-links {
    gap: 22px;
  }

  .result-nav-logo {
    width: 160px;
  }

  .result-nav-context {
    display: none;
  }

  .result-nav-status > span:last-child {
    display: none;
  }

  .result-nav-status::after {
    margin-left: 2px;
  }
}

@media (max-width: 900px) {
  .result-navbar {
    height: 68px;
  }

  .result-navbar-inner {
    width: calc(100% - 28px);
  }

  .result-nav-logo {
    width: 154px;
  }

  .result-nav-toggle {
    display: flex;
  }

  .result-nav-menu {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;

    display: none;
    flex-direction: column;
    align-items: stretch;

    gap: 0;

    padding: 12px 20px 20px;

    background: rgba(18,17,35,.985);

    border-bottom: 1px solid var(--result-nav-border);

    box-shadow: 0 20px 36px rgba(0,0,0,.22);
  }

  .result-nav-menu.is-open {
    display: flex;
  }

  .result-nav-links {
    width: 100%;

    flex-direction: column;
    align-items: stretch;

    gap: 0;
  }

  .result-nav-links li {
    width: 100%;
  }

  .result-nav-link {
    width: 100%;
    height: auto;

    padding: 14px 2px;

    border-bottom: 1px solid rgba(255,255,255,.055);
  }

  .result-nav-link::after {
    left: 0;
    bottom: 7px;

    transform: none;
  }

  .result-nav-link:hover::after,
  .result-nav-link.is-active::after {
    width: 22px;
  }

  .result-nav-right {
    width: 100%;

    margin-top: 8px;
    padding-top: 14px;

    justify-content: flex-start;

    gap: 20px;
  }

  .result-nav-status {
    margin-right: auto;
  }

  .result-nav-status > span:last-child {
    display: inline;
  }

  .result-nav-status::after {
    display: none;
  }

  .result-nav-account {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  .result-navbar-inner {
    width: calc(100% - 22px);
  }

  .result-nav-logo {
    width: 142px;
  }

  .result-nav-menu {
    padding-left: 16px;
    padding-right: 16px;
  }

  .result-nav-right {
    flex-wrap: wrap;
  }

  .result-nav-status {
    width: 100%;
    margin-bottom: 4px;
  }
}


/* =========================================================
   RESULT NAVBAR V3 — Search + Upload
   ========================================================= */

.result-navbar-inner {
  gap: 34px;
}

.result-nav-menu {
  gap: 24px;
}

.result-nav-links {
  gap: 26px;
}

.result-nav-tools {
  flex: 1 1 auto;
  min-width: 280px;
  max-width: 520px;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Search */
.result-nav-search {
  flex: 1 1 320px;
  min-width: 220px;
  max-width: 390px;

  height: 40px;

  display: flex;
  align-items: center;

  overflow: hidden;

  border: 1px solid rgba(255,255,255,.085);
  border-radius: 12px;

  background: rgba(255,255,255,.035);

  transition:
    border-color .16s ease,
    background .16s ease,
    box-shadow .16s ease;
}

.result-nav-search:focus-within {
  border-color: rgba(156,134,255,.42);
  background: rgba(124,92,252,.055);
  box-shadow: 0 0 0 3px rgba(124,92,252,.08);
}

.result-nav-search-icon {
  flex: 0 0 auto;

  margin-left: 12px;

  color: var(--result-nav-text-muted);
}

.result-nav-search input {
  flex: 1 1 auto;
  min-width: 0;

  height: 100%;

  padding: 0 10px;

  border: 0;
  outline: 0;

  background: transparent;
  color: var(--result-nav-text);

  font-family: var(--result-nav-mono);
  font-size: 11px;
}

.result-nav-search input::placeholder {
  color: #6f7387;
}

.result-nav-search-submit {
  align-self: stretch;

  padding: 0 12px;

  border: 0;
  border-left: 1px solid rgba(255,255,255,.065);

  background: transparent;
  color: var(--result-nav-text-dim);

  font-family: var(--result-nav-font);
  font-size: 11px;
  font-weight: 650;

  cursor: pointer;

  transition:
    color .16s ease,
    background .16s ease;
}

.result-nav-search-submit:hover {
  color: #fff;
  background: rgba(124,92,252,.10);
}

/* Upload */
.result-nav-upload {
  flex: 0 0 auto;

  min-height: 40px;
  padding: 0 15px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  border-radius: 11px;

  color: #fff !important;

  background:
    linear-gradient(
      135deg,
      var(--result-nav-accent),
      var(--result-nav-accent-2)
    );

  box-shadow: 0 8px 22px rgba(124,92,252,.22);

  font-size: 12px;
  font-weight: 720;

  transition:
    transform .16s ease,
    box-shadow .16s ease,
    filter .16s ease;
}

.result-nav-upload:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(124,92,252,.31);
  filter: brightness(1.03);
}

.result-nav-upload svg {
  flex: 0 0 auto;
}

/* Right account area slightly tighter */
.result-nav-right {
  gap: 15px;
}

/* Responsive */
@media (max-width: 1320px) {
  .result-nav-logo {
    width: 158px;
  }

  .result-nav-context {
    display: none;
  }

  .result-nav-links {
    gap: 20px;
  }

  .result-nav-search {
    max-width: 310px;
  }

  .result-nav-status > span:last-child {
    display: none;
  }
}

@media (max-width: 1100px) {
  .result-nav-search {
    max-width: 245px;
  }

  .result-nav-search-submit {
    display: none;
  }

  .result-nav-upload {
    padding: 0 13px;
  }

  .result-nav-links {
    gap: 17px;
  }
}

@media (max-width: 900px) {
  .result-nav-menu {
    gap: 0;
  }

  .result-nav-tools {
    width: 100%;
    max-width: none;
    min-width: 0;

    padding: 14px 0 6px;

    order: 2;
  }

  .result-nav-search {
    max-width: none;
    flex: 1 1 auto;
  }

  .result-nav-search-submit {
    display: inline-flex;
    align-items: center;
  }

  .result-nav-upload {
    min-width: 108px;
  }

  .result-nav-right {
    order: 3;
  }
}

@media (max-width: 520px) {
  .result-nav-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .result-nav-search,
  .result-nav-upload {
    width: 100%;
    max-width: none;
  }

  .result-nav-upload {
    min-height: 42px;
  }
}


/* =========================================================
   RESULT NAVBAR V4 — Simplified information architecture
   Reports · Company Portal · Documentation
   ========================================================= */

.result-nav-links {
  gap: 30px;
}

.result-nav-tools {
  max-width: 560px;
}

/* Give Company Portal enough breathing room without looking like a button */
.result-nav-link {
  white-space: nowrap;
}

/* Search can use the space freed by removing Analyze */
.result-nav-search {
  max-width: 420px;
}

@media (max-width: 1320px) {
  .result-nav-links {
    gap: 23px;
  }

  .result-nav-search {
    max-width: 340px;
  }
}

@media (max-width: 1100px) {
  .result-nav-search {
    max-width: 275px;
  }
}
