/* Bottom dock: move mouse to bottom edge to pop up Prev · step · Next (fine pointer). Touch keeps bar visible. */
.crt-journey-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9990;
  pointer-events: none;
}

.crt-journey-dock > * {
  pointer-events: auto;
}

.crt-journey-hover-trigger {
  cursor: default;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(122, 168, 206, 0.06)
  );
}

@media (hover: hover) and (pointer: fine) {
  .crt-journey-dock {
    height: 28px;
  }

  .crt-journey-hover-trigger {
    position: absolute;
    inset: 0;
  }

  /* Hidden: slid below viewport; does not consume vertical layout space */
  .crt-journey-dock:not(:hover):not(:focus-within) .crt-journey-bar {
    transform: translateY(calc(100% + 4px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.18s ease,
      visibility 0s linear 0.28s;
  }

  .crt-journey-dock:hover .crt-journey-bar,
  .crt-journey-dock:focus-within .crt-journey-bar {
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    opacity: 1;
    transition:
      transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.22s ease,
      visibility 0s linear;
  }
}

@media (prefers-reduced-motion: reduce) {
  .crt-journey-bar {
    transition-duration: 0.01ms !important;
  }
}

.crt-journey-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% - 3px);
  width: 100%;
  background: linear-gradient(180deg, rgba(5, 30, 51, 0.97), rgba(2, 21, 39, 0.99));
  border-top: 1px solid rgba(122, 168, 206, 0.25);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
  font-family: Outfit, system-ui, sans-serif;
  padding: 10px 16px 12px;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease,
    visibility 0s linear;
}

@media (hover: none), (pointer: coarse) {
  .crt-journey-hover-trigger {
    display: none;
  }

  .crt-journey-bar {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}

/* Reserve space: thin strip when hover-reveal; full bar on touch */
body.crt-journey-pad {
  padding-bottom: 36px;
}

@media (hover: none), (pointer: coarse) {
  body.crt-journey-pad {
    padding-bottom: 72px;
  }
}

.crt-journey-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.crt-journey-bar-step {
  font-size: 15px;
  font-weight: 600;
  color: #c8ddf0;
  letter-spacing: 0.02em;
  flex: 1 1 auto;
  min-width: 140px;
  text-align: center;
  order: 2;
}

.crt-journey-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crt-journey-bar-actions--prev {
  order: 1;
}

.crt-journey-bar-actions--next {
  order: 3;
}

.crt-journey-bar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(122, 168, 206, 0.35);
  color: #e8f2fc;
  background: #0a2d4a;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.crt-journey-bar-btn:hover:not(.is-disabled) {
  background: #0d3a5c;
  border-color: rgba(245, 167, 0, 0.45);
  color: #fff;
}

.crt-journey-bar-btn.is-disabled {
  opacity: 0.38;
  pointer-events: none;
  cursor: default;
}

.crt-journey-bar-btn-next:not(.is-disabled) {
  background: #f5a700;
  border-color: #ffbe40;
  color: #021527;
}

.crt-journey-bar-btn-next:not(.is-disabled):hover {
  background: #ffbe40;
  color: #021527;
}

@media (max-width: 640px) {
  .crt-journey-bar-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .crt-journey-bar-step {
    order: 1;
    text-align: center;
  }
  .crt-journey-bar-actions--prev {
    order: 2;
  }
  .crt-journey-bar-actions--next {
    order: 3;
  }
  .crt-journey-bar-actions {
    justify-content: space-between;
  }
}


/* Bottom-bar removed across all tool pages — keep markup but hide the dock entirely. */
.crt-journey-dock { display: none !important; }



/* ── Top cross-tool stepper ─────────────────────────────────────────────── */
.crt-stepper {
  background: var(--navy);
  border-bottom: 1px solid var(--border);
  padding: 10px clamp(20px, 4vw, 42px);
  flex-shrink: 0;
}
.crt-stepper-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.crt-stepper-item {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
}
.crt-stepper-item:not(:last-child)::after {
  content: '';
  flex: 1 1 0;
  height: 1px;
  margin: 0 8px;
  background: var(--border2);
}
.crt-stepper-item.is-done:not(:last-child)::after {
  background: var(--green);
}
.crt-stepper-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text3);
  font-family: var(--outfit);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding: 4px 6px;
  border-radius: var(--r);
  transition: color .15s, background .15s;
}
a.crt-stepper-link:hover,
a.crt-stepper-link:focus-visible {
  color: var(--white);
  background: rgba(255,255,255,0.04);
  outline: none;
}
.crt-stepper-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid var(--border2);
  background: transparent;
}
.crt-stepper-item.is-future .crt-stepper-dot {
  color: var(--text3);
  border-color: var(--border2);
}
.crt-stepper-item.is-current .crt-stepper-dot {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--navy);
  box-shadow: 0 0 0 3px rgba(245,167,0,0.18);
}
.crt-stepper-item.is-current .crt-stepper-link {
  color: var(--white);
  font-weight: 600;
}
.crt-stepper-item.is-done .crt-stepper-dot {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.crt-stepper-item.is-done .crt-stepper-link {
  color: var(--white);
}
.crt-stepper-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 899px) {
  .crt-stepper-label { display: none; }
  .crt-stepper-item:not(:last-child)::after { margin: 0 4px; }
}
