.workflow-roadmap {
  --roadmap-progress: 0;
  position: fixed;
  top: calc(50% + var(--nav-height) / 2);
  right: 12px;
  z-index: 24;
  width: 48px;
  padding: 6px;
  transform: translateY(-50%);
  border: 1px solid #d6dce2;
  border-radius: 24px;
  background: #fffffff2;
  color: #1d1d1f;
  box-shadow: 0 8px 30px #1c354714;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.roadmap-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #637080;
}
.roadmap-toggle:hover { background: #eff4f8; }
.roadmap-toggle svg { width: 19px; height: 19px; }
.roadmap-current, .roadmap-heading { display: none; }
.roadmap-list {
  position: relative;
  display: grid;
  gap: 5px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}
.roadmap-list::before, .roadmap-list::after {
  content: '';
  position: absolute;
  top: 17px;
  bottom: 17px;
  left: 16px;
  width: 2px;
  background: #e1e7ec;
  pointer-events: none;
}
.roadmap-list::after {
  background: #93b9d9;
  transform: scaleY(var(--roadmap-progress));
  transform-origin: top;
}
.roadmap-list li { position: relative; z-index: 1; }
.roadmap-list a {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 34px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.roadmap-number {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-left: 3px;
  border: 1px solid #dce3e9;
  border-radius: 50%;
  background: #fff;
  color: #717d8a;
  font-size: 11px;
  font-weight: 600;
}
.roadmap-number svg { width: 12px; height: 12px; }
.roadmap-list a[data-passed] .roadmap-number { border-color: #c0d3e3; color: #426c8f; }
.roadmap-list a[data-active] .roadmap-number {
  border-color: #0f6cbd;
  background: #0f6cbd;
  color: #fff;
  box-shadow: 0 0 0 3px #e0edf8;
}
.roadmap-name { display: none; }
.roadmap-counter {
  display: block;
  padding: 4px 0 5px;
  text-align: center;
  color: #637080;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}
.workflow-roadmap[data-open] { width: 220px; border-radius: 22px; padding: 10px; }
.workflow-roadmap[data-open] .roadmap-toggle { width: 100%; justify-content: space-between; padding: 0 9px; }
.workflow-roadmap[data-open] .roadmap-heading { display: inline; font-size: 12px; font-weight: 600; }
.workflow-roadmap[data-open] .roadmap-name { display: inline; }
.workflow-roadmap[data-open] .roadmap-list a { padding-right: 9px; }
.workflow-roadmap[data-open] .roadmap-list a:hover { background: #f0f5f9; }
.workflow-roadmap[data-open] .roadmap-list a[data-active] { color: #0f6cbd; font-weight: 650; }
.workflow-roadmap a:focus-visible, .workflow-roadmap button:focus-visible { outline-offset: 2px; }
body:has(.menu-button[aria-expanded="true"]) .workflow-roadmap { visibility: hidden; }
#importera, #sok-egna-ord, #chatgpt, #kontrollera { scroll-margin-top: 24px; }

@media (max-width: 1000px), (max-height: 600px) {
  .workflow-roadmap {
    top: auto;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    width: min(250px, calc(100% - 32px));
    padding: 0;
    transform: none;
    border-radius: 19px;
  }
  .roadmap-toggle { width: 100%; height: 56px; justify-content: space-between; padding: 9px 16px; }
  .roadmap-current { display: grid; gap: 3px; text-align: left; min-width: 0; }
  .roadmap-current-kicker { font-size: 9px; font-weight: 650; letter-spacing: .07em; color: #6e7b88; }
  .roadmap-current-title { font-size: 13px; font-weight: 600; color: #0f548c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .roadmap-toggle svg { width: 18px; height: 18px; }
  .roadmap-list, .roadmap-counter { display: none; }
  .workflow-roadmap[data-open] {
    display: flex;
    flex-direction: column-reverse;
    width: min(280px, calc(100% - 32px));
    padding: 6px;
    border-radius: 23px;
  }
  .workflow-roadmap[data-open] .roadmap-toggle { height: 56px; padding: 9px 12px; border-top: 1px solid #e3e8ed; border-radius: 0 0 17px 17px; }
  .workflow-roadmap[data-open] .roadmap-heading { display: none; }
  .workflow-roadmap[data-open] .roadmap-list { display: grid; gap: 5px; max-height: calc(100svh - 190px); margin: 6px 4px 12px; overflow-y: auto; }
  .workflow-roadmap[data-open] .roadmap-list a { height: 37px; font-size: 13px; }
}

@media (max-width: 1000px) {
  .workflow-roadmap, .workflow-roadmap[data-open] { display: none; }
}
