/* Shared compact navigation. Tool and account cells remain stable across routes. */
body:has(> .platform-nav) {
  height: auto;
  min-height: 100vh;
  overflow-x: clip;
}

.platform-nav {
  --nav-height: 80px;
  --nav-avatar-size: 32px;
  --nav-avatar-btn-padding: 4px 8px 4px 4px;
  --nav-avatar-btn-gap: 7px;
  --nav-icon-size: 36px;
  --nav-icon-svg-size: 19px;
  --nav-gap: 6px;
  position: sticky;
  top: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: 84px auto minmax(380px, 1fr) 160px 250px;
  grid-template-areas: "logo primary sections actions user";
  align-items: center;
  gap: 12px;
  height: var(--nav-height);
  min-height: var(--nav-height);
  flex-shrink: 0;
  padding: 0 max(24px, calc((100vw - 1440px) / 2));
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid #e3e8ee;
  box-shadow: 0 2px 14px rgba(20, 30, 45, .06);
  backdrop-filter: saturate(1.4) blur(10px);
  font-family: var(--font-body);
  line-height: 1.5;
}
.platform-nav > .logo { grid-area: logo; display: flex; align-items: center; }
.platform-nav .brand-logo { height: 56px; }
.platform-nav > .nav-links { display: contents; }
.platform-nav .nav-primary-links {
  grid-area: primary;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
}
.platform-nav .nav-primary-links > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 13px;
  border-radius: 10px;
  background: transparent;
  color: #2a3441;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  transition: color .18s ease, background .18s ease;
}
.platform-nav .nav-primary-links > a:hover,
.platform-nav .nav-primary-links > a.active { background: #fff5ee; color: #b74409; }
.platform-nav .nav-primary-links > a.active { font-weight: 700; }
.platform-nav .nav-divider { display: none; }

/* One segmented group replaces three separately bordered cards. */
.platform-nav .nav-section-links {
  grid-area: sections;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  max-width: 500px;
  padding: 5px;
  border: 1px solid #e3e8ee;
  border-radius: 16px;
  background: #f1f3f6;
  justify-self: center;
}
.platform-nav .nav-section-links > .nav-section-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-width: 0;
  padding: 0 12px;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  transform: none;
  color: #3d4756;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}
.platform-nav .nav-section-links > .nav-section-btn:hover {
  color: #b74409;
  background: #fff;
  transform: none;
  box-shadow: none;
}
.platform-nav .nav-section-links > .nav-section-btn.active {
  color: #b74409;
  background: #fff;
  box-shadow: 0 2px 8px rgba(20, 30, 45, .12), inset 0 0 0 1px #ffe3d0;
}
.platform-nav .nav-section-btn::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 2px;
  width: 18px;
  height: 3px;
  margin-inline: auto;
  border-radius: 2px;
  background: currentColor;
  opacity: 0;
  transition: opacity .18s ease;
}
.platform-nav .nav-section-btn.active::before { opacity: 1; }
/* Decorative chevrons removed: they read as dropdown affordances these links don't have. */
.platform-nav .nav-section-btn::after { display: none; }
.platform-nav .nsb-icon { display: flex; }
.platform-nav .nsb-icon svg { width: 20px; height: 20px; }
.platform-nav .nsb-text { text-align: start; min-width: 0; }
.platform-nav .nsb-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
  font-size: 14.5px;
  font-weight: 700;
}
/* Descriptions remain accessible without a second visual text row. */
.platform-nav .nsb-text small {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  font-size: 10px;
  font-weight: 500;
}
.platform-nav .nav-section-btn:hover .nsb-text strong,
.platform-nav .nav-section-btn.active .nsb-text strong { color: inherit; }

