.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: .65rem 1.15rem;
  background: var(--m-bg);
  border: 1px solid var(--m-border);
  border-radius: var(--m-r);
  box-shadow: var(--m-shadow);
  flex-wrap: wrap;
}
.nav-brand { font-family: var(--m-font-head); font-weight: 700; font-size: 1.125rem; color: var(--m-fg); }
.nav a { color: var(--m-fg-3); font-weight: 600; font-size: 1rem; }
.nav a:hover { color: var(--m-fg); text-decoration: none; }
.nav .selected { color: var(--m-fg); }
.nav-space { flex: 1; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .4em; font-size: 1rem; }
.crumbs a, .crumbs span { color: var(--m-fg-3); }
.crumbs a:hover { color: var(--m-fg); }
.crumbs > * + *::before {
  content: "/";
  margin-right: .45em;
  color: var(--m-border-2);
}
.crumbs .current { color: var(--m-fg); font-weight: 600; }

.bottom-nav {
  display: flex;
  align-items: stretch;
  background: var(--m-bg);
  border-top: 1px solid var(--m-border);
}
.bottom-nav.fixed {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--m-z-sticky);
}
.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2em;
  padding: .55em .35em;
  color: var(--m-fg-3);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-width: 0;
}
.bnav-item:hover {
  color: var(--m-fg);
  background: transparent;
  text-decoration: none;
}
.bnav-item.selected { color: var(--m-primary); }

.steps { display: flex; gap: .5rem; list-style: none; padding: 0; margin: .5rem 0; counter-reset: st; }
.step {
  display: flex;
  align-items: center;
  gap: .5em;
  flex: 1;
  color: var(--m-fg-3);
  font-size: 1rem;
  font-weight: 600;
  min-width: 0;
}
.step:not(:last-child)::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--m-border);
  margin-left: .5em;
}
.step-dot {
  width: 1.75em;
  height: 1.75em;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--m-surface);
  border: 1px solid var(--m-border-2);
  font-size: .9375rem;
  counter-increment: st;
  flex-shrink: 0;
}
.step-dot::before { content: counter(st); }
.step.done .step-dot,
.step.current .step-dot {
  background: var(--m-primary);
  color: var(--m-on-primary);
  border-color: var(--m-primary);
}
.step.done, .step.current { color: var(--m-fg); }
.step.done .step-dot::before { content: "✓"; }
.step-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidenav { display: flex; flex-direction: column; gap: .15rem; padding: .35rem; }
.sidenav-item {
  display: flex;
  align-items: center;
  gap: .6em;
  padding: .55em .85em;
  border-radius: var(--m-r-sm);
  color: var(--m-fg-2);
  font-weight: 600;
  font-size: 1rem;
}
.sidenav-item:hover { background: var(--m-surface); text-decoration: none; color: var(--m-fg); }
.sidenav-item.selected { background: var(--m-primary-soft); color: var(--m-primary); }
.sidenav-item.disabled { opacity: .45; pointer-events: none; }

.steps-v { flex-direction: column; align-items: stretch; }
.steps-v .step {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: .5em;
  flex: none;
  width: 100%;
}
.steps-v .step-dot { grid-column: 1; grid-row: 1; }
.steps-v .step-label { grid-column: 2; grid-row: 1; white-space: normal; overflow: visible; }
.steps-v .step:not(:last-child)::after {
  content: "";
  grid-column: 1;
  grid-row: 2;
  width: 1px;
  height: 1.15rem;
  flex: none;
  margin: .2em auto;
  background: var(--m-border);
}
