.public-primary-nav a {
  position: relative;
  padding: 14px 13px 8px;
  border: 1px solid transparent;
  line-height: 1.1;
  text-decoration: none;
  transition: color .18s ease;
}

.public-primary-nav--home { --nav-active: #0f172a; --nav-muted: #3d526b; }
.public-primary-nav--ev { --nav-active: #0f172a; --nav-muted: #36586a; }
.public-primary-nav--ems { --nav-active: #f8fafc; --nav-muted: #8fa8c1; }
.public-primary-nav--automation { --nav-active: #f8fafc; --nav-muted: #9da9bf; }

[data-nav-tone="home"] { --link-accent: #0891b2; }
[data-nav-tone="ev"] { --link-accent: #059669; }
[data-nav-tone="energy"] { --link-accent: #7c3aed; }
[data-nav-tone="ems"] { --link-accent: #06b6d4; }
[data-nav-tone="automation"] { --link-accent: #8b5cf6; }

.public-primary-nav a { color: var(--nav-muted) !important; }

.public-primary-nav a:hover {
  color: var(--link-accent) !important;
  background: transparent;
}

.public-primary-nav a[aria-current="page"] {
  color: var(--nav-active) !important;
  background: transparent;
  border-color: transparent;
  font-weight: 800;
  letter-spacing: .01em;
}

.public-primary-nav a[aria-current="page"]::before {
  content: "CURRENT";
  position: absolute;
  top: 0;
  left: 13px;
  color: var(--link-accent);
  font: 800 7px/1 'Space Mono', ui-monospace, monospace;
  letter-spacing: .17em;
  opacity: .9;
}

.public-mobile-nav a[aria-current="page"] {
  position: relative;
  color: inherit !important;
  padding-top: 24px;
  background: transparent;
  border: 0;
  font-weight: 800;
}

.public-mobile-nav a[aria-current="page"]::before {
  content: "CURRENT";
  position: absolute;
  top: 8px;
  left: 0;
  color: var(--link-accent, #06b6d4);
  font: 800 8px/1 'Space Mono', ui-monospace, monospace;
  letter-spacing: .17em;
}

.ems-section-rail {
  border-top: 1px solid rgba(34, 211, 238, .12);
  border-bottom: 1px solid rgba(34, 211, 238, .14);
  background: linear-gradient(90deg, #020810, #06121d 50%, #020810);
}

.ems-section-nav {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 9px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.ems-section-nav::-webkit-scrollbar { display: none; }

.ems-section-nav > span {
  margin-right: 28px;
  color: #71839b;
  font: 700 9px/1.2 'Space Mono', ui-monospace, monospace;
  letter-spacing: .18em;
  white-space: nowrap;
}

.ems-section-nav a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 164px;
  min-height: 40px;
  padding: 7px 18px;
  color: #c5d1df;
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(94, 126, 153, .34);
  border-radius: 0;
  font: 650 13px/1.2 Inter, system-ui, sans-serif;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: color .18s ease, background .18s ease;
}

.ems-section-nav a:last-child { border-right: 1px solid rgba(94, 126, 153, .34); }

.ems-section-nav a::before {
  content: attr(data-index);
  color: #22d3ee;
  font: 800 9px/1 'Space Mono', ui-monospace, monospace;
  letter-spacing: .12em;
}

.ems-section-nav a::after {
  content: "→";
  margin-left: auto;
  color: #67e8f9;
  font: 500 15px/1 Inter, system-ui, sans-serif;
  transition: transform .18s ease;
}

.ems-section-nav a:hover,
.ems-section-nav a:focus-visible {
  color: #f0fdff;
  background: rgba(34, 211, 238, .08);
  transform: none;
  outline: none;
}

.ems-section-nav a:hover::after,
.ems-section-nav a:focus-visible::after { transform: translateX(3px); }

@media (max-width: 1050px) {
  .ems-section-nav { padding-inline: 24px; }
}
