/* Workspace rail: coloured tiles, dividers, and the fixed tools at the bottom. */
.rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5) 0;
  background: var(--surface-0);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  scrollbar-width: none;
}

.rail-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-lg);
  background: var(--tile, var(--surface-4));
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 650;
  letter-spacing: 0.02em;
  transition: border-radius var(--t-med) var(--ease-out), transform var(--t-fast);
  user-select: none;
}

.tile:hover {
  border-radius: 12px;
  text-decoration: none;
}

.tile[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid var(--text);
  border-radius: 14px;
}

.tile.tool {
  background: transparent;
  color: var(--text-3);
  border: 1px dashed var(--line-strong);
}

.tile.tool:hover {
  color: var(--text);
  border-color: var(--text-3);
}

.tile.tool[aria-current="page"] {
  color: var(--text);
  border-style: solid;
  background: var(--surface-3);
}

.rail-divider {
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: var(--line-strong);
  margin: var(--sp-2) 0;
}

.rail-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  margin-top: auto;
  padding-top: var(--sp-5);
}

.rail .ibtn {
  width: 38px;
  height: 38px;
}

/* Tile colours come from the same palette as tree icons. */
[data-color="grey"] { --tile: #5b616d; --ic: var(--ic-grey); }
[data-color="blue"] { --tile: #3f63d8; --ic: var(--ic-blue); }
[data-color="green"] { --tile: #1f8a5e; --ic: var(--ic-green); }
[data-color="yellow"] { --tile: #9b7612; --ic: var(--ic-yellow); }
[data-color="orange"] { --tile: #b8591b; --ic: var(--ic-orange); }
[data-color="red"] { --tile: #c0392f; --ic: var(--ic-red); }
[data-color="purple"] { --tile: #7a4fc9; --ic: var(--ic-purple); }
[data-color="teal"] { --tile: #13808a; --ic: var(--ic-teal); }