.platform-nav .nav-page-actions {
  grid-area: actions;
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: var(--nav-gap);
  min-width: 0;
}
.sb-authed .platform-nav .nav-page-actions { display: flex; }
.platform-nav > .nav-user-area {
  grid-area: user;
  width: 250px;
  justify-content: flex-end;
  gap: var(--nav-gap);
}
.platform-nav #nav-logged,
.platform-nav #bz-nav-logged,
.platform-nav #eq-nav-logged,
.platform-nav .bz-nav-user-wrap,
.platform-nav #bz-nav-user,
.platform-nav #eq-nav-user { gap: var(--nav-gap) !important; }
.platform-nav .nav-avatar-btn {
  flex-shrink: 0;
  border: 1px solid #edf0f3;
  background: #fafbfc;
  box-shadow: none;
}
.platform-nav .nav-avatar-info { display: flex; width: 90px; text-align: start; }
.platform-nav .nav-avatar-name {
  max-width: 90px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
}
.platform-nav .nav-avatar-email { display: none; }
.platform-nav .nav-avatar-circle { font-family: var(--font-body); line-height: 1; }
.platform-nav .gn-bell,
.platform-nav .eq-fav-nav-btn {
  width: var(--nav-icon-size);
  height: var(--nav-icon-size);
  min-height: var(--nav-icon-size);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #566171;
  text-decoration: none;
}
.platform-nav .eq-fav-nav-btn svg { width: var(--nav-icon-svg-size); height: var(--nav-icon-svg-size); }
.platform-nav .gn-bell:hover,
.platform-nav .eq-fav-nav-btn:hover { background: #fff5ee; color: #b74409; }
.platform-nav .btn-login-nav {
  height: 42px;
  min-height: 42px;
  padding: 0 16px;
  gap: 8px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(135deg, #f36418, #d9510a);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 3px 10px rgba(243, 100, 24, .28);
}
.platform-nav .btn-login-nav::after { background: linear-gradient(135deg, #d9510a, #b33f05); }
.platform-nav .btn-login-nav:hover { box-shadow: 0 5px 14px rgba(217, 81, 10, .35); }
.platform-nav .btn-login-nav-ico { width: 17px; height: 17px; }
.platform-nav .btn-login-sep { opacity: .55; font-size: 12px; }
.platform-nav .lang-switch-btn {
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
  gap: 6px;
  border: 1px solid #dfe5ec;
  background: #fff;
  color: #3d4756;
  font-size: 13px;
}
.platform-nav .lang-switch-btn svg { width: 16px; height: 16px; }
.platform-nav .bz-cta-organize { height: 36px; padding: 0 11px; font-size: 12px; box-shadow: none; }
.platform-nav .bz-cta-organize-full { display: inline; }
.platform-nav .bz-cta-organize-short { display: none; }
.platform-nav .bz-cta-organize-ico { display: block; width: 14px; height: 14px; }
.platform-nav :is(a, button, [role="button"]):focus-visible {
  outline: 2px solid #c24c10;
  outline-offset: 3px;
}

/* Wide screens: the section group sits at the exact center of the bar.
   Equal 1fr side tracks guarantee symmetry; logo + primary links share the
   start track, page actions + account share the end track. */
@media (min-width: 1420px) {
  .platform-nav {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "start sections end";
    column-gap: 24px;
  }
  .platform-nav > .logo { grid-area: start; justify-self: start; }
  .platform-nav .nav-primary-links {
    grid-area: start;
    justify-self: start;
    margin-inline-start: 100px; /* logo (81px) + gap */
  }
  .platform-nav .nav-section-links { width: 480px; max-width: none; }
  .platform-nav > .nav-user-area { grid-area: end; justify-self: end; }
  .platform-nav .nav-page-actions {
    grid-area: end;
    justify-self: end;
    margin-inline-end: 262px; /* account cell (250px, fixed) + gap */
  }
}

/* Two closely spaced rows only when a single row would crowd the controls. */
@media (min-width: 769px) and (max-width: 1419px) {
  .platform-nav {
    --nav-height: 112px;
    grid-template-columns: 76px minmax(0, 1fr) 220px;
    grid-template-rows: 64px 48px;
    grid-template-areas: "logo primary user" "sections sections actions";
    column-gap: 12px;
    row-gap: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,.97) 64px, rgba(248,250,252,.97) 64px);
  }
  .platform-nav .nav-section-links {
    max-width: 500px;
    justify-self: start;
    padding: 3px;
    background: #eef1f4;
    border-color: transparent;
  }
  .platform-nav .brand-logo { height: 48px; }
  .platform-nav .nav-section-links > .nav-section-btn { height: 38px; padding: 0 8px; gap: 6px; }
  .platform-nav .nsb-text strong { font-size: 13.5px; }
}

/* Phones retain existing bottom section navigation and a compact top row. */
@media (max-width: 768px) {
  .platform-nav {
    --nav-height: 64px;
    --nav-avatar-size: 30px;
    --nav-avatar-btn-padding: 4px;
    --nav-avatar-btn-gap: 0px;
    --nav-icon-size: 32px;
    --nav-icon-svg-size: 18px;
    --nav-gap: 6px;
    grid-template-columns: 66px minmax(0, 1fr) auto;
    grid-template-areas: "logo actions user";
    gap: 6px;
    padding: 0 14px;
  }
  .platform-nav .nav-primary-links,
  .platform-nav .nav-section-links { display: none; }
  .platform-nav > .nav-user-area { width: auto; }
  .platform-nav .nav-avatar-info,
  .platform-nav .nav-avatar-caret { display: none; }
  .platform-nav .nav-avatar-btn { border-radius: 50%; }
  .platform-nav .brand-logo { height: 46px; }
  .platform-nav .bz-cta-organize { padding: 0 10px; }
}
@media (max-width: 400px) {
  .platform-nav {
    --nav-avatar-size: 28px;
    --nav-avatar-btn-padding: 3px;
    --nav-icon-size: 28px;
    --nav-icon-svg-size: 16px;
    --nav-gap: 4px;
  }
}
@media (max-width: 360px) {
  .platform-nav { padding: 0 10px; gap: 4px; }
  .platform-nav .bz-cta-organize-full { display: none; }
  .platform-nav .bz-cta-organize-short { display: inline; }
  .platform-nav .bz-cta-organize-ico { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .platform-nav *, .platform-nav *::before, .platform-nav *::after {
    animation: none !important;
    transition: none !important;
  }
}
