/* ═══════════════════════════════════════════════════════════════════════════
   V10 shell — the stepper rail, the command palette and finishing touches.
   Loaded by boot.js after the V7 sheets, so these rules win where they meet.
═══════════════════════════════════════════════════════════════════════════ */

/* ── The rail as a stepper ─────────────────────────────────────────────── */
.rail-item { position: relative; }
.rail-step {
  position: absolute;
  top: 5px;
  left: calc(50% - 21px);
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1;
  color: var(--text-secondary);
  background: var(--bg-surface-3);
  box-shadow: 0 0 0 2px var(--bg-deep);
  font-variant-numeric: tabular-nums;
  transition: background var(--dur-fast, 160ms) ease, color var(--dur-fast, 160ms) ease;
}
.rail-item[data-has] .rail-step { background: var(--cyan); color: #04101a; }
.rail-item[data-has][data-step]::after { display: none; }   /* the step badge replaces the dot */
.rail-item[aria-current='page'] .rail-step { box-shadow: 0 0 0 2px var(--bg-deep), 0 0 0 3.5px rgba(60, 204, 252, 0.7); }
.rail-item[data-optional]:not([aria-current='page']) .rail-step { opacity: 0.55; }
/* The phone rail is a single icon row: numbers crowd it, so it keeps the dots. */
@media (max-width: 860px) {
  .rail-step { display: none; }
  .rail-item[data-has][data-step]::after { display: block; }
}

/* ── The header's "Jump to" ────────────────────────────────────────────── */
.hdr-palette { display: inline-flex; align-items: center; gap: 8px; }
.hdr-palette-k {
  font-family: var(--font-body);
  font-size: 10.5px;
  color: var(--text-secondary);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.02);
}
@media (max-width: 1320px) { .hdr-palette-l { display: none; } }
@media (max-width: 720px) { .hdr-palette { display: none; } }

/* ── The palette ───────────────────────────────────────────────────────── */
.pal { position: fixed; inset: 0; z-index: 1200; display: grid; justify-items: center; align-items: start; }
.pal[hidden] { display: none; }
.pal-scrim { position: absolute; inset: 0; background: rgba(3, 3, 4, 0.62); backdrop-filter: blur(3px); }
.pal-box {
  position: relative;
  margin-top: min(14vh, 120px);
  width: min(640px, calc(100vw - 32px));
  max-height: min(70vh, 560px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, #0e1013, #090a0c);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(60, 204, 252, 0.08);
  overflow: hidden;
  animation: pal-in 140ms ease-out;
}
@keyframes pal-in { from { opacity: 0; transform: translateY(-6px) scale(0.99); } }
.pal-input {
  appearance: none;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  padding: 16px 18px;
  outline: none;
}
.pal-input::placeholder { color: var(--text-faint); }
.pal-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.pal-group { padding: 10px 12px 4px; font-size: 11px; color: var(--text-faint); letter-spacing: 0.02em; }
.pal-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-dim);
}
.pal-item.is-active { background: rgba(60, 204, 252, 0.1); color: var(--text); box-shadow: inset 2px 0 0 var(--cyan); }
.pal-label { font-size: 14px; font-weight: 500; }
.pal-hint { font-size: 12.5px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-tag { font-size: 11px; color: var(--text-faint); }
.pal-empty { padding: 18px 14px; color: var(--text-secondary); font-size: 13px; }
.pal-foot {
  display: flex;
  gap: 16px;
  padding: 9px 16px;
  border-top: 1px solid var(--border-soft);
  font-size: 11.5px;
  color: var(--text-faint);
}
@media (prefers-reduced-motion: reduce) { .pal-box { animation: none; } }
@media (max-width: 520px) { .pal-hint { display: none; } .pal-foot { display: none; } }
